I am having problem not receiving a notification . I have a philio door sensor which i installed recently. When i try to make an automation for the value when it goes from 23 to 22 ( door opens) to get a notification on the HA APP . But this is not working : I can see the below in the automation.yaml file :
action:
data:
message: ’ Door is Open’
tittle: Door Status
service: notify.ios_iphone
alias: Door Status
condition: []
id: ‘1516718957369’
trigger:
entity_id: sensor.philio_technology_corporation_pst02a_4_in_1_multisensor_access_control
from: ‘23’
platform: state
to: ‘22’
At first glance your code looks ok; although it is a bit mangled due to the formatting so can’t be sure.
YAML is very sensitive to spaces, and that might be the issue here. When you post on the forum it’s better to create code blocks, either by using the button above the edit box (looks like this: </>), or by starting and ending the section with three times the character ` which you can find left of the 1 key on a regular keyboard.
but that’s all besides your actual question
what the issue could be:
ios_iphone could be the wrong entity - check if you have a typo there
trigger itself is not working - try another action (e.g. turn on light) instead of the notification. if that doesn’t work either then the trigger is the issue
see if you can get notifications to work using a script; so that you at least know it works before putting it in an automation. I had a similar issue and created this script that I can just trigger from the front end:
Thank you for your advise. I will take that into consideration next time . I have created the automation from the web interface , and have inserted the following in the data field in action
{
“message”: " Door Status",
“subtitle”: “Door is open”,
“target”: “023bf7ab-b46b-3ec0-83a6-c59533858e17”,
“tittle”: “Door Alarm”
}
tried both with and without target . I tried your script and thanks the notification works fine… I should test the trigger then . because the iphone id is right as it works in the below script