StardadO
(Denis Apel)
July 14, 2018, 10:02am
1
Hi
I’ve succesfully installed my Sonoff Generic Modul + Tasmota 6.1.0a and it works fine. But i’ve connected also 3 x ds18b20, and i don’t know how to run the temperature sensor in HA.
From my Sonoff Generic Modul i become this:
{"Time":"1970-01-01T00:42:20","DS18S20-1":{"Id":"000800C6726A","Temperature":24.8},"DS18B20-2":{"Id":"0118316109FF","Temperature":23.7},"DS18B20-3":{"Id":"02183149F1FF","Temperature":7.2},"TempUnit":"C"}
I have tested:
- platform: mqtt
name: KS1
icon: mdi:thermometer-lines
state_topic: "tele/kuehlschrank/SENSOR"
value_template: "{{ value_json['DS18S20-1']['Temperature'] }}"
unit_of_measurement: "°C"
- platform: mqtt
name: KS2
icon: mdi:thermometer-lines
state_topic: "tele/kuehlschrank/SENSOR"
value_template: "{{ value_json['DS18S20-2']['Temperature'] }}"
unit_of_measurement: "°C"
- platform: mqtt
name: KS3
icon: mdi:thermometer-lines
state_topic: "tele/kuehlschrank/SENSOR"
value_template: "{{ value_json['DS18S20-3']['Temperature'] }}"
unit_of_measurement: "°C"
What is my Problem? Can you help me?
1 Like
I’m accessing the values like this and it works perfectly fine:
- platform: mqtt
name: KS1
state_topic: 'tele/kuehlschrank/SENSOR'
value_template: '{{ value_json.DS18S20-1.Temperature }}'
unit_of_measurement: '°C'
availability_topic: 'tele/kuehlschrank/LWT'
payload_available: 'Online'
payload_not_available: 'Offline'
1 Like
StardadO
(Denis Apel)
July 14, 2018, 10:22am
3
Oh man.
The Problem was…
{"Time":"1970-01-01T00:42:20","DS18S20-1":{"Id":"000800C6726A","Temperature":24.8},"DS18B20-2":{"Id":"0118316109FF","Temperature":23.7},"DS18B20-3":{"Id":"02183149F1FF","Temperature":7.2},"TempUnit":"C"}
The first name ob “DS18S20-1” is with “S” the two other sensors is with “B” DS18B20-2. Shit.
Thanks!
Now is works fine with:
- platform: mqtt
name: KS1
icon: mdi:thermometer-lines
state_topic: "tele/kuehlschrank/SENSOR"
value_template: "{{ value_json['DS18S20-1']['Temperature'] }}"
unit_of_measurement: "°C"
- platform: mqtt
name: KS2
icon: mdi:thermometer-lines
state_topic: "tele/kuehlschrank/SENSOR"
value_template: "{{ value_json['DS18B20-2']['Temperature'] }}"
unit_of_measurement: "°C"
- platform: mqtt
name: KS3
icon: mdi:thermometer-lines
state_topic: "tele/kuehlschrank/SENSOR"
value_template: "{{ value_json['DS18B20-3']['Temperature'] }}"
unit_of_measurement: "°C"