Summon Husband Automation

Summon Husband Automation

Apr 08, 2023    

Now that I have my zigbee radio and home assistant all set up, I ordered a pile of Aqara Zigbee switches and sensors to play with. It’s my seventh wedding anniversary tomorrow so I thought I’d start by making a home automation my wife requested. She wanted a button that would politely interrupt me and call me down to dinner on a night where she is cooking so she doesn’t have to figure out where I am in the house, walk upstairs or downstairs, and potentially have to get my attention through noise cancelling headphones.

The automation will work like this.

                                            ┌────────────────────┐
                                            │                    │
                                            │ Action:            │
┌───────────┐     ┌────────────────┐        │   Mobile Alert     │
│           │     │                ├───────►│                    │
│  Summon   │     │ Broadcast      │        └────────────────────┘
│  Husband  ├────►│ Event:         │
│  Button   │     │  HUSBANDSUMMON │        ┌─────────────────────────┐
│           │     │                ├───────►│                         │
└───────────┘     └────────────────┘        │  Condition:             │
                                            │    Office Motion Sensor │
                                            │  Action:                │
                                            │    Lights Scene         │
                                            │                         │
                                            └─────────────────────────┘

The first automation receives the button push:

alias: SummonDaveButtonPress
description: ""
trigger:
  - device_id: 17ee1b48322c96533e45586a5afac396
    domain: deconz
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition: []
action:
  - event: HUSBANDSUMMON
    event_data: {}
mode: single

I can use the event to have multiple actions hang off the event with different conditions gating the trigger. The first mobile notification should always trigger and I set it to bust through my phone’s mute setting:

alias: SummonDaveMobileAlert
description: ""
trigger:
  - platform: event
    event_type: HUSBANDSUMMON
condition: []
action:
  - service: notify.mobile_app_davephone
    data:
      message: SPOUSE is Calling You
      data:
        push:
          interruption-level: critical
          presentation_options: alert
mode: single

The second thing I do is modify the lights in my office if the motion sensor is detecting me in the office.

alias: SummonDaveLightsSummon
description: ""
trigger:
  - platform: event
    event_type: HUSBANDSUMMON
condition:
  - type: is_motion
    condition: device
    device_id: 73eedef3ac5f348c408297424c687e9a
    entity_id: binary_sensor.presence_3
    domain: binary_sensor
action:
  - service: scene.turn_on
    target:
      entity_id: scene.officezone_summon
    metadata: {}
mode: single

The scene is configured separately, this one happens to be in the Philips Hue app.

LightColor