Skip to content

Instantly share code, notes, and snippets.

@p2baron
Last active March 8, 2024 20:41
Show Gist options
  • Save p2baron/968fe7c44e918b15b062f64032e8bbc2 to your computer and use it in GitHub Desktop.
Save p2baron/968fe7c44e918b15b062f64032e8bbc2 to your computer and use it in GitHub Desktop.
autmation.yaml
alias: "[Sync] First floor monitor (VTH) with Homeassistant alarm"
description: ""
trigger:
- platform: event
event_type: dahua_vto
event_data:
CurrentProfile: AtHome
AlarmEnable: true
id: home_armed
- platform: event
id: home_disarmed
event_type: dahua_vto
event_data:
AlarmEnable: false
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: home_armed
sequence:
- service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.alarmo
data: {}
- conditions:
- condition: trigger
id: home_disarmed
sequence:
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.alarmo
data:
code: "123456"
default: []
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment