21 void play(
const Ts &...
x)
override {
37 void
play(const Ts &...
x)
override {
40 if (this->cycle_.has_value()) {
41 call.with_cycle(this->cycle_.value(x...));
54 template<
typename V>
void set_min(V min) { this->
min_ = min; }
55 template<
typename V>
void set_max(V max) { this->
max_ = max; }
57 void setup()
override;
76 bool check(
const Ts &...
x)
override {
78 if (std::isnan(this->
min_)) {
79 return state <= this->
max_;
80 }
else if (std::isnan(this->
max_)) {
81 return state >= this->
min_;
virtual void play(const Ts &...x)=0
Base class for all automation conditions.
void trigger(const Ts &...x)
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(const Ts &...x) override
NumberOperationAction(Number *number)
cycle void play(const Ts &...x) override
TEMPLATABLE_VALUE(NumberOperation, operation) TEMPLATABLE_VALUE(bool
TEMPLATABLE_VALUE(float, value) void play(const 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_