I am trying to create notifications if i left the lights and other stuff on when leaving the house.
I am trying to trigger on zone goes 0. Then i know nobody is there. But it could be cool to reference what light was left on, i know you can do this with triggers, like {{ trigger.from_state.attributes.friendly_name }}. Anyway that is it possible to do the same with conditions.
Example:
alias: Test notification
description: ""
trigger:
- platform: state
entity_id:
- zone.home
for:
hours: 0
minutes: 5
seconds: 0
to: 0
condition:
- condition: or
conditions:
- condition: state
entity_id: light.example1
state: "on"
- condition: state
entity_id: light.example2
state: "on"
action:
- service: notify.mobile_app_peter
data:
message: >-
The light {{ condition.attributes.friendly_name }} has been
left on - what do you want to do?
data:
custom_entity: "{{ condition.entity_id }}"
actions:
- action: "1"
title: Turn On
- action: "0"
title: Turn Off
mode: single
Or should i turn it upside down and do some magic with triggers ??