I’m using TASMOTA firmware with my Sonoff’s and in a recent update they have added the ability to have multiple DHT sensors and thus append -GPIO to each sensor. This seems to be unsupported by Home Assistant value templates. i.e.:
[homeassistant.helpers.template] Error parsing value: 'dict object' has no attribute 'AM2301' (value: {"Time":"2017-05-07T09:08:27", "AM2301-14":{"Temperature":20.8, "Humidity":60.4}, "TempUnit":"C"}, template: {{ value_json.AM2301-14.Temperature }})
This sensor before the -14 worked fine: - platform: mqtt name:
2017-05-07 10:10:50 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.mqtt]: invalid template (TemplateSyntaxError: expected name or number) for dictionary value @ data['value_template']. Got '{{ value_json.["AM2301-14"].Temperature }}'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.mqtt/
Sorry, I don’t know much about MQTT sensors, but the template JSON parse is solid.
You can paste this into the template parser in developer tools and extract your value…