Skip to content

DeviceFirmwareInfoUpdatedEvent has no handler, so every emission logs "Received unknown event" #844

Description

@garymm

The problem

DeviceFirmwareInfoUpdatedEvent is emitted but no matching handler exists, so every emission logs a WARNING to end users.

_handle_event_protocol dispatches by looking up handle_{event.event} on the receiving object, and warns when it is missing:

https://github.com/zigpy/zha/blob/dev/zha/event.py#L108-L116

DeviceFirmwareInfoUpdatedEvent declares event = ZHA_DEVICE_UPDATED_EVENT ("zha_device_updated_event"):

https://github.com/zigpy/zha/blob/dev/zha/zigbee/device.py#L187-L196

and is emitted from Device.update_firmware_version():

https://github.com/zigpy/zha/blob/dev/zha/zigbee/device.py#L805-L811

handle_zha_device_updated_event is not defined anywhere in this repository. It is also not defined on Home Assistant's ZHADeviceProxy, which subscribes to every device event via self.device.on_all_events(self._handle_event_protocol) and does implement the sibling handlers (handle_zha_device_entity_added_event, handle_zha_device_entity_removed_event, handle_zha_device_configured, ...).

The result is that any device whose reported firmware version changes produces a warning in the Home Assistant log rather than the event being consumed.

Log output

WARNING (MainThread) [zha] Received unknown event: DeviceFirmwareInfoUpdatedEvent(event_type='zha_device_updated_event', event='zha_device_updated_event', old_firmware_version='0x21010005', new_firmware_version='0x42000030')

Expected behaviour

Either a handle_zha_device_updated_event handler consumes the event (e.g. to propagate the new firmware version to the device registry), or the event is not dispatched through a path that warns when it is unhandled.

Versions

  • zha 2.0.1
  • Home Assistant Core 2026.7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions