Open Brazen00 opened 1 year ago
There is no ts0501_fan_switch.py
or TS0501FanSwitch
quirk in the code.
Without the code you are using no support can be done.
Ouuuch! My fault. I suppose that my local repo isn't updated.
Can you enable the debug logs (can be done from the ZHA integration) and attach the logs from the good and the bad behavior? Please, also report the sequence of actions to correlate them with the logs.
Ok, sorry for the loooong delay.
I believe this is the log entry sequence for physically pushing the on/off button on the wall fan controller. After this happens, the percentage is being reported as 'null':
2023-07-26 14:01:07.562 DEBUG (MainThread) [bellows.zigbee.application] Received incomingMessageHandler frame with [<EmberIncomingMessageType.INCOMING_UNICAST: 0>, EmberApsFrame(profileId=260, clusterId=514, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_RETRY|APS_OPTION_ENABLE_ROUTE_DISCOVERY: 320>, groupId=0, sequence=169), 124, -69, 0xe338, 255, 255, b'\x18{\n\x00\x000\x04']
2023-07-26 14:01:07.562 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xE338), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=169, profile_id=260, cluster_id=514, data=Serialized[b'\x18{\n\x00\x000\x04'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=124, rssi=-69)
2023-07-26 14:01:07.563 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Received ZCL frame: b'\x18{\n\x00\x000\x04'
2023-07-26 14:01:07.563 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=123, command_id=10, *direction=<Direction.Client_to_Server: 1>)
2023-07-26 14:01:07.564 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Decoded ZCL frame: FanCluster:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=enum8, value=<enum8.undefined_0x04: 4>))])
2023-07-26 14:01:07.564 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Received command 0x0A (TSN 123): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=enum8, value=<enum8.undefined_0x04: 4>))])
2023-07-26 14:01:07.564 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Attribute report received: fan_mode=<enum8.undefined_0x04: 4>
2023-07-26 14:01:07.564 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xE338:1:0x0202]: Attribute report 'Fan Control'[fan_mode] = FanMode.On
2023-07-26 14:01:07.564 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=fan.fan_controller_office_fan, old_state=<state fan.fan_controller_office_fan=off; preset_modes=['on', 'auto', 'smart'], percentage=0, percentage_step=33.333333333333336, preset_mode=None, friendly_name=Fan Controller Office Fan, supported_features=1 @ 2023-07-26T13:59:50.649212+10:00>, new_state=<state fan.fan_controller_office_fan=on; preset_modes=['on', 'auto', 'smart'], percentage=None, percentage_step=33.333333333333336, preset_mode=on, friendly_name=Fan Controller Office Fan, supported_features=1 @ 2023-07-26T14:01:07.564883+10:00>>
and this is the log sequence for subsequently pushing the speed button on the fan. after this, the percentage is reported as 33:
2023-07-26 14:01:19.455 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xE338), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=170, profile_id=260, cluster_id=514, data=Serialized[b'\x18|\n\x00\x000\x01'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=144, rssi=-64)
2023-07-26 14:01:19.455 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Received ZCL frame: b'\x18|\n\x00\x000\x01'
2023-07-26 14:01:19.456 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=124, command_id=10, *direction=<Direction.Client_to_Server: 1>)
2023-07-26 14:01:19.456 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Decoded ZCL frame: FanCluster:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=enum8, value=<enum8.undefined_0x01: 1>))])
2023-07-26 14:01:19.457 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Received command 0x0A (TSN 124): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=enum8, value=<enum8.undefined_0x01: 1>))])
2023-07-26 14:01:19.457 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Attribute report received: fan_mode=<enum8.undefined_0x01: 1>
2023-07-26 14:01:19.457 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xE338:1:0x0202]: Attribute report 'Fan Control'[fan_mode] = FanMode.Low
2023-07-26 14:01:19.457 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=fan.fan_controller_office_fan, old_state=<state fan.fan_controller_office_fan=on; preset_modes=['on', 'auto', 'smart'], percentage=None, percentage_step=33.333333333333336, preset_mode=on, friendly_name=Fan Controller Office Fan, supported_features=1 @ 2023-07-26T14:01:07.564883+10:00>, new_state=<state fan.fan_controller_office_fan=on; preset_modes=['on', 'auto', 'smart'], percentage=33, percentage_step=33.333333333333336, preset_mode=None, friendly_name=Fan Controller Office Fan, supported_features=1 @ 2023-07-26T14:01:07.564883+10:00>>
and finally, switching the fan off using the middle button again:
2023-07-26 14:01:25.532 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xE338), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=171, profile_id=260, cluster_id=514, data=Serialized[b'\x18}\n\x00\x000\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=92, rssi=-77)
2023-07-26 14:01:25.532 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Received ZCL frame: b'\x18}\n\x00\x000\x00'
2023-07-26 14:01:25.532 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=125, command_id=10, *direction=<Direction.Client_to_Server: 1>)
2023-07-26 14:01:25.533 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Decoded ZCL frame: FanCluster:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=enum8, value=<enum8.undefined_0x00: 0>))])
2023-07-26 14:01:25.533 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Received command 0x0A (TSN 125): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=enum8, value=<enum8.undefined_0x00: 0>))])
2023-07-26 14:01:25.533 DEBUG (MainThread) [zigpy.zcl] [0xE338:1:0x0202] Attribute report received: fan_mode=<enum8.undefined_0x00: 0>
2023-07-26 14:01:25.533 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xE338:1:0x0202]: Attribute report 'Fan Control'[fan_mode] = FanMode.Off
2023-07-26 14:01:25.534 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=fan.fan_controller_office_fan, old_state=<state fan.fan_controller_office_fan=on; preset_modes=['on', 'auto', 'smart'], percentage=33, percentage_step=33.333333333333336, preset_mode=None, friendly_name=Fan Controller Office Fan, supported_features=1 @ 2023-07-26T14:01:07.564883+10:00>, new_state=<state fan.fan_controller_office_fan=off; preset_modes=['on', 'auto', 'smart'], percentage=0, percentage_step=33.333333333333336, preset_mode=None, friendly_name=Fan Controller Office Fan, supported_features=1 @ 2023-07-26T14:01:25.534072+10:00>>
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.
This issue is still occurring.
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.
This issue is still occurring.
Describe the bug I have one of these fan controllers https://zigbee.blakadder.com/Mercator_SSWF01G.html
Everything works fine when controlling this through HA. However, when the fan controller is physically activated using the middle "fan on/off" button, the speed percentage is reporting as 'null'. Activating or switching speed using the "fan speed" button correctly sets the percentage in HA.
This was submitted as a HA core issue (https://github.com/home-assistant/core/issues/89413), but reporting here also.
Expected behavior I expect the middle "fan on/off" button to set the speed correctly in HA.
Screenshots
Device signature
```yaml { "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information
```yaml { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.3.5", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.10", "docker": true, "arch": "aarch64", "timezone": "Australia/Brisbane", "os_name": "Linux", "os_version": "5.15.90", "supervisor": "2023.03.1", "host_os": "Home Assistant OS 9.5", "docker_version": "20.10.22", "chassis": "embedded", "run_as_root": true }, "custom_components": { "automate": { "version": "0.9.9", "requirements": [ "aiopulse2==0.8.0" ] }, "hacs": { "version": "1.31.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "localtuya": { "version": "5.0.0", "requirements": [] }, "adaptive_lighting": { "version": "1.4.1", "requirements": [] }, "browser_mod": { "version": "2.2.0", "requirements": [] }, "ui_lovelace_minimalist": { "version": "v1.2.0", "requirements": [ "aiofiles==0.8.0", "aiogithubapi>=22.2.4" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "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" ], "requirements": [ "bellows==0.34.10", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.94", "zigpy-deconz==0.19.2", "zigpy==0.53.2", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.3", "zigpy-znp==0.9.3" ], "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": "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": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 28219, "manufacturer": "_TZ3210_lzqq3u4r", "model": "TS0501", "name": "_TZ3210_lzqq3u4r TS0501", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts0501_fan_switch.TS0501FanSwitch", "manufacturer_code": 4098, "power_source": "Mains", "lqi": 87, "rssi": null, "last_seen": "2023-03-22T10:05:18", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Additional logs
``` Paste any additional debug logs here. Don't remove the extra line breaks outside the ``` marks. ```Additional context Add any other context about the problem here.