Actionable notifications on wakeup?

I’m very new to Home Assistant (been playing with it for a couple weeks). I’ve got much of the basics down, but I have a scenario that I don’t know how to achieve (if it’s possible)…

Basically my wife has a remote car starter. It’s a simple one-way push button that starts the car, nothing to fancy. However, in the mornings when she gets ready for work, she is upstairs. She doesn’t go downstairs (where we keep the car keys) until she’s ready to leave. By that time, there isn’t much point to remote-starting the car, since she’s already on her way out.

Ideally, I’d like to setup a system where she will receive a notification each weekday morning when she wakes up (she always checks her phone when waking up). I would be something along the lines of “Good morning. Would you like to start your car?”. If possible the notification would have a button, or link to somewhere that would start the car for her.

I’ve already got the hardware side of things setup. I ordered a 2nd push button key fob that’s compatible with the remote start module. It’s programmed and works to start the car. I disassembled the remote start fob, wired the button up to a Wemos D1 Mini and connected it to Home Assistant as a switch. I’m using the Espurna firmware to create a .5 second “pulse” for the switch trigger. This part of it is all working. I can see the switch in HA and clicking the it in the UI works to start the car as expected.

The last part is where I’m a little lost. I’m not sure where to start for trying to setup automatic actionable notifications like this. If anyone can point me in the right direction, I would appreciate the help. Thanks!

Upper and lower case is important in this:

automations.yaml or automations section of configuration.yaml:

- id: am_start_car_notification
  alias: 'AM Start Car Notification'
  trigger:
    platform: time
    at: '08:30:00' # <--- ### Change to the time you want the notification sent ###
  action:
    service: notify.ios_wife_phone ### <--- change to your wife's phone ###
    data_template:
      message: "Would you like to start the car?"
      data:
        push:
          badge: 0
          category: "startcar"

- id: push_notify_action_start_car
  alias: 'Push Notify Action Start Car'
  hide_entity: true
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: STARTCAR
  action:
    service: switch.turn_on
    entity_id: switch.car_starter ### <--- Your D1 Mini switch entity_id here ###

ios.yaml or ios section of configuration.yaml:

  - name: startcar
    identifier: 'startcar'
    actions:
    - identifier: 'STARTCAR'
      title: "Start Car"
      activationMode: 'background'
      authenticationRequired: no
      destructive: yes
      behavior: 'default'

You could also add a workday condition to the first automation. You would have to add the workday binary sensor to your configuration:

This is slightly better than a weekday condition as it take into account public holidays.

Thanks for the help. I’ll give it a try tomorrow and see how it goes.

@tom_l, thanks for your suggestions. I got it setup and working with your feedback!

1 Like