-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmobile_app_android_alarm.yaml
40 lines (37 loc) · 1.35 KB
/
mobile_app_android_alarm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
blueprint:
name: Mobile App Android Notification Command Set Alarm
description: >-
Android Mobile App supports several notification command option
these blueprints provide any easy way to use these features without complex setup.
domain: script
source_url: https://github.com/stboch/homeassistant-blueprints/blob/main/mobile_app_android_alarm.yaml
input:
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
integration: mobile_app
command_choice:
name: Command Choice
description: Choose when alarm to trigger
selector:
time:
mode: restart
variables:
timeinput: !input command_choice
## These are used to quickly change a blueprint to support every different notification commands
message: "command_activity"
sequence:
- alias: "Send notification"
domain: mobile_app
type: notify
device_id: !input notify_device
data:
group: |
{% set timelist = timeinput.split(':') %}
{% set timehour = timelist[0] %}
{% set timemin = timelist[1] %}
android.intent.extra.alarm.HOUR:{{timehour}},android.intent.extra.alarm.MINUTES:{{timemin}},android.intent.extra.alarm.SKIP_UI:true
tag: android.intent.action.SET_ALARM
message: '{{ message }}'