Struggling to find any pointer son how to do this without writing a quazillion automations.
I have 2 physical buttons i want to use as a remote to arm/disarm my alarm. Both need to do the same thing.
I can figure out to have one button do it by writing 2 automations: 1 for click to arm and 1 for hold to disarm.
Question: Can i combine that in 1 automation?
Is there away to also add in the other button in the same automation?
Yaml for 1 button and 1 action:
- alias: "Manual - Button pressed to disarm"
trigger:
- platform: event
event_type: zha_event
- event_data:
device_ieee: 28:6d:97:00:01:13:04:17
command: button_single
action:
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm