I generate mqtt messages outside home assistant but want home assistant to listen for that topic. My problem is how to configure the automation notify.mobile_app so the payload is pushed to the device.
I’m using mosquito_pub -t “mess/name” -m “this text should be visible on my phone.” …
Then on state change of that sensor or whenever you want to push to your phone, that notification can be done via an automation.
Here is an example of an automation that reacts to any state change of a sensor. Then the state of that sensor is passed in the message sent to my phone using a template.
Thanks for answer so quick Yes this is one way, I’ve already has it with my hygrometers and it’s working but it’s stored in db then. I would love to go directly from mqtt payload into messages. Google around a lot but no luck for me there. I also tried to specify messages: in the mosquito messages but still no luck.
Get error as seen in red of the trigger. But so far as I understand this is exactly what I want to do.
I have an mqtt as trigger and this as an action correct so far? :
Little tricky but it’s working now!!! Thanks Now I know what the persistent_notification is I have only changed the service to mobile_app and now is it working as I want many thanks!!!