Skip to content

[Device Support Request] Aqara Ceiling light T1M #3066

Closed as not planned
@corvis

Description

@corvis

Problem description

Device works fine in general both main light and rgb ring were identified automatically and work fine. However there is not power_outage_memory which is pretty important to me.

Device identifies itself as lumi.light.acn032.

Solution description

I noticed zigbee2mqtt added this recently. So I tried to replicate this:
image

With a quirk like this:

class LumiBasicCluster(CustomCluster, Basic):
    """Hue Motion Basic cluster."""
    manufacturer_id_override = 4447

    attributes = BasicCluster.attributes.copy()
    attributes[0xFF19] = ZCLAttributeDef(
        id=0xFF19, type=t.Bool, access=ZCLAttributeAccess.Write, is_manufacturer_specific=True,
        name="power_outage_memory"
    )


class LumiLightAcn032(XiaomiCustomDevice):
    """
    Aqara Light T1M (ceiling light with RGB ring).
    This quirk adds support for power on behavior by adding the power_outage_memory attribute, the rest works out
    of the box.

    It MIGHT also work for the Model T1 (acn031) but it has not been tested.
    """
    signature = {
        MODELS_INFO: [("Aqara", "lumi.light.acn032"), ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.COLOR_DIMMABLE_LIGHT,
                INPUT_CLUSTERS: [
                    BasicCluster.cluster_id,  # 0x0000
                    Identify.cluster_id,  # 0x0003
                    Groups.cluster_id,  # 0x0004
                    Scenes.cluster_id,  # 0x0005
                    OnOff.cluster_id,  # 0x0006
                    LevelControl.cluster_id,  # 0x0008
                    Color.cluster_id,  # 0x0300
                    OppleClusterLightGen2.cluster_id,  # 0xFCC0 - manufacturer specific
                ],
                OUTPUT_CLUSTERS: [
                    Time.cluster_id,  # 0x000A
                    Ota.cluster_id,  # 0x0019
                ],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.COLOR_DIMMABLE_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,  # 0x0003
                    Groups.cluster_id,  # 0x0004
                    Scenes.cluster_id,  # 0x0005
                    OnOff.cluster_id,  # 0x0006
                    LevelControl.cluster_id,  # 0x0008
                    Color.cluster_id,  # 0x0300
                    0xFCC0,  # 0xFCC0 - manufacturer specific
                ],
                OUTPUT_CLUSTERS: [],
            }
        }
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.COLOR_DIMMABLE_LIGHT,
                INPUT_CLUSTERS: [
                    LumiBasicCluster,
                    Identify.cluster_id,  # 0x0003
                    Groups.cluster_id,  # 0x0004
                    Scenes.cluster_id,  # 0x0005
                    OnOff.cluster_id,  # 0x0006
                    LevelControl.cluster_id,  # 0x0008
                    Color.cluster_id,  # 0x0300
                    0xFCC0,
                ],
                OUTPUT_CLUSTERS: [
                    Time.cluster_id,  # 0x000A
                    Ota.cluster_id,  # 0x0019
                ],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.COLOR_DIMMABLE_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,  # 0x0003
                    Groups.cluster_id,  # 0x0004
                    Scenes.cluster_id,  # 0x0005
                    OnOff.cluster_id,  # 0x0006
                    LevelControl.cluster_id,  # 0x0008
                    Color.cluster_id,  # 0x0300
                    # OppleClusterLightGen2,
                    0xFCC0,
                ],
                OUTPUT_CLUSTERS: [],
            }
        }
    }

Unfortunately it doesn't work. When I send set attribute message the response is UNSUPPORTED ATTRIBUTE.

Maybe my quirk is incorrect and it doesn't replicate zigbee2mqtt behavior, or maybe someone has any ideas how to fix this? any help will be highly appertained.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssue is inactivate and might get closed soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions