#Can I check a trigger every 5 seconds or execute a action every 5 seconds if the trigger is true

1 messages · Page 1 of 1 (latest)

grave cradle
#

platform: numeric_state
entity_id: sensor.strom_dg_aktuell
below: 0
for:
hours: 0
minutes: 0
seconds: 0

#

repeat:
while:
- condition: numeric_state
entity_id: sensor.strom_dg_aktuell
below: 0
sequence:
- type: turn_off
device_id: 79316d9a5516786bb1b954a8ad0e112a
entity_id: switch.manual_control_the_load
domain: switch
enabled: true

#

Is this right ?

open violetBOT
#

@grave cradle To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

devout epoch
#

What you posted looks like it's missing most of an automation, so I'm guessing it's supposed to be part of one?

#

You can use a time pattern trigger every 5 seconds, that's probably better (or less bad) than looping a script