- 
                Notifications
    You must be signed in to change notification settings 
- Fork 53
Open
Labels
bugConfirmed bugConfirmed bug
Description
Bug description
The log outputs this error:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/logbook/processor.py", line 259, in _humanify
    data = describe_event(event_cache_get(row))
  File "/usr/src/homeassistant/homeassistant/components/zha/logbook.py", line 44, in async_describe_zha_event
    zha_device = async_get_zha_device_proxy(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        hass, event.data[ATTR_DEVICE_ID]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ).device
    ^
  File "/usr/src/homeassistant/homeassistant/components/zha/helpers.py", line 1060, in async_get_zha_device_proxy
    zha_gateway_proxy = get_zha_gateway_proxy(hass)
  File "/usr/src/homeassistant/homeassistant/components/zha/helpers.py", line 1039, in get_zha_gateway_proxy
    raise ValueError("No gateway object exists")
ValueError: No gateway object existsSteps to reproduce
This V2 Quirk caused the error:
In the quirk an out cluster is replaced, but when creating a number input for this cluster ZHA integration fails to load. When commenting out ClusterType.Client, ZHA will load again but will not create the entities as it cannot find the cluster
(
    QuirkBuilder("MiaMiaoCe", "MHO-C401N-z")
    .applies_to("Xiaomi", "LYWSD03MMC-z")
    .replaces(CustomUserInterfaceCluster, cluster_type=ClusterType.Client)
    .number(
        CustomUserInterfaceCluster.AttributeDefs.temperature_offset.name,
        CustomUserInterfaceCluster.cluster_id,
        ClusterType.Client,
        min_value=-327.67,
        max_value=327.67,
        step=0.01,
        unit=UnitOfTemperature.CELSIUS,
        translation_key="temperature_offset",
        fallback_name="Temperature offset",
        multiplier=100
    )
    .number(
        CustomUserInterfaceCluster.AttributeDefs.humidity_offset.name,
        CustomUserInterfaceCluster.cluster_id,
        ClusterType.Client,
        min_value=-327.67,
        max_value=327.67,
        step=0.01,
        # unit=PERCENTAGE,
        translation_key="temperature_offset",
        fallback_name="Temperature offset",
        multiplier=100
    )
    .add_to_registry()
)Expected behavior
ZHA loads successfully and creates the number entities
Metadata
Metadata
Assignees
Labels
bugConfirmed bugConfirmed bug