[Sprinkler] Initialize timers early to avoid crash (#5499)

This commit is contained in:
Ilia Sotnikov
2023-10-09 06:37:48 +03:00
committed by GitHub
parent 412a866de8
commit c65d78f568
3 changed files with 14 additions and 15 deletions
+2 -2
View File
@@ -204,12 +204,12 @@ class SprinklerValveRunRequest {
class Sprinkler : public Component {
public:
Sprinkler();
Sprinkler(const std::string &name);
void setup() override;
void loop() override;
void dump_config() override;
void set_name(const std::string &name) { this->name_ = name; }
/// add a valve to the controller
void add_valve(SprinklerControllerSwitch *valve_sw, SprinklerControllerSwitch *enable_sw = nullptr);