Hello, I am trying to get a relay output on esphome to pulse on and off for 10 seconds at 500ms on 500ms off then stop. Ive searched everywhere to find out how to do this,
I can get it to work with the HA Automation code below, but it is very long winded.
can someone point me in the right direction to doing this within the ESP switch command itself
description:
trigger:
- platform: state
entity_id:
- group.alarm_beep
from: "off"
to: "on"
condition:
- condition: state
entity_id: switch.alarm_on
state: "on"
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_off
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_on
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_off
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_on
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_off
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_on
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_off
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_on
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
- service: switch.turn_off
data: {}
target:
entity_id: switch.beep
- delay:
milliseconds: 500
mode: restart```