mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 10:38:38 +00:00
[binary_sensor] Use a user provided default constructor for DelayedOnFilter (#19205)
This commit is contained in:
@@ -53,6 +53,9 @@ class DelayedOnOffFilter final : public Filter {
|
||||
|
||||
class DelayedOnFilter : public Filter {
|
||||
public:
|
||||
// User provided, not "= default": `new(p) DelayedOnFilter()` would zero-fill .bss that is already zero.
|
||||
DelayedOnFilter() {}
|
||||
|
||||
optional<bool> new_value(bool value) override;
|
||||
|
||||
template<typename T> void set_delay(T delay) { this->delay_ = delay; }
|
||||
|
||||
Reference in New Issue
Block a user