Hi,
I’m using zigbee2mqtt 2.1.1 along with HA 2025.2.4. I noticed on the 2025.2.4 update that all of my MQTT entities from z2m are no longer providing the last_seen
state and are not passing through elapsed
either.
Below is an example of the state from zigbee2mqtt of one of my bulbs, which contains the last_seen
attribute. I see this full payload being received into HA via MQTT
{
"brightness": 254,
"color_mode": "color_temp",
"color_temp": 274,
"last_seen": "2025-02-17T09:03:24.672Z",
"level_config": {
"on_level": "previous"
},
"linkquality": 42,
"state": "ON",
"update": {
"installed_version": 587814449,
"latest_version": 587814449,
"state": "idle"
},
"update_available": false,
"color_options": null,
"effect": null,
"identify": null,
"power_on_behavior": null
}
However, when viewing the entity in ‘Developer tools’ I can see that the last_seen
attribute is no longer in the YAML for that entity
min_color_temp_kelvin: 2202
max_color_temp_kelvin: 4000
min_mireds: 250
max_mireds: 454
effect_list:
- blink
- breathe
- okay
- channel_change
- finish_effect
- stop_effect
supported_color_modes:
- color_temp
effect: null
color_mode: color_temp
brightness: 255
color_temp_kelvin: 3649
color_temp: 274
hs_color:
- 27.037
- 41.629
rgb_color:
- 255
- 197
- 149
xy_color:
- 0.442
- 0.371
friendly_name: light/office_oli_spot_1
supported_features: 44
This is causing me a bit of a headache as I use this attribute to determine is a device has gone offline or not along with device reporting. (I do not use the ‘availability’ feature in z2m to reduce traffic)
Has anyone else seen this happen? I can confirm the last_seen
configuration is enabled in z2m along with the elapsed
flag set to ‘true’.
Short of setting the attribute manually via a python script, I’m not sure what else I could be doing.