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