This is how the JSON works in openHAB
Number CHPump_Temperature "CH Flow Temperature [%.1f C]" (GroundFloor, TEMP) {mqtt="<[mosquitto:tele/sonoff-pump/SENSOR:state:JSONPATH($.DS18B20-1.Temperature)]"}
Number CHPump_TemperatureR "CH Return Temperature [%.1f C]" (GroundFloor) {mqtt="<[mosquitto:tele/sonoff-pump/SENSOR:state:JSONPATH($.DS18B20-2.Temperature)]"}
And this is the console output
12:28:51 MQT: tele/sonoff-pump/SENSOR = {"Time":"2018-11-09T12:28:51","DS18B20-1":{"Id":"0417C15DF4FF","Temperature":20.6},"DS18B20-2":{"Id":"0517C143A6FF","Temperature":19.4},"DS18B20-3":{"Id":"0517C16908FF","Temperature":18.9},"DS18B20-4":{"Id":"0517C172E7FF","Temperature":30.1},"DS18B20-5":{"Id":"0517C17422FF","Temperature":19.1},"TempUnit":"C"}
There appear to be differences and not really sure why.
Don’t know if it helps any but you can see how openHAB handles it
Regards
Phil K
Sent from Mail for Windows 10
--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Console message here for 3 1-wire devices is:3:45:55 MQT: /1Wire/SENSOR = {"Time":"2018-11-08T13:45:55", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10AE56130008007B", "Temperature":71.3}, "DS2":{"Type":"DS18S20", "Address":"10A52F47000800CB", "Temperature":71.9}, "DS3":{"Type":"DS18B20", "Address":"280D7E5B04000049", "Temperature":81.1}}, "TempUnit":"F"}JSON template that works:
- platform: mqtt
state_topic: '/1Wire/SENSOR'
name: 'Hallway'
unit_of_measurement: '°F'
value_template: '{{ value_json ["DS18x20"]["DS1"]["Temperature"] }}'
- platform: mqtt
state_topic: '/1Wire/SENSOR'
name: 'Basement'
unit_of_measurement: '°F'
value_template: '{{ value_json ["DS18x20"]["DS2"]["Temperature"] }}'