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