13 template<
typename V>
void set_min(V min) { this->
min_ = min; }
14 template<
typename V>
void set_max(V max) { this->
max_ = max; }
16 void setup()
override;
35 bool check(
const Ts &...
x)
override {
37 if (std::isnan(this->
min_)) {
38 return state <= this->
max_;
39 }
else if (std::isnan(this->
max_)) {
40 return state >= this->
min_;
Base class for all automation conditions.
Function-pointer-only templatable storage (4 bytes on 32-bit).
Base-class for all numbers.
NumberInRangeCondition(Number *parent)
bool check(const Ts &...x) override
void on_state_(float state)
ValueRangeTrigger(Number *parent)
float get_setup_priority() const override
TemplatableFn< float, float > max_
TemplatableFn< float, float > min_