7static const char *
const TAG =
"number.automation";
17 convert hash = {.from = (local_max - local_min)};
21 if (this->
rtc_.
load(&initial_state)) {
30 if (std::isnan(
state))
33 float local_min = this->
min_.
value(state);
34 float local_max = this->
max_.
value(state);
37 if (std::isnan(local_min) && std::isnan(local_max)) {
39 }
else if (std::isnan(local_min)) {
40 in_range =
state <= local_max;
41 }
else if (std::isnan(local_max)) {
42 in_range =
state >= local_min;
44 in_range = local_min <=
state &&
state <= local_max;
virtual ESPPreferenceObject make_preference(size_t length, uint32_t type, bool in_flash)=0
uint32_t get_object_id_hash()
void add_on_state_callback(std::function< void(float)> &&callback)
TemplatableValue< float, float > min_
void on_state_(float state)
float get_setup_priority() const override
TemplatableValue< float, float > max_
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Providing packet encoding functions for exchanging data with a remote host.
ESPPreferences * global_preferences