Skip to content

Instantly share code, notes, and snippets.

@mbernson
Created February 15, 2021 13:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbernson/30e3f47019ca5157f3a031bb163ea16f to your computer and use it in GitHub Desktop.
Save mbernson/30e3f47019ca5157f3a031bb163ea16f to your computer and use it in GitHub Desktop.
Home Assistant - Start Roomba using actionable push notification
- id: '1613375678079'
alias: Ask to start cleaning
trigger:
- platform: zone
entity_id: person.mathijs
zone: zone.home
event: leave
condition:
# I added this step in the UI, don't know how to find the device_id otherwise
# - condition: device
# device_id: <xxxxxxxxxx>
# domain: vacuum
# entity_id: vacuum.dustin
# type: is_docked
action:
- service: notify.mobile_app_iphone
data:
title: Vacuum cleaning
message: Would you like to start the vacuum cleaner?
data:
push:
category: clean
action_data:
mode: single
- id: '1613375964751'
alias: Start vacuum cleaner
description: ''
trigger:
- platform: event
event_type: ios.notification_action_fired
event_data:
actionName: START_CLEANING
condition: []
action:
- service: vacuum.start
data: {}
entity_id: vacuum.dustin
mode: single
# You need to add a push notification category in configuration.yaml
#
# For Android, see:
# https://companion.home-assistant.io/docs/notifications/actionable-notifications/
ios:
push:
categories:
- name: Clean
identifier: "clean"
actions:
- identifier: "START_CLEANING"
title: "Start vacuum cleaner"
activationMode: "background"
authenticationRequired: true
destructive: false
behavior: "default"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment