Base class for all switches.
void write_state(bool state) override
Implementation of SPI Controller mode.
void publish_state(bool state)
Publish a state to the front-end from the back-end.
bool state
The current reported state of the binary sensor.
float random_float()
Return a random float between 0 and 1.