Device is a Xiaomi WXKG11LM 1 button, connected via Zigbee2Mqtt.
From 2021.04.0 I have these warning in logs:
Logger: homeassistant.helpers.template
Source: helpers/template.py:1335
First occurred: 10:59:46 (2 occurrences)
Last logged: 10:59:46
Template variable warning: 'dict object' has no attribute 'click' when rendering '{{ value_json.click }}'
Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
Got the same but related to the upgrade to 2021.4.3.
The error seems to be exactly the same, same place in template.py, but a template Iāve done myself. The template has been working for a couple of years (until upgrade to 2021.4.3). The issue occurs every 30 seconds. I dunno if there are relations, but my HA installation seems to crash once a day. It cannot fetch data for my integrations (e.g. Miele, REST, Uhomeupnor, basically everything). Think that error is related to some sort of overflow of all the ādict objectā warningsā¦ but thatās just a guess.
My exact error is just like yours:
2021-04-13 19:44:45 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
I use Home assistant with Zigbee2mqtt-AddOn
Current version: 1.18.2-1
I got following Warnings in Homeasistant Log:
...
2021-04-14 09:24:35 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-14 09:24:36 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-14 09:24:43 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'requested_brightness_level' when rendering '{{ value_json.requested_brightness_level }}'
2021-04-14 09:24:43 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'requested_brightness_percent' when rendering '{{ value_json.requested_brightness_percent }}'
...
They are throwing with different variables (equested_brightness_percent,requested_brightness_level ,linkquality etc.)
They were starting after update to:
core-2021.4.4
I guess, Hassio changed exception handling.
I had an if/else Block, which worked up to core-2021.4.4. Then it throws same Warning
I saw that, but I have no clue where to look to fix this. If I look at my log I see this as an example:
Logger: homeassistant.helpers.template
Source: helpers/template.py:1335
First occurred: 1:26:44 PM (55 occurrences)
Last logged: 1:48:05 PM
Template variable warning: 'dict object' has no attribute 'led_indication' when rendering '{{ value_json.led_indication }}'
Template variable warning: 'dict object' has no attribute 'energy' when rendering '{{ value_json.energy }}'
Template variable warning: 'dict object' has no attribute 'temperature' when rendering '{{ value_json.temperature }}'
Template variable warning: 'dict object' has no attribute 'voltage' when rendering '{{ value_json.voltage }}'
Template variable warning: 'dict object' has no attribute 'current' when rendering '{{ value_json.current }}'
This does not tell what entity is reporting the error, so I have no clue where to go and fix it. My guess is, that this is Zigbee2mqtt entity or entities but I have many entities reporting temperature, and voltage as an example.
I can add to this discussion that in my case Iāve scoured all my files (config, automations, sensors, etc.) and cannot find some templates mentionned in the logsā¦
All the templates I use I have corrected using default value, but there seems to be some entities defined elsewhere (inside plugins ?).
Do we have to wait for the developpers of every plugins to fix them ?
Is anyone else experiencing a breakdown of functionality for Automations using any z2m entities after 2021.4? All devices can be used from HA directly so communication looks fine.
The Release Notes state that this ādict objectā message is a just a warning so Iām not sure if this is the cause or something else. System was rock solid before the upgrade.
Iād upgraded z2m to 1.18.2 at the same time as doing HA to 2021.4; so every possibility that z2m is the real culprit.
Do you still have triggers with a click instead of an action? I think they dropped āclickā by default as it was already deprecated some time ago in favour of āactionā.
Then I donāt know. I would say, do a full restart and if you still have problems go into detail of one of the automations that does not work. For further help I would open a new topic though.
The Warning comes because of a undefined variable from zigbee2mqtt. If I understand well, this is already fixed in the dev and will be in the next minor release in May.
My Code:
I changed the
{% if trigger.event.data.room %}
to:
{% if trigger.event.data.room is defined %}
in every automation, where I need a special room which is not necessarily given or the the satellite name, which always exists.
Hi to everybody, Iām experiencing the same log warnings which in my case are related to mqtt messages sent by a ātasmotizedā PZEM which I mainly use in order to compare the power produced by the solar panels and the in house power consumption. Well no problem until the last HA upgrade while now Iām bombarded with those messages although the power values shown by the PZEM seem to be reasonably correct. I read about the ābreaking changesā concerning the templates but I wouldnāt know how to address the problem especially because the mqtt connection between the PZEM and HA is ābehind the sceneā. Anyone having an idea? Thank you
Federico