20 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
std::string component_type() const override
"switch" component type.
bool send_initial_state() override
const EntityBase * get_entity() const override
MQTTSwitchComponent(switch_::Switch *a_switch)
bool publish_state(bool state)
switch_::Switch * switch_
void dump_config() override
Base class for all switches.
Providing packet encoding functions for exchanging data with a remote host.
Simple Helper struct used for Home Assistant MQTT send_discovery().