22 void play(Ts...
x)
override {
41 if (this->cycle_.has_value()) {
42 call.with_cycle(this->cycle_.value(x...));
55 template<
typename V>
void set_min(V min) { this->
min_ = min; }
56 template<
typename V>
void set_max(V max) { this->
max_ = max; }
58 void setup()
override;
79 if (std::isnan(this->
min_)) {
80 return state <= this->
max_;
81 }
else if (std::isnan(this->
max_)) {
82 return state >= this->
min_;
virtual void play(Ts... x)=0
Base class for all automation conditions.
NumberCall & with_operation(NumberOperation operation)
NumberCall & set_value(float value)
Base-class for all numbers.
void add_on_state_callback(std::function< void(float)> &&callback)
NumberInRangeCondition(Number *parent)
bool check(Ts... x) override
NumberOperationAction(Number *number)
cycle void play(Ts... x) override
TEMPLATABLE_VALUE(NumberOperation, operation) TEMPLATABLE_VALUE(bool
TEMPLATABLE_VALUE(float, value) void play(Ts... x) override
NumberSetAction(Number *number)
NumberStateTrigger(Number *parent)
TemplatableValue< float, float > min_
void on_state_(float state)
ValueRangeTrigger(Number *parent)
float get_setup_priority() const override
TemplatableValue< float, float > max_
Providing packet encoding functions for exchanging data with a remote host.