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
719 stars 664 forks source link

ThirdReality Nightlight improper mireds #2911

Closed wez closed 1 month ago

wez commented 7 months ago

Bug description

Not sure if this is the right place to report this, but I found #2643 with the same error message. I see this call to action in the logs:

2024-01-15 12:00:35.027 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xB70B:1:0x0300]: [Min mireds is 0, setting to 153] Please open an issue on the quirks repo to have this device corrected
2024-01-15 12:00:35.028 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xB70B:1:0x0300]: [Min mireds is 0, setting to 153] Please open an issue on the quirks repo to have this device corrected

0xB70B is a Third Reality, Inc Night Light.

Steps to reproduce

reload the integration and see the logs

Expected behavior

To have no warnings in the logs

Screenshots/Video

No response

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=4877, maximum_buffer_size=127, maximum_incoming_transfer_size=242, server_mask=11264, maximum_outgoing_transfer_size=242, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0102", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0008", "0x0012", "0x0300", "0x0400", "0x0500", "0x1000", "0xfc00" ], "output_clusters": [ "0x0019" ] } }, "manufacturer": "Third Reality, Inc", "model": "3RSNL02043Z", "class": "zhaquirks.thirdreality.night_light.Nightlight" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant Container", "version": "2024.1.3", "dev": false, "hassio": false, "virtualenv": false, "python_version": "3.11.6", "docker": true, "arch": "x86_64", "timezone": "America/Phoenix", "os_name": "Linux", "os_version": "5.15.0-91-generic", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "schedule_state": { "version": "0.19.4", "requirements": [ "portion==2.4.0" ] }, "nodered": { "version": "3.1.3", "requirements": [] }, "tesla_custom": { "version": "3.19.5", "requirements": [ "teslajsonpy==3.9.8" ] }, "frigate": { "version": "4.0.1", "requirements": [ "pytz==2022.7" ] }, "span_panel": { "version": "0.0.7", "requirements": [] }, "omnilogic": { "version": "1.0", "requirements": [ "omnilogic==0.5.0" ] }, "openwrt": { "version": "0.0.2", "requirements": [] }, "sutro": { "version": "0.0.1", "requirements": [] }, "purple_power_base": { "version": "1.0.0", "requirements": [] }, "ge_home": { "version": "0.6.8", "requirements": [ "gehomesdk==0.5.23", "magicattr==0.1.6", "slixmpp==1.8.3" ] }, "reolink_cctv": { "version": "0.1.19", "requirements": [ "reolink-ip==0.0.49" ] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "enphase_envoy": { "version": "0.0.19", "requirements": [ "pyjwt", "xmltodict", "httpx", "envoy_utils" ] }, "omnilogic_local": { "version": "0.5.3", "requirements": [ "python_omnilogic_local==0.12.1" ] }, "weatherflow_forecast": { "version": "1.0.5", "requirements": [ "pyweatherflow-forecast==1.0.5" ] } }, "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.37.6", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.109", "zigpy-deconz==0.22.4", "zigpy==0.60.4", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.1", "universal-silabs-flasher==0.0.15", "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": 46859, "manufacturer": "Third Reality, Inc", "model": "3RSNL02043Z", "name": "Third Reality, Inc 3RSNL02043Z", "quirk_applied": true, "quirk_class": "zhaquirks.thirdreality.night_light.Nightlight", "quirk_id": null, "manufacturer_code": 4877, "power_source": "Mains", "lqi": 164, "rssi": -59, "last_seen": "2024-01-15T12:00:50", "available": true, "device_type": "Router", "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=4877, maximum_buffer_size=127, maximum_incoming_transfer_size=242, server_mask=11264, maximum_outgoing_transfer_size=242, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0102", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0008", "0x0012", "0x0300", "0x0400", "0x0500", "0x1000", "0xfc00" ], "output_clusters": [ "0x0019" ] } }, "manufacturer": "Third Reality, Inc", "model": "3RSNL02043Z" }, "active_coordinator": false, "entities": [ { "entity_id": "binary_sensor.master_bath_night_light_motion", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "button.master_bath_night_light_identify", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "light.master_bath_night_light_light", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "number.master_bath_night_light_on_off_transition_time", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "number.master_bath_night_light_on_level", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "number.master_bath_night_light_start_up_current_level", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "number.master_bath_night_light_start_up_color_temperature", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "select.master_bath_night_light_start_up_behavior", "name": "Third Reality, Inc 3RSNL02043Z" }, { "entity_id": "sensor.master_bath_night_light_illuminance", "name": "Third Reality, Inc 3RSNL02043Z" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "COLOR_DIMMABLE_LIGHT" } ], "user_given_name": "Master Bath Night Light", "device_reg_id": "3020543a4309858355f432f715d582ad", "area_id": "master_bathroom", "cluster_details": { "1": { "device_type": { "name": "COLOR_DIMMABLE_LIGHT", "id": 258 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "Third Reality, Inc" }, "0x0005": { "attribute_name": "model", "value": "3RSNL02043Z" } }, "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": 1 }, "0x4003": { "attribute_name": "start_up_on_off", "value": 255 } }, "unsupported_attributes": {} }, "0x0008": { "endpoint_attribute": "level", "attributes": { "0x0000": { "attribute_name": "current_level", "value": 127 }, "0x0011": { "attribute_name": "on_level", "value": 255 }, "0x0010": { "attribute_name": "on_off_transition_time", "value": 0 }, "0x4000": { "attribute_name": "start_up_current_level", "value": 255 } }, "unsupported_attributes": { "0x0012": { "attribute_name": "on_transition_time" }, "0x0013": { "attribute_name": "off_transition_time" }, "0x0014": { "attribute_name": "default_move_rate" } } }, "0x0012": { "endpoint_attribute": "multistate_input", "attributes": {}, "unsupported_attributes": {} }, "0x0300": { "endpoint_attribute": "light_color", "attributes": { "0x400a": { "attribute_name": "color_capabilities", "value": 31 }, "0x4002": { "attribute_name": "color_loop_active", "value": 0 }, "0x0008": { "attribute_name": "color_mode", "value": 0 }, "0x400c": { "attribute_name": "color_temp_physical_max", "value": 65279 }, "0x400b": { "attribute_name": "color_temp_physical_min", "value": 0 }, "0x0007": { "attribute_name": "color_temperature", "value": 65535 }, "0x0000": { "attribute_name": "current_hue", "value": 169 }, "0x0001": { "attribute_name": "current_saturation", "value": 254 }, "0x0003": { "attribute_name": "current_x", "value": 9844 }, "0x0004": { "attribute_name": "current_y", "value": 3981 }, "0x4000": { "attribute_name": "enhanced_current_hue", "value": 43264 }, "0x000f": { "attribute_name": "options", "value": 1 }, "0x4010": { "attribute_name": "start_up_color_temperature", "value": 65535 } }, "unsupported_attributes": {} }, "0x0400": { "endpoint_attribute": "illuminance", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 15264 } }, "unsupported_attributes": {} }, "0x1000": { "endpoint_attribute": "lightlink", "attributes": {}, "unsupported_attributes": {} }, "0x0500": { "endpoint_attribute": "ias_zone", "attributes": { "0x0010": { "attribute_name": "cie_addr", "value": "00:12:4b:00:26:b8:80:77" }, "0x0002": { "attribute_name": "zone_status", "value": 0 }, "0x0001": { "attribute_name": "zone_type", "value": 13 } }, "unsupported_attributes": { "0x0000": { "attribute_name": "zone_state" } } }, "0xfc00": { "endpoint_attribute": null, "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

Logs ``` 2024-01-15 12:00:35.027 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xB70B:1:0x0300]: [Min mireds is 0, setting to 153] Please open an issue on the quirks repo to have this device corrected 2024-01-15 12:00:35.028 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xB70B:1:0x0300]: [Min mireds is 0, setting to 153] Please open an issue on the quirks repo to have this device corrected ```

Additional information

No response

wez commented 7 months ago

Suggestion:

Please open an issue on the quirks repo

Please put the URL to the right place in whatever logs this error!

MattWestb commented 7 months ago

The system is complaining your device is sending attribute that out of Zigbee spec [Min mireds is 0, setting to 153].

Complain to the manufacture that they shall fixing the min and max attribute for color temperature and hope they is fixing it.

TheJulianJES commented 7 months ago

They likely won't, so we can/should "fix" the attributes on the Color cluster ourselves (using a quirk).

MattWestb commented 7 months ago

@TheJulianJES I think it can being good degrading it from warning to info in ZHA then its not critical error only one info to the user and its not many devices that is having this undocumented future.

wez commented 7 months ago

Complain to the manufacture

I'm not going to reach out to the manufacturer: I simply don't have the time, don't have a clue how to reach the right people, and they likely would do nothing in any useful time frame anyway.

If your software already handles this in a useful way, then I'd suggest removing this warning and the directions to open an issue with you. It should be a trace or debug level item at best so that users don't get bothered enough to bother you.

github-actions[bot] commented 1 month 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.