Dear all,
need some help on decoding a stacked payload.
The payload lokks like this:
“object”: {
“temperatureSensor”: {
“1”: 4.16,
i was able to decode like this:
“object”: {
“temperatureSensor”: 4.16,
with yaml:
- platform: mqtt
state_topic: “xxx”
name: “yyyy”
unit_of_measurement: “°C”
value_template: “{{ value_json.object.temperatureSensor}}”
but the stacked version makes some problems
tried:
a) value_template: “{{ value_json.object.1}}”
b) value_template: “{{ value_json.object.[1]}}”
a) value_template: “{{ value_json.object.(1)}}”
nothing works
what to use
any ideas?
SatDad