9#ifdef USE_BINARY_SENSOR
17 void setup()
override;
27#ifdef USE_BINARY_SENSOR
39 std::function<bool()>
func_{
nullptr};
53 void play(
const Ts &...
x)
override { this->
parent_->start(); }
57 void play(
const Ts &...
x)
override { this->
parent_->
stop(); }
61 void play(
const Ts &...
x)
override { this->
parent_->reset(); }
Base class for all automation conditions.
Helper class to easily give an object a parent of type T.
This class simplifies creating components that periodically check a state.
Base class for all binary_sensor-type classes.
void set_restore(bool restore)
sensor::Sensor * last_duty_time_sensor_
void dump_config() override
std::function< bool()> func_
void publish_and_save_(uint32_t sec, uint32_t ms)
ESPPreferenceObject pref_
void process_state_(bool state)
void set_lambda(std::function< bool()> &&func)
void set_value_(uint32_t sec)
void set_sensor(binary_sensor::BinarySensor *sensor)
void set_last_duty_time_sensor(sensor::Sensor *sensor)
RunningCondition(DutyTimeSensor *parent, bool state)
bool check(const Ts &...x) override
Base-class for all sensors.
float state
This member variable stores the last state that has passed through all filters.