TH16 with DS18B20 Sensor Configuration Help

I’m trying to setup a Sonoff TH16 with the DS18B20 waterproof temp sensor to control an aquarium heater. I have the sensor flashed and working. I can control the switch from HA, but cant figure out what I need to setup for the sensor in configuration.yaml for temperature. This is what I get from the sensor when testing

{"Time":"2018-02-05T19:13:19","DS18B20":{"Temperature":67.7},"TempUnit":"F"}

Hi !

Can you post your current sensor config, and how are you getting the above response with testing ?

You will almost certainly need to use the value_template: to extract the JSON value from the returned data

Edit:

Try adding the following to your sensor config

value_template: '{{ value_json.DS18B20.Temperature }}'

Hi @iamthecage How have you setup your TH16 and DS18B20 to HA?

Did you use custom firmware? If yes then which one?

Thanks.