Skip to content

Commit

Permalink
Merge pull request #3 from hostcc/bugfix/rain-sensor-led
Browse files Browse the repository at this point in the history
Fixed LED follows rain sensor
  • Loading branch information
hostcc authored Aug 12, 2023
2 parents bb0de25 + 2243161 commit 83df101
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions script_rain_water_tank_sensors_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
// Explicitly shutdown any running operation in case of rain, also turn on
// LED indicating the condition
#ifdef TRIGGERED_BY_${rain_sensor_id}
id(${led_id}).turn_on();
auto call = id(${led_id}).turn_on();
call.perform();
id(flowerbed_sprinklers).shutdown();
id(lawn_sprinklers).shutdown();
#endif
Expand Down Expand Up @@ -63,7 +64,8 @@

// Turn off LED indicating that rain is detected
#ifdef TRIGGERED_BY_${rain_sensor_id}
id(${led_id}).turn_off();
auto call = id(${led_id}).turn_off();
call.perform();
#endif

// Resume any operation if any once water tank is full
Expand Down

0 comments on commit 83df101

Please sign in to comment.