19 if (payload ==
"PRESS") {
22 ESP_LOGW(TAG,
"'%s': Received unknown status payload: %s", LOG_STR_ARG(this->
log_name_()), payload.c_str());
void status_momentary_warning(uint32_t length=5000)
Set warning status flag and clear it after length ms.
const LogString * log_name_() const
Entity name for a "%s" log argument.
void subscribe(T &&topic, F &&callback, uint8_t qos=0)
Subscribe to a MQTT topic.
MQTTTopicSource command_topic_source_() const
The command topic as a subscription source. A lambda topic is read once and copied,...
ESPHOME_LOG_TAG(TAG, "alarm_control_panel")
MQTT_COMPONENT_TYPE(MQTTAlarmControlPanelComponent, "alarm_control_panel") const EntityBase *MQTTAlarmControlPanelComponent
Simple Helper struct used for Home Assistant MQTT send_discovery().
bool state_topic
If the state topic should be included. Defaults to true.