Zigbee2mqtt v2.1.3 & openHAB 4.3.3

  • Platform information:
    • Hardware: iN305/32GB/512GB SSD
    • OS: docker: openhab/openhab:latest (4.3.3)
    • Java Runtime Environment: embedded
    • openHAB version: 4.3.3
  • Issue of the topic:

I appreciate all of the hard work that goes into making openHAB a reality. This is a fantastic product which should make all of the contributors proud. I appreciate how inclusive this community is and how helpful everyone is in the forums.

I’m getting quite a few of these in my openhab.log


2025-03-11 16:57:41.861 [WARN ] [l.HomeAssistantChannelTransformation] - Applying template {"latest_version":"{{ value_json['update']['latest_version'] }}","installed_version":"{{ value_json['update']['installed_version'] }}","update_percentage":{{ value_json['update'].get('progress', 'null') }},"in_progress":{{ (value_json['update']['state'] == 'updating')|lower }}} for component update/0x282c02bfffedf40a/update failed: Cannot find method get with 2 parameters in class com.hubspot.jinjava.objects.collections.SizeLimitingPyMap (class com.hubspot.jinjava.interpret.FatalTemplateErrorsException)

My Thing definition (automagically discovered and created) is:

UID: mqtt:homeassistant:8fd56e1f3c:zigbee2mqtt_5F0x282c02bfffedf40a
label: ThirdReality-Outlet-T2
thingTypeUID: mqtt:homeassistant_zigbee2mqtt_5F0x282c02bfffedf40a
configuration:
  topics:
    - select/0x282c02bfffedf40a/power_on_behavior
    - sensor/0x282c02bfffedf40a/ac_frequency
    - sensor/0x282c02bfffedf40a/current
    - sensor/0x282c02bfffedf40a/energy
    - sensor/0x282c02bfffedf40a/last_seen
    - sensor/0x282c02bfffedf40a/linkquality
    - sensor/0x282c02bfffedf40a/power
    - sensor/0x282c02bfffedf40a/power_factor
    - sensor/0x282c02bfffedf40a/voltage
    - switch/0x282c02bfffedf40a/switch
    - update/0x282c02bfffedf40a/update
  basetopic: homeassistant
bridgeUID: mqtt:broker:8fd56e1f3c
channels:
  - id: last_seen
    channelTypeUID: mqtt:ha-string-advanced
    label: Last seen
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"device_class":"timestamp","enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:clock","name":"Last
          seen","object_id":"thirdreality-outlet-t2_last_seen","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_last_seen_zigbee2mqtt","value_template":"{{
          value_json.last_seen }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - last_seen
  - id: linkquality
    channelTypeUID: mqtt:ha-number-advanced
    label: Linkquality
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"Linkquality","object_id":"thirdreality-outlet-t2_linkquality","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{
          value_json.linkquality }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - linkquality
  - id: current
    channelTypeUID: mqtt:ha-number-advanced
    label: MQTT Sensor
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"device_class":"current","enabled_by_default":false,"entity_category":"diagnostic","object_id":"thirdreality-outlet-t2_current","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_current_zigbee2mqtt","unit_of_measurement":"A","value_template":"{{
          value_json.current }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - current
  - id: ac_frequency
    channelTypeUID: mqtt:ha-number-advanced
    label: MQTT Sensor
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"device_class":"frequency","enabled_by_default":false,"entity_category":"diagnostic","object_id":"thirdreality-outlet-t2_ac_frequency","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_ac_frequency_zigbee2mqtt","unit_of_measurement":"Hz","value_template":"{{
          value_json.ac_frequency }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - ac_frequency
  - id: power
    channelTypeUID: mqtt:ha-number
    label: MQTT Sensor
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"device_class":"power","enabled_by_default":true,"entity_category":"diagnostic","object_id":"thirdreality-outlet-t2_power","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_power_zigbee2mqtt","unit_of_measurement":"W","value_template":"{{
          value_json.power }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - power
  - id: voltage
    channelTypeUID: mqtt:ha-number-advanced
    label: MQTT Sensor
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","object_id":"thirdreality-outlet-t2_voltage","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_voltage_zigbee2mqtt","unit_of_measurement":"V","value_template":"{{
          value_json.voltage }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - voltage
  - id: energy
    channelTypeUID: mqtt:ha-number
    label: MQTT Sensor
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"device_class":"energy","enabled_by_default":true,"object_id":"thirdreality-outlet-t2_energy","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_class":"total_increasing","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_energy_zigbee2mqtt","unit_of_measurement":"kWh","value_template":"{{
          value_json.energy }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - energy
  - id: power_factor
    channelTypeUID: mqtt:ha-number-advanced
    label: Power factor
    configuration:
      component: sensor
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"enabled_by_default":false,"entity_category":"diagnostic","name":"Power
          factor","object_id":"thirdreality-outlet-t2_power_factor","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_power_factor_zigbee2mqtt","value_template":"{{
          value_json.power_factor }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - power_factor
  - id: power_on_behavior
    channelTypeUID: mqtt:ha-string
    label: Power-on behavior
    configuration:
      component: select
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/ThirdReality-Outlet-T2/set/power_on_behavior","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"entity_category":"config","icon":"mdi:power-settings","name":"Power-on
          behavior","object_id":"thirdreality-outlet-t2_power_on_behavior","options":["off","previous","on"],"origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_power_on_behavior_zigbee2mqtt","value_template":"{{
          value_json.power_on_behavior }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - power_on_behavior
  - id: switch
    channelTypeUID: mqtt:ha-switch
    label: ThirdReality-Outlet-T2
    configuration:
      component: switch
      config:
        - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
          value_json.state
          }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{
          value_json.state
          }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/ThirdReality-Outlet-T2/set","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third
          Reality","model":"Zigbee / BLE smart plug with
          power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"name":null,"object_id":"thirdreality-outlet-t2","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_switch_zigbee2mqtt","value_template":"{{
          value_json.state }}"}'
      nodeid: "0x282c02bfffedf40a"
      objectid:
        - switch

Claude.ai has suggested making modifications to the Thing definition (which would mean going back to manually/textual .things, with something like this:

- id: update
  channelTypeUID: mqtt:ha-string-advanced
  label: Update
  configuration:
    component: update
    config:
      - '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/ThirdReality-Outlet-T2/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x282c02bfffedf40a"],"manufacturer":"Third Reality","model":"Zigbee / BLE smart plug with power","model_id":"3RSP02028BZ","name":"ThirdReality-Outlet-T2","sw_version":"v1.00.74","via_device":"zigbee2mqtt_bridge_0xe0798dfffeb31d63"},"entity_category":"diagnostic","name":"Update","object_id":"thirdreality-outlet-t2_update","origin":{"name":"Zigbee2MQTT","sw":"2.1.3","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/ThirdReality-Outlet-T2","unique_id":"0x282c02bfffedf40a_update_zigbee2mqtt","value_template":"{{ value_json[\"update\"][\"progress\"] if value_json[\"update\"][\"progress\"] is defined else (value_json[\"update\"][\"state\"] if value_json[\"update\"][\"state\"] is defined else \"\") }}"}'
    nodeid: "0x282c02bfffedf40a"
    objectid:
      - update

or

updating my zigbee2mqtt config.yaml to something like this:

homeassistant:
  discovery_topic: homeassistant
  status_topic: homeassistant/status
  legacy_entity_attributes: false
  legacy_triggers: false
  device_registry: true
  # Add this section for customizing the update entity format
  device_automation: true
  customization:
    device_reg:
      "0x282c02bfffedf40a":  # Your ThirdReality-Outlet's IEEE address
        update:
          enabled: false  # This disables the update entity completely
          # Or alternatively, use a simplified format
          # value_template: "{{ value_json['state'] }}"

Neither of these options is very appealing to me because they both require a high degree of manual configuration across a large number of devices. I’m looking for a third way, or, I’m looking for a way to configure this for at least 20 devices without having to make manual adjustments for all of them. Or… maybe I just need to ignore them…

See also here https://github.com/openhab/openhab-addons/issues/18219

It won’t stop it from happening in the back end but you should be able to just edit your log4j2.xml in userdata/etc to filter them out like this:

<RollingFile fileName="${sys:openhab.logdir}/openhab.log" filePattern="${sys:openhab.logdir}/openhab.log.%i.gz" name="LOGFILE">
			<RegexFilter onMatch="DENY" onMismatch="NEUTRAL" regex=".*(Applying template).*"/>
			<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>

if you have multiple things you want to filter out, just put a | between them like this:

<RegexFilter onMatch="DENY" onMismatch="NEUTRAL" regex=".*(Applying template|whatever else|something else too).*"/>

I have a bunch of filters for my more chatty things and items that I don’t care about like weather and it works great.

Note that it won’t do anything for the new built in log viewer, that ignores that filter and i’ve not been able to figure out how to do similar filtering with that.

Thanks folks. Appreciate the responses. Both answers are correct. Any guidance on which I should mark as “the” Solution?