-
-
Notifications
You must be signed in to change notification settings - Fork 97
(v2.1x) New dallassensor mqtt topic usage? #581
Comments
The json key has special characters so you can't use the value_json.* syntax. Use [key] instead. See https://www.home-assistant.io/docs/configuration/templating/#processing-incoming-data Also you can test yourself in HA using Developer Tools->Template and something like {% set test = {
"28-EA41-9497-0E03": 18.2
} %}
{{ test['28-EA41-9497-0E03'] }} |
and you really should be using the HA format if using Home Assistant. If you don't want to use MQTT discovery turn it off in configuration.yaml. |
Thanks, is working. |
@proddy, one question before I start to modify all my setup to mqtt HA option and discovery: |
good point, it will most likely show an error in the HA logs. I'm not sure how bad that is. I'll have to try it out myself and see. |
@giovanne123 see #582 |
Tested #540 with 2.1.0b12, esp8266
Manual edit of climate.yaml, no usage of Auto discover.
Do I something wrong in the value_json?
See error in HA (0.116.4) below:
Mqtt topic and data is received as expected, checked in mqtt-explorer.
2020-10-26 22:16:46 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: dict object has no element 10 (value: {"10-7E42-7001-0800":20.2}, template: {{ value_json.10-7E42-7001-0800 }})
The text was updated successfully, but these errors were encountered: