- alias: 'Rule 3: Notify by app when camera is triggered'
trigger:
platform: event
event_type: camect_event
event_data:
type: alert
action:
service: notify.mobile_app_lm_x210_g
data_template:
title: '{{ trigger.event.data[''desc''] }}'
message: '{{ trigger.event.data[''desc''] }}'
data:
attachment:
url: '{{ trigger.event.data[''url''] }}'
hide-thumbnail: false
condition:
condition: or
conditions:
- condition: state
entity_id: input_boolean.input_sleep
state: 'on'
- condition: state
entity_id: input_boolean.input_away
state: 'on'
- alias: 'Rule 8: When Security Mode toggled to Home, run these actions'
trigger:
platform: state
entity_id: input_boolean.input_home
to: 'on'
action:
- service: notify.mobile_app_lm_x210_g
data:
title: 'Arriving Home'
message: 'Welcome!'
- service: camect.change_op_mode
data:
mode: "HOME"
I'd like for the notification to show the animated GIF that the email sends and a URL link to the video but I've yet to get that working.
- alias: 'Rule 3: Notify by app when camera is triggered'
It's horribly hacky...but appears to accomplish the goal.
My theory was that the next step would be to change the way the events are exposed, more closely resembling the method that home-assistant uses for other integrations.
- alias: 'When annunciator toggled to On, do the following.' trigger: platform: state entity_id: input_boolean.annunciator to: 'on' action: - service: notify.all_mobile_apps data: title: 'Annunciator turned on.' message: 'Enabling audible notifications for people, cars and trucks.' - service: camect.change_op_mode data: mode: "DEFAULT"
automation: - alias: 'Annunciator'
trigger: platform: event event_type: camect_event event_data: type: alert action:
- service: notify.alexa_media data_template: data: type: tts message: '{{ trigger.event.data[''desc''] }}' target: - media_player.an_echo_dot - media_player.an_ecobee_smartthermostat_with_voice_control - media_player.another_echo_dot condition: condition: and conditions: - condition: state entity_id: input_boolean.annunciator state: 'on' - condition: or conditions: - condition: template value_template: "{{ 'person' in trigger.event.data['desc'] }}" - condition: template value_template: "{{ 'car' in trigger.event.data['desc'] }}" - condition: template value_template: "{{ 'truck' in trigger.event.data['desc'] }}"