9static const char *
const TAG =
"status_led";
15 ESP_LOGV(TAG,
"New app state 0x%08" PRIX32, new_state);
30 ESP_LOGD(TAG,
"Restoring light state %s", ONOFF(
state));
39 ESP_LOGD(TAG,
"'%s': Setting initial state",
state->get_name().c_str());
45 state->current_values_as_binary(&binary);
50 ESP_LOGD(TAG,
"'%s': Setting state %s",
state->get_name().c_str(), ONOFF(binary));
56 ESP_LOGCONFIG(TAG,
"Setting up Status LED...");
58 if (this->
pin_ !=
nullptr) {
65 ESP_LOGCONFIG(TAG,
"Status Led Light:");
66 LOG_PIN(
" Pin: ", this->
pin_);
70 if (this->
pin_ !=
nullptr)
uint32_t get_app_state() const
virtual void digital_write(bool value)=0
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
void current_values_as_binary(bool *binary)
The result of all the current_values_as_* methods have gamma correction applied.
virtual void set_state(bool state)
Enable or disable this binary output.
void output_state_(bool state)
output::BinaryOutput * output_
void write_state(light::LightState *state) override
void dump_config() override
light::LightState * lightstate_
void setup_state(light::LightState *state) override
Providing packet encoding functions for exchanging data with a remote host.
const uint32_t STATUS_LED_ERROR
const uint32_t STATUS_LED_MASK
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.
const uint32_t STATUS_LED_WARNING