Actionable Notification
This commit is contained in:
parent
e46c7eadab
commit
2a8c96e336
39
packages/light/light_notifications.yaml
Normal file
39
packages/light/light_notifications.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
automation:
|
||||
- alias: light_still_on_notification
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- light.all_lights
|
||||
from: "off"
|
||||
to: "on"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 15
|
||||
seconds: 0
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.lights_needed
|
||||
state: "off"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 15
|
||||
seconds: 0
|
||||
action:
|
||||
- service: notify.mobile_app_iphone
|
||||
data:
|
||||
message: "Lights are still on."
|
||||
data:
|
||||
actions:
|
||||
- action: "LIGHT_TURN_OFF"
|
||||
title: Turn them off
|
||||
- alias: light_still_on_notification_event
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: "LIGHT_TURN_OFF"
|
||||
action:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.all_lights
|
Reference in New Issue
Block a user