ESPHome 2026.8.0b4
Loading...
Searching...
No Matches
hoermann_hcp_light.h
Go to the documentation of this file.
1#pragma once
2
5#include "../hoermann_hcp.h"
6
7namespace esphome::hoermann_hcp {
8
10 public:
11 explicit HoermannHcpLight(HoermannHcp *parent) : parent_(parent) {}
12
13 void setup() override;
14 void setup_state(light::LightState *state) override;
16 void write_state(light::LightState *state) override;
17
18 protected:
19 void update_from_state_();
20 void publish_lamp_state_(bool on);
21
24 // Value last published and not yet seen come back, so the write carrying it is that publish, not a request.
25 optional<bool> published_state_;
26 // Set by the first write_state(), which is always the restored state replayed on boot.
27 bool boot_replay_done_{false};
28};
29
30} // namespace esphome::hoermann_hcp
light::LightTraits get_traits() override
void write_state(light::LightState *state) override
void setup_state(light::LightState *state) override
Interface to write LightStates to hardware.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition light_state.h:93
This class is used to represent the capabilities of a light.
Definition light_traits.h:9
bool state
Definition fan.h:2