Hi am trying to make a Amazon Dash Button arm and disarm the alarm over MQTT.
I have the Dash Button working over MQTT, and can get the Alarm to disarm…
- alias: 'Alarm Disarm Using Amazon Dash DadsRootBear'
initial_state: 'on'
trigger:
- platform: state
entity_id: switch.dadsrootbeer_dash_switch
to: 'on'
action:
service: alarm_control_panel.alarm_disarm
data:
entity_id: alarm_control_panel.house
code: 9999
however I have 2 issues i cant get working or dont know where to start.
Issue 1
I cannot make the code work for Armed_Away
- alias: 'Alarm Disarm Using Amazon Dash Olay''
initial_state: 'on'
trigger:
platform: state
entity_id: switch.olay_dash_switch
to: 'on'
action:
service: alarm_control_panel.alarm_armed_away
entity_id: alarm_control_panel.house
Issue 2
How can I make both automations work using the same dash, for example, if the alarm is disarmed then the dash button arms the alarm, if the alarm is armed the dash button disarms the alarm ?
@treno Thanks so much for the help, I have tried the code, and i get the following error
2017-12-01 20:19:36 ERROR (MainThread) [homeassistant.core] Invalid service data for alarm_control_panel.alarm_disarm: extra keys not allowed @ data[‘data’]. Got ‘code: 9999’