ster1um
November 10, 2025, 1:12pm
1
Hello everyone,
I’ve been trying for a few days to create an automation that would send me a notification when a user turns on a light, for example.
Unfortunately, I can’t figure it out!
I searched the forum for the same question but I didn’t find anything about it.
logical scheme:
JOHN TURN ON LIVING LIGHT > SEND A NOTIFICATION TO STEVE
Dujith
(Charles Evers)
November 10, 2025, 2:35pm
3
This used to a WTH subject and yes it would be nice to have this more in GUI or a simpler way.
But take a look at:
This nugget was very useful, thank you! With this I can now differentiate the 3 ways a device’s state was changed.
[Screenshot 2022-06-21 081430]
Here is a sample implementation using the choose action:
trigger:
- platform: state
entity_id:
- switch.office
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.to_state.context.id != none }}'
- condition: template
value_template: '{{ trigge…
That and the discussion there should help out.
1 Like
ster1um
November 10, 2025, 4:56pm
4
I read the suggested.
I tried to create a test automation but doesn’t work
triggers:
- trigger: state
entity_id:
- light.living
from:
- "off"
to:
- "on"
conditions:
- condition: template
value_template: "{{ trigger.to_state.context.user_id == ddxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7285 }}"
actions:
- action: notify.mobile_app_sm_a528b
metadata: {}
data:
message: >-
living light change state from off to on
Hellis81
(Hellis81)
November 10, 2025, 4:57pm
5
You need quotes around the string.
value_template: "{{ trigger.to_state.context.user_id == 'ddxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7285' }}"
1 Like
ster1um
November 10, 2025, 4:59pm
6
I posted the message. And then I realized the quotas were missing.
With the quote It seems to work