I have a multiple sensors for shelly devices, each one representing state, battery, tilt etc.
I would like to have all those values in single sensors. Secondary values like battery or tilt could be places as attributes.
I’m struggling to achieve that.
how can I create such sensor, which automatically reads values from topic into attributes?
Lets’s be the code below a starting point:
- platform: mqtt name: "PCroom Window" state_topic: "shellies/shellydw-pc/sensor/state" payload_on: "open" payload_off: "close" device_class: "window" json_attributes_topic: "shellies/shellydw-pc/sensor/"
I’ve added json_attributes_topic believing that it’s enough. but it’s not.
here is how the message structure looks like:
Any help appreciated.