Your trigger is the lights turning on. If you want to send a notification if this lights are on at a certain time then your trigger needs to be the time and condition should be lights are on.
But if I delete the trigger part, and only run the action. The light wont turn off, and also I don’t receive the last notification.
So the trigger is not the problem here. For now I turn on the light manually, just to check if the actionable notification works, but that doesn’t work.
But if I just simplefy the automation that I just want to receive a message when the actionable notification button is pressed. It still won’t work
If I use the code below, en just run the automation. I imidiatly receive both messages. I just want to receive the message, only when de actionable notification button is pressed.
alias: test
description: ""
trigger: []
condition: []
action:
- service: notify.mobile_app_oneplus
data:
message: Lampen nog aan
data:
actions:
- action: uit
title: Zet lampen uit
- event: mobile_app_notification_action
event_data:
action: uit
- service: notify.mobile_app_oneplus
data:
message: Lampen zijn uit
mode: single
Go back to what you had. Trigger it normally (i.e. by switching your test light on). Share the trace of what’s happening here. And check your logs. Don’t run the automation manually.
One sensible change for the previous version is to split that automation: one for sending the first notification and one to trigger on the actionable notification event. But, don’t do that just yet. One thing at a time.
This last version will.of course send the notifications I quick succession: that is what it’s set to do. There’s nothing that will make it wait.
BTW, instead of a test light you can also use an input boolean. It’s more convenient.