After browsing the help section and documentation for hours I was not able to resolve my problem.
I am trying to do an automation with mqtt. When the value exceeds a certain value the action should start.
Therefore I created a trigger " When an MQTT message has been received" and a template condition. At first I tried to do it like this:
it implies the received payload is in JSON format. In other words, the payload isn’t merely a single value but consists of one or more key-value pairs. With that in mind, the following comparison is incorrect because trigger.payload_json isn’t a single value.
trigger.payload_json > 300
However, the error message indicates the received value is not in JSON format.
Message 4 received on pv/HM1500/ch0/P_AC at 12:21 PM: 369
Thanks a lot it is working. Despite I get the same error when pressing “test” (the condition). The whole automation is working and also the action is taking place.
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.