Hi there,
I am trying to get notifications if my sensors detect water leakage. The sensors are aqara, connected via deconz. This is my action in the automation:
service: notify.mobile_app_mantass_iphone
data:
message: 'Water leak somewhere {{ trigger.to_state.attributes.friendly_name }}'
I have tried both data and data_template, when I run the automation I get this error in my logs (and I do not receive the notification):
Error while executing automation automation.water_leak_alerts: Error rendering data template: UndefinedError: 'dict object' has no attribute 'to_state'
Error while executing automation automation.water_leak_alerts: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'
I do not know what am I doing wrong. I tried running it without making any sensors wet, and then took one sensor, put it in a bowl of water so it runs automatically, but the automation is just not working. If I remove the friendly_name attribute, meaning just to have it send me a message without any additional info, it works like a charm. Any help is very much appreciated.