Basically I have a 4 button remote in HA which shows as 4 seperate switches.
Each choose is for a different action (button)
Trigger is each of the buttons being pressed.
It all works Except for the panic function which just does nothing.
alias: New Fob Control - Fob 1
description: ''
trigger:
- platform: state
entity_id: switch.fobarm
from: 'off'
to: 'on'
for:
hours: 0
minutes: 0
seconds: 1
- platform: state
entity_id: switch.fobhomearm
from: 'off'
to: 'on'
for:
hours: 0
minutes: 0
seconds: 1
- platform: state
entity_id: switch.fobdisarm
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 1
- platform: state
entity_id: switch.fobpanic
from: 'off'
to: 'on'
for:
hours: 0
minutes: 0
seconds: 1
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: switch.fobarm
state: 'on'
sequence:
- service: alarm_control_panel.alarm_arm_away
data: {}
target:
entity_id: alarm_control_panel.home_security_system
- service: switch.turn_on
data: {}
target:
entity_id: switch.fobdisarm
- service: switch.turn_off
data: {}
target:
entity_id: switch.fobarm
- conditions:
- condition: state
entity_id: switch.fobhomearm
state: 'on'
sequence:
- service: alarm_control_panel.alarm_arm_home
data: {}
target:
entity_id: alarm_control_panel.home_security_system
- service: switch.turn_on
data: {}
target:
entity_id: switch.fobdisarm
- service: switch.turn_off
data: {}
target:
entity_id: switch.fobhomearm
- conditions:
- condition: state
entity_id: switch.fobdisarm
state: 'off'
sequence:
- service: alarm_control_panel.alarm_disarm
data:
code: '7676'
target:
entity_id: alarm_control_panel.home_security_system
- conditions:
- condition: state
entity_id: switch.fobpanic
state: 'on'
for:
hours: 0
minutes: 0
seconds: 1
sequence:
- service: timer.start
data:
duration: '3600'
target:
entity_id: timer.alarm_noise
default: []
mode: single