MQTT - Dict Object has no attribute

Tags: #<Tag:0x00007fc41a1e9188>

I’m getting quite a few messages in my log file, which seem to be related to MQTT, and I don’t recall seeing them before updating to 2021.4 today.

Any ideas what’s causing them or now to fix them? Everything seems to be working fine otherwise.

2021-04-08 13:44:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
2021-04-08 13:44:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'

I have these as well. I believe it’s due to the latest Z2M release supporting new attributes (through herdsman) for a bunch of devices. However, those updates only seem to get updated in MQTT when the values actually change. For instance, I was getting it on [xAxis], [yAxis] and [zAxis] on some of my SmartThings multi-purpose sensors. Once I went and actually moved the devices, they started updating their values in MQTT.

In your instance, I’d recommend going into the Z2M interface and checking the link quality of your devices as I bet some of them have ‘N/A’ for LQI and that’s what is killing the template.

Yes, that seems to make sense. It does look like Z2M doesn’t always report/update values - e.g. I have a Z2M aqara button that has just reported a battery update as below, but no linkquality or action is reported there

{"battery":86,"last_seen":"2021-04-08T14:02:40+01:00","voltage":2975}

1 Like

Yeah, I think it’s more of a Z2M issue. This is a cap of two of the same sensors (both SmartThings IM6001-MPP01); One is reporting axis values, while the other one isn’t and it’s causing HA to throw a hissy fit in the logs.

I have 12 of them in total, and upon examination, they are all reporting different values even though they have all reported in within the last hour:

I’ve logged an issue on Github so hopefully it’ll get looked at - MQTT logging errors when attributes missing · Issue #48851 · home-assistant/core (github.com)

2 Likes

Looks like this is more an issue with Zigbee2MQTT than the MQTT integration - see here

1 Like

I got warnings after the April update …
I do not have Zigbee2MQTT…
I personally created manual discovery for my mqtt devices …

I also got this warnings and i have no Zigbee2MQTT. I generate a value template with json attributes. and this causes the warnings.

Could you elaborate this ??
did you fix this somehow ?

If the value template excludes some of the expected values, then it will generate the warning (and later this year, HA will reject it apparently). You can do something like {“attribute”:null} which HA will accept.

This is being fixed in the next release of Z2M too I believe - (Home Assistant: set unknown values to null #6987 by Koenkk · Pull Request #7032 · Koenkk/zigbee2mqtt · GitHub)

Can anyone please be more specific how to fix this?

I have currently 11 (soon 15) xiaomi ble temperature and humidity sensors of which are sending these values to manually made mqtt-sensors via ESP32 running Tasmota.

Now, after the latest update my logging file is full of errors like:


2021-04-14 09:37:22 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC3ae0ef' when rendering '{{ value_json.ATC3ae0ef.Temperature }}'
2021-04-14 09:37:22 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC3ae0ef' when rendering '{{ value_json.ATC3ae0ef.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCd17f48' when rendering '{{ value_json.ATCd17f48.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCd17f48' when rendering '{{ value_json.ATCd17f48.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC4a2dcc' when rendering '{{ value_json.ATC4a2dcc.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC4a2dcc' when rendering '{{ value_json.ATC4a2dcc.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC37967e' when rendering '{{ value_json.ATC37967e.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC37967e' when rendering '{{ value_json.ATC37967e.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCc931e6' when rendering '{{ value_json.ATCc931e6.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCc931e6' when rendering '{{ value_json.ATCc931e6.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCab8345' when rendering '{{ value_json.ATCab8345.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCab8345' when rendering '{{ value_json.ATCab8345.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCbe98b3' when rendering '{{ value_json.ATCbe98b3.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCbe98b3' when rendering '{{ value_json.ATCbe98b3.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC22312b' when rendering '{{ value_json.ATC22312b.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC22312b' when rendering '{{ value_json.ATC22312b.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC0eea4b' when rendering '{{ value_json.ATC0eea4b.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC0eea4b' when rendering '{{ value_json.ATC0eea4b.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC3ae0ef' when rendering '{{ value_json.ATC3ae0ef.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATC3ae0ef' when rendering '{{ value_json.ATC3ae0ef.Humidity }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCf09d9d' when rendering '{{ value_json.ATCf09d9d.Temperature }}'
2021-04-14 09:37:23 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'ATCf09d9d' when rendering '{{ value_json.ATCf09d9d.Humidity }}'

So, what should I change on my template sensor definition? Now, they are like this:

  - platform: mqtt
    state_topic: "tele/tasmota_3C8F18/SENSOR"
    name: "Hobby temperature"
    value_template: "{{ value_json.ATC37967e.Temperature }}"
    device_class: temperature
    unit_of_measurement: "°C"
  - platform: mqtt
    state_topic: "tele/tasmota_3C8F18/SENSOR"
    name: "Hobby humidity"
    value_template: "{{ value_json.ATC37967e.Humidity }}"
    device_class: humidity
    unit_of_measurement: "%"

See my post above - it’s because you are sending either Temperature or Humidity in the MQTT message, but the other is missing, so it’s complaining that it can’t see it. Either ensure you are sending both (even if null), or use separate topics for each.

Well. Do not know how to fix that, since that is the way Tasmota is sending those messages?
Or does anyone know can this be configured differently in Tasmota?

I have the same issue. Logs filling up:

2021-04-15 20:55:32 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:56:02 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:56:32 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:57:02 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:57:32 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:58:02 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:58:32 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:59:02 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 20:59:32 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 21:00:02 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 21:00:32 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2021-04-15 21:01:02 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sonnen' when rendering '{{ value_json.sonnen }}'
2

Configuration:

    # Sonnen Battery 
  - platform: rest
    name: JSON sonnen
    json_attributes:
      - Consumption_W
      - GridFeedIn_W
      - Production_W
      - USOC
      - Uac
    resource: http://192.168.99.9:8080/api/v1/status
    value_template: '{{ value_json.sonnen }}'
  - platform: template
    sensors:
      sonnen_power_consumption:
        friendly_name: 'Power Consumption W'
        value_template: '{{ states.sensor.json_sonnen.attributes["Consumption_W"] }}'
        unit_of_measurement: watt
      sonnen_power_supply:
        friendly_name: 'Electricity Feed In W'
        value_template: '{{ states.sensor.json_sonnen.attributes["GridFeedIn_W"] }}'
        unit_of_measurement: watt
      sonnen_power_generation:
        friendly_name: 'Power Generation W'
        value_template: '{{ states.sensor.json_sonnen.attributes["Production_W"] }}'
        unit_of_measurement: watt
      sonnen_electricity_storage:
        friendly_name: 'Remaining Charge %'
        value_template: '{{ states.sensor.json_sonnen.attributes["USOC"] }}'
      sonnen_alternating_current:
        friendly_name: 'UAC'
        value_template: '{{ states.sensor.json_sonnen.attributes["Uac"] }}'
        unit_of_measurement: volt

Typical data:

{"Apparent_output":730,"BackupBuffer":"0","BatteryCharging":false,"BatteryDischarging":true,"Consumption_Avg":735,"Consumption_W":720,"Fac":49.997001647949219,"FlowConsumptionBattery":true,"FlowConsumptionGrid":false,"FlowConsumptionProduction":false,"FlowGridBattery":true,"FlowProductionBattery":false,"FlowProductionGrid":false,"GridFeedIn_W":7,"IsSystemInstalled":1,"OperatingMode":"2","Pac_total_W":727,"Production_W":0,"RSOC":54,"RemainingCapacity_W":5353,"Sac1":730,"Sac2":null,"Sac3":null,"SystemStatus":"OnGrid","Timestamp":"2021-04-15 20:58:32","USOC":51,"Uac":242,"Ubat":49}

Not sure what the fix is?
Rob

Can anyone issue me of how to fix the first error from the list?

error

Template variable warning: 'dict object' has no attribute '4/28/2021' when rendering '{% set today = as_timestamp(now() + timedelta(days = 11))|timestamp_custom('%-m/%d/%Y', true ) %} {% set delivery = value_json.MAJOR_JP.jcb[ today ] %} {{ delivery }}'

code

  - platform: command_line
    name: Deliveryin2week
    command: 'cat /config/www/data/days.json'
    value_template: >
      {% set today = as_timestamp(now() + timedelta(days = 11))|timestamp_custom('%-m/%d/%Y', true ) %}
      {% set delivery =  value_json.MAJOR_JP.jcb[ today ] %}
      {{ delivery }}
    scan_interval: 14400

Also, I have these other warnings I do not know where it is located. How to track it down?

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 }}'
Template variable warning: 'dict object' has no attribute 'requested_brightness_level' when rendering '{{ value_json.requested_brightness_level }}'
Template variable warning: 'dict object' has no attribute 'requested_brightness_percent' when rendering '{{ value_json.requested_brightness_percent }}'

I assume you’re using Zigbee2MQTT? The click/action/brightness warnings should be fixed in an upcoming release.

The first bit seems to be saying that you’re trying to populate a value in an attribute called ‘4/8/2021’, which I’m guessing is incorrect. That sounds like the value your trying to assign and not the name of the attribute, so it looks like you have things the wrong way around.

I assume you’re using Zigbee2MQTT? The click/action/brightness warnings should be fixed in an upcoming release.

Yes, Great news.

The first bit seems to be saying that you’re trying to populate a value in an attribute called ‘4/8/2021’, which I’m guessing is incorrect.

I’ve looked at the days.json file and there is no 4/28/2021 attribute, but the sensor is scanning 11 days ahead which was 4/28/2021 for any data, but there wasn’t such a date to report.

Same problem here
However, If I take a look at the logs, it appears that those messages are comming from my boiler, connected with ems-esp to mqtt to hass.

So I don’t think this is an zigbee2mqtt issue.
(Although I’m also running z2m)

Anybody an idea how to resolve this. I have approx 10.000 log records/hour. Destroying my sd-card on my pi… :frowning:


2021-04-17 19:36:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'maintenance' when rendering '{{value_json.maintenance}}'
2021-04-17 19:36:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'wWSetPumpPower' when rendering '{{value_json.wWSetPumpPower}}'
2021-04-17 19:36:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'wwMixTemperature' when rendering '{{value_json.wwMixTemperature}}'
2021-04-17 19:36:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'wwBufferTemperature' when rendering '{{value_json.wwBufferTemperature}}'
2021-04-17 19:36:06 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'floordry' when rendering '{{value_json.floordry}}'
2021-04-17 19:36:06 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'floordrytemp' when rendering '{{value_json.floordrytemp}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'pumpMod2' when rendering '{{value_json.pumpMod2}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'switchTemp' when rendering '{{value_json.switchTemp}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'boilTemp' when rendering '{{value_json.boilTemp}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'exhaustTemp' when rendering '{{value_json.exhaustTemp}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'setFlowTemp' when rendering '{{value_json.setFlowTemp}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'setBurnPow' when rendering '{{value_json.setBurnPow}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'upTimeControl' when rendering '{{value_json.upTimeControl}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'upTimeCompHeating' when rendering '{{value_json.upTimeCompHeating}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'upTimeCompCooling' when rendering '{{value_json.upTimeCompCooling}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'upTimeCompWw' when rendering '{{value_json.upTimeCompWw}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'heatingStarts' when rendering '{{value_json.heatingStarts}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'coolingStarts_' when rendering '{{value_json.coolingStarts_}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'wWStarts2' when rendering '{{value_json.wWStarts2}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgConsTotal' when rendering '{{value_json.nrgConsTotal}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'auxElecHeatNrgConsTotal_' when rendering '{{value_json.auxElecHeatNrgConsTotal_}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'auxElecHeatNrgConsHeating' when rendering '{{value_json.auxElecHeatNrgConsHeating}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'auxElecHeatNrgConsDHW' when rendering '{{value_json.auxElecHeatNrgConsDHW}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgConsCompTotal' when rendering '{{value_json.nrgConsCompTotal}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgConsCompHeating' when rendering '{{value_json.nrgConsCompHeating}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgConsCompWw' when rendering '{{value_json.nrgConsCompWw}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgConsCompCooling' when rendering '{{value_json.nrgConsCompCooling}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgSuppTotal_' when rendering '{{value_json.nrgSuppTotal_}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgSuppHeating' when rendering '{{value_json.nrgSuppHeating}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgSuppWw' when rendering '{{value_json.nrgSuppWw}}'
2021-04-17 19:36:15 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'nrgSuppCooling' when rendering '{{value_json.nrgSuppCooling}}'

The issue is that HA is expecting ALL the attributes for a device to be passed in the MQTT message, and some of them are missing. HA now issues a warning message for this and, in the future, will error (apparently).
The fix is to ensure that all the attributes are passed or, if not, a null value is passed instead (e.g. {“switchTemp”:null}

This is also what is causing the issues with Zigbee2MQTT as devices don’t always send all attribute values, so Z2M is being updated to pass a null value in those cases too.

Problem is: how can I do this practically? I connect my ems-esp. Happy with autodiscovery but not so happy with the errors.
I’m not willing to rewrite the ems-esp code… :wink: