16 float base = std::isnan(this->
state) ? 0.0f : this->
state;
This class simplifies creating components that periodically check a state.
float state
This member variable stores the last state that has passed through all filters.
void publish_state(float state)
Publish a new state to the front-end.
StateClass get_state_class()
Get the state class, using the manual override if set.
Implementation of SPI Controller mode.
Base-class for all sensors.
float random_float()
Return a random float between 0 and 1.