zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
749 stars 687 forks source link

[BUG] Aqara H1 EU quirk not applied #2994

Closed Mookunicorn closed 2 months ago

Mookunicorn commented 8 months ago

Bug description

Hello everyone !

On the device "lumi.switch.l2aeu1" ("Aqara H1 EU") the temperature indicated is 0.2 which is not the right value at all. On the cluster the temperature displayed is indeed 17.

Any idea how to fix this?

Steps to reproduce

Settings > Device and Services > Zigbee Home Automation > Select "lumi.switch.l2aeu1" called "Interrupteur chambre" > Show Show the temperature sensor & show the temperature in cluster

Expected behavior

The temperature must be the same as that indicated by the cluster

Screenshots/Video

Screenshots/Video ![image](https://github.com/zigpy/zha-device-handlers/assets/6381627/e2375917-4146-4189-8e99-df4e428c6992) ![image](https://github.com/zigpy/zha-device-handlers/assets/6381627/bff754b1-74d0-48df-ba6b-41137f142a6c)

Device signature

Device signature ```json { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0000", "0x0002", "0x0003", "0x0004", "0x0005", "0x0006", "0x0009" ], "output_clusters": [ "0x000a", "0x0019" ] }, "2": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0012", "0xfcc0" ], "output_clusters": [] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "LUMI", "model": "lumi.switch.l2aeu1", "class": "zigpy.device.Device" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.2.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.1", "docker": true, "arch": "x86_64", "timezone": "Europe/Paris", "os_name": "Linux", "os_version": "6.1.74-haos", "supervisor": "2024.01.1", "host_os": "Home Assistant OS 11.5", "docker_version": "24.0.7", "chassis": "vm", "run_as_root": true }, "custom_components": { "zha_toolkit": { "version": "v1.1.8", "requirements": [ "pytz" ] }, "smartlife": { "version": "0.1.0", "requirements": [ "tuya-device-sharing-sdk==0.1.9" ] }, "dyson_local": { "version": "0.16.4-4", "requirements": [ "libdyson==0.8.11" ] }, "espsomfy_rts": { "version": "2.4.0", "requirements": [ "websocket-client==1.4.2" ] }, "hacs": { "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "eufy_security": { "version": "8.0.1", "requirements": [ "websocket-client==1.4.2", "aiortsp==1.3.7" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly", "@TheJulianJES" ], "config_flow": true, "dependencies": [ "file_upload" ], "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp", "universal_silabs_flasher" ], "requirements": [ "bellows==0.38.0", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.111", "zigpy-deconz==0.23.0", "zigpy==0.62.3", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.1", "universal-silabs-flasher==0.0.18", "pyserial-asyncio-fast==0.11" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "0403", "pid": "6015", "description": "*conbee*", "known_devices": [ "Conbee III" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 38496, "manufacturer": "LUMI", "model": "lumi.switch.l2aeu1", "name": "LUMI lumi.switch.l2aeu1", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "quirk_id": null, "manufacturer_code": 4447, "power_source": "Battery or Unknown", "lqi": 236, "rssi": -41, "last_seen": "2024-02-20T17:58:30", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0000", "0x0002", "0x0003", "0x0004", "0x0005", "0x0006", "0x0009" ], "output_clusters": [ "0x000a", "0x0019" ] }, "2": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0012", "0xfcc0" ], "output_clusters": [] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "LUMI", "model": "lumi.switch.l2aeu1" }, "active_coordinator": false, "entities": [ { "entity_id": "button.interrupteur_chambre_identifier", "name": "LUMI lumi.switch.l2aeu1" }, { "entity_id": "light.interrupteur_chambre_lumiere_gauche", "name": "LUMI lumi.switch.l2aeu1" }, { "entity_id": "light.interrupteur_chambre_lumiere_droit", "name": "LUMI lumi.switch.l2aeu1" }, { "entity_id": "sensor.interrupteur_chambre_temperature_de_l_appareil", "name": "LUMI lumi.switch.l2aeu1" }, { "entity_id": "sensor.interrupteur_chambre_rssi", "name": "LUMI lumi.switch.l2aeu1" }, { "entity_id": "sensor.interrupteur_chambre_lqi", "name": "LUMI lumi.switch.l2aeu1" }, { "entity_id": "update.interrupteur_chambre_micrologiciel", "name": "LUMI lumi.switch.l2aeu1" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "ON_OFF_LIGHT" }, { "name": "ON_OFF_LIGHT" }, { "name": "PROXY_BASIC" } ], "user_given_name": "Interrupteur chambre", "device_reg_id": "0cac3e2f427ead2ae43a11acf28a8cca", "area_id": "chambre", "cluster_details": { "1": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0006": { "attribute_name": "date_code", "value": "01-12-2021" }, "0x0004": { "attribute_name": "manufacturer", "value": "LUMI" }, "0x0005": { "attribute_name": "model", "value": "lumi.switch.l2aeu1" } }, "unsupported_attributes": {} }, "0x0002": { "endpoint_attribute": "device_temperature", "attributes": { "0xfffd": { "attribute_name": "cluster_revision", "value": 1 }, "0x0000": { "attribute_name": "current_temperature", "value": 17 }, "0x0010": { "attribute_name": "dev_temp_alarm_mask", "value": 2 }, "0x0014": { "attribute_name": "high_temp_dwell_trip_point", "value": 3 }, "0x0012": { "attribute_name": "high_temp_thres", "value": 75 } }, "unsupported_attributes": { "0xfffe": { "attribute_name": "reporting_status" }, "0x0001": { "attribute_name": "min_temp_experienced" }, "0x0003": { "attribute_name": "over_temp_total_dwell" }, "0x0002": { "attribute_name": "max_temp_experienced" }, "0x0013": { "attribute_name": "low_temp_dwell_trip_point" }, "0x0011": { "attribute_name": "low_temp_thres" } } }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x0000": { "attribute_name": "on_off", "value": 0 } }, "unsupported_attributes": { "0x4003": { "attribute_name": "start_up_on_off" } } }, "0x0009": { "endpoint_attribute": "alarms", "attributes": {}, "unsupported_attributes": { "0xfffe": { "attribute_name": "reporting_status" } } } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } }, "2": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": {}, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x0000": { "attribute_name": "on_off", "value": 0 } }, "unsupported_attributes": { "0x4003": { "attribute_name": "start_up_on_off" } } }, "0x0012": { "endpoint_attribute": "multistate_input", "attributes": { "0xfffd": { "attribute_name": "cluster_revision", "value": 1 }, "0x006f": { "attribute_name": "status_flags", "value": 0 } }, "unsupported_attributes": { "0x0100": { "attribute_name": "application_type" } } }, "0xfcc0": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": {} }, "242": { "device_type": { "name": "PROXY_BASIC", "id": 97 }, "profile_id": 41440, "in_clusters": {}, "out_clusters": { "0x0021": { "endpoint_attribute": "green_power", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

Logs [home-assistant_zha_2024-02-20T17-01-58.450Z.log](https://github.com/zigpy/zha-device-handlers/files/14348943/home-assistant_zha_2024-02-20T17-01-58.450Z.log)

Additional information

No response

TheJulianJES commented 8 months ago

"DeviceTemperature" probably isn't supported on that device then. Some Aqara devices still expose it for some reason. We could just remove it.

Mookunicorn commented 8 months ago

It's a bit surprising since the correct temperature was displayed before I restarted Home Assistant :/

image

I guess I'll have to resolve to remove this sensor.

Mookunicorn commented 8 months ago

"DeviceTemperature" probably isn't supported on that device then. Some Aqara devices still expose it for some reason. We could just remove it.

It seems that after yet another reset of the device, well it works again, I even have new sensors which are "unknown" (I would delete those). I noticed that a Quirks is added to the device, perhaps this is the solution to the problem.

In any case, I thank you for your strength which allowed everything to visibly work.

image

TheJulianJES commented 8 months ago

Oh hmm, it might be an issue that the quirk didn't apply before for some reason. I'll leave this open for now, so I don't forget about it.

github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.