This repository has been archived on 2023-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
homeassistant-config/packages/light/light_notifications.yaml
darthsandmann 853c1d1716 updates
2022-08-30 18:42:25 +02:00

66 lines
1.6 KiB
YAML
Executable File

automation:
- alias: light_still_on_still_needed_notify
mode: single
trigger:
- platform: state
entity_id:
- light.all_lights
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: "LIGHTTURNOFF"
title: Turn them off
icon: "sfsymbols:lightbulb"
- alias: light_still_on_iphone_offline_notify
mode: single
trigger:
- platform: state
entity_id:
- device_tracker.pfsense_kais_iphone_wnsrt_de
to: not_home
for:
hours: 0
minutes: 2
seconds: 0
condition:
- condition: state
entity_id: light.all_lights
state: "on"
action:
- service: notify.mobile_app_iphone
data:
message: "Lights are still on."
data:
actions:
- action: "LIGHTTURNOFF"
title: Turn them off
icon: "sfsymbols:lightbulb"
- alias: light_still_on_notification_event
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "LIGHTTURNOFF"
action:
- service: light.turn_off
target:
entity_id: light.all_lights