Created
February 15, 2021 13:52
-
-
Save mbernson/30e3f47019ca5157f3a031bb163ea16f to your computer and use it in GitHub Desktop.
Home Assistant - Start Roomba using actionable push notification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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