Home Security Automation (Arlo) solution - Can I consolidate the Automations?

Hi there,
after the first experience with automation I now tried to automate my home security Arlo system.
I’d like to share my working solution and ask about your opinion about improvements.

[1] Is it possible to consolidate this rule-set into just one rule?
[2] Do you see issues the way I implemented it?

How it’s supposed to work:

  • If I leave home → arm
  • If I come home & it’s between 8 am and 10 pm → disarm
  • When it get’s 10 pm & not already armed → arm
  • When it get’s 8 am & I am at home → disarm

I created 4 automation rules covering it:

alias: Arm Arlo cameras when leaving
description: ''
trigger:
  - platform: state
    entity_id: person.andi
    from: home
    to: not_home
condition: []
action:
  - service: alarm_control_panel.alarm_arm_away
    target:
      entity_id: alarm_control_panel.aarlo_arlo_huhn
  - service: notify.mobile_app_sm_g973f
    data:
      message: ''
      title: Arlo ON (Zone Away)
mode: single
alias: Disarm Arlo cameras when coming home
description: ''
trigger:
  - platform: state
    entity_id: person.andi
    from: not_home
    to: home
condition:
  - condition: time
    after: '08:00:00'
    before: '22:00:00'
action:
  - service: alarm_control_panel.alarm_disarm
    target:
      entity_id: alarm_control_panel.aarlo_arlo_huhn
  - service: notify.mobile_app_sm_g973f
    data:
      message: ''
      title: Arlo OFF (Zone Home)
mode: single
alias: Arm Arlo cameras in the evening
description: ''
trigger:
  - platform: time
    at: '22:01'
  - platform: homeassistant
    event: start
  - platform: event
    event_type: automation_reloaded
condition:
  - condition: template
    value_template: '{{ states(''alarm_control_panel.aarlo_arlo_huhn'') != ''armed_away'' }}'
  - condition: time
    after: '22:00:00'
    before: '08:01:00'
action:
  - service: alarm_control_panel.alarm_arm_away
    target:
      entity_id: alarm_control_panel.aarlo_arlo_huhn
  - service: notify.mobile_app_sm_g973f
    data:
      message: ''
      title: Arlo ON (Abend)
mode: single
alias: Disarm Arlo cameras in the morning
description: ''
trigger:
  - platform: time
    at: '08:01'
  - platform: homeassistant
    event: start
  - platform: event
    event_type: automation_reloaded
condition:
  - condition: state
    entity_id: person.andi
    state: home
  - condition: time
    after: '08:00:00'
    before: '22:01:00'
action:
  - service: alarm_control_panel.alarm_disarm
    target:
      entity_id: alarm_control_panel.aarlo_arlo_huhn
  - service: notify.mobile_app_sm_g973f
    data:
      message: ''
      title: Arlo OFF (Morgen)
mode: single

(2) If it’s working, then there are no issues :slight_smile: .

(1) You could, yes — the obvious way would be to combine all your triggers, then use choose under the action block, with the conditions from each of your four automations in each choose block:

Would that be any better or clearer, though?

If you do go that way, add an id to your automation, then you can use the excellent automation debugging tool.

2 Likes

Thank you! Think you are right… maybe it’s better having it clearer than more compact. Thanks for the article, interesting possibilities anyway.