19 void setup()
override;
MQTTComponent is the base class for all components that interact with MQTT to expose certain function...
void send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) override
bool send_initial_state() override
const EntityBase * get_entity() const override
MQTTSwitchComponent(switch_::Switch *a_switch)
bool publish_state(bool state)
const char * component_type() const override
"switch" component type.
switch_::Switch * switch_
void dump_config() override
Base class for all switches.
Simple Helper struct used for Home Assistant MQTT send_discovery().