Is it possible to add a temperature offset to an auto discovered sensor?

I have several temperature sensors around the house running Tasmota, three of which have DS18B20 sensors, which are very inaccurate and require an offset.

I can add them into configuration.yaml and apply the offset, as below, but if I were to enable auto discovery on them, would it still be possible to apply the offset, as items that have been auto discovered don’t appear in configuration.yaml.


  - platform: mqtt
    state_topic: 'tele/temp-sensor-4/SENSOR'
    name: 'Temp Sensor 4' #DS18B20
    unit_of_measurement: '°C'
    value_template: '{{ (value_json.DS18B20.Temperature|float - 2.4 )|round(1) }}'
1 Like

You can configure a temperature offset in Tasmota itself… it’s a setoption See below… just check the docs to find the option.

TempOffset	-12.6..12.6 = Set calibraton offset value for reported temperature telemetry
This setting affects all temperature sensors on the device.
4 Likes

DavidFW1960, thanks. That is a preferable solution, as I rather have the correction done at source.

2 Likes

Yeah 100%. There are so many options it’s tricky knowing what is possible sometimes.

1 Like