I have some sprinklers and landscape lights that are controlled by one ESP32 (ESPHome) + relays. I have an entity called sensor.sprinkler_controller_wifi_signal
but the sprinkler controller is just a name for the device. It also controls the lights. Let’s focus on the lights in this thread.
The lights trigger on at sunset. The ESP sometimes drops from wifi for a few seconds throughout the day. So, I would like to modify the automation such that if the ESP were offline at sunset, the action to activate the scene would fire upon the wifi dBm returning to something other than “unavailable”, or similar logic. I have tried a few variations of “Wait for trigger” actions, placing them at the top of the actions. Here is an example:
alias: Landscape Lights On/Off
description: ''
trigger:
- platform: sun
event: sunset
offset: '0'
id: turn_on
- platform: time
at: '22:00:00'
id: turn_off
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: turn_on
sequence:
- wait_for_trigger:
- type: signal_strength
platform: device
device_id: 21ea2898a684c0b71bce162a3703fb1c
entity_id: sensor.sprinkler_controller_wifi_signal
domain: sensor
below: 0
- scene: scene.landscape_lights_on
- conditions:
- condition: trigger
id: turn_off
...and so on
The automation does not work when I use this “Wait for trigger”, nor has it worked when the platform is a “Numeric State” of below 0. Can someone assist?
1 post - 1 participant