Multiple DS18B20 - Tasmota - MQTT

Hmm…perhaps you are right about these see here.
I didn’t twig that these sensors were 1 wire type…sorry.

Definitely. Se my posts above. I have 6 DS18B20 on one wire. The problem is the quotation marks are not ASCII.

I HATE auto-quotes. I don’t know of a browser which would cause this, but if you copied the code and pasted it into MS Word, for example, then copied it from Word into your code editor, that might cause this problem.

Thanks @KDM , your answer pointed me where I need to go.
I was struggling to get the attributes working. In my opinion the docs are wrong/misleading here.

I currently have 8 DS18B20’s connected to a wemos D1 running tasmota. This config works for me:

- platform: mqtt
  name: "heat_Sensor1"
  state_topic: "heat/tele/SENSOR"
  unit_of_measurement: "°C"
  value_template: "{{value_json['DS18B20-1'].Temperature}}"
  availability_topic: "heat/tele/LWT"
  payload_available: "Online"
  payload_not_available: "Offline"
  json_attributes_topic: "heat/tele/SENSOR"
  json_attributes_template: "{{ value_json['DS18B20-1'] | tojson }}"
  device_class: temperature
  
- platform: mqtt
  name: "heat_Sensor2"
  state_topic: "heat/tele/SENSOR"
  unit_of_measurement: "°C"
  value_template: "{{value_json['DS18B20-2'].Temperature}}"
  availability_topic: "heat/tele/LWT"
  payload_available: "Online"
  payload_not_available: "Offline"
  json_attributes_topic: "heat/tele/SENSOR"
  json_attributes_template: "{{ value_json['DS18B20-2'] | tojson }}"
  device_class: temperature

… and so on

The only frustrating thing is you need to hard code the sensor number, but this bears no relation to where it is in the chain. This isn’t something which is fixable by the TASMOTA or Home Assistant authors: each device has a hard-coded serial number, which you don’t get to know until after you switch it on!

But that’s due to the nature of the bus, right? All sensors are connected in parallel, not in a chain. So since the Ds18b20 does not allow you to assign an address to them, you will have to distinguish them based on the serial number…

The problem for me is that tasmota name the sensors simply based on the relative position in a list when sorted by serial numbers. When I add a new sensor it will probably result in a renaming of some of the other sensors.

But the fix for this has been submitted in your other thread “help with value_template” :slight_smile: