I have a device that is publishing a JSON string of various status values.
In my sensors.yaml include file, I have this entry:
- platform: mqtt
name: "Garden_Status"
force_update: true
state_topic: "garden2/statusJson"
In Developer Tools, States, I can see the sensor, but the data is the whole JSON string:
{"temp":"77.68","wet":"114","raw":"861","rssi":"-66","sleep":"10"}
How can I split it into attributes to use in an automation, for example?
(I am guessing that I need to use a template, but how?)