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
770 stars 702 forks source link

[BUG] TS0501 fan controller reporting null percentage #2290

Open Brazen00 opened 1 year ago

Brazen00 commented 1 year ago

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 image

Device signature ```yaml { "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=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, 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": 260, "device_type": "0x0100", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0202", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZ3210_lzqq3u4r", "model": "TS0501", "class": "zhaquirks.tuya.ts0501_fan_switch.TS0501FanSwitch" } ```
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=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, 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": 260, "device_type": "0x0100", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0202", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "button.fan_controller_office_identify", "name": "_TZ3210_lzqq3u4r TS0501" }, { "entity_id": "fan.fan_controller_office_fan", "name": "_TZ3210_lzqq3u4r TS0501" }, { "entity_id": "light.fan_controller_office_light", "name": "_TZ3210_lzqq3u4r TS0501" } ], "neighbors": [ { "device_type": "Coordinator", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0000", "permit_joining": "Unknown", "depth": "0", "lqi": "125" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x065F", "permit_joining": "Unknown", "depth": "15", "lqi": "160" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x24E9", "permit_joining": "Unknown", "depth": "15", "lqi": "48" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x27A5", "permit_joining": "Unknown", "depth": "15", "lqi": "102" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x3722", "permit_joining": "Unknown", "depth": "15", "lqi": "149" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x4B3F", "permit_joining": "Unknown", "depth": "15", "lqi": "134" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x580E", "permit_joining": "Unknown", "depth": "15", "lqi": "36" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x66A4", "permit_joining": "Unknown", "depth": "15", "lqi": "99" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x740E", "permit_joining": "Unknown", "depth": "15", "lqi": "93" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x8361", "permit_joining": "Unknown", "depth": "15", "lqi": "103" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x9880", "permit_joining": "Unknown", "depth": "15", "lqi": "125" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xA37F", "permit_joining": "Unknown", "depth": "15", "lqi": "109" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xA518", "permit_joining": "Unknown", "depth": "15", "lqi": "79" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Parent", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xAA24", "permit_joining": "Unknown", "depth": "15", "lqi": "255" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xB522", "permit_joining": "Unknown", "depth": "15", "lqi": "88" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xB646", "permit_joining": "Unknown", "depth": "15", "lqi": "184" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xBE9F", "permit_joining": "Unknown", "depth": "15", "lqi": "57" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xC044", "permit_joining": "Unknown", "depth": "15", "lqi": "99" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xC9D9", "permit_joining": "Unknown", "depth": "15", "lqi": "55" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xCB1C", "permit_joining": "Unknown", "depth": "15", "lqi": "140" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xD430", "permit_joining": "Unknown", "depth": "15", "lqi": "168" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xD7BE", "permit_joining": "Unknown", "depth": "15", "lqi": "67" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xDE66", "permit_joining": "Unknown", "depth": "15", "lqi": "138" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xE369", "permit_joining": "Unknown", "depth": "15", "lqi": "120" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xF339", "permit_joining": "Unknown", "depth": "15", "lqi": "137" }, { "device_type": "EndDevice", "rx_on_when_idle": "Off", "relationship": "Child", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xAD11", "permit_joining": "NotAccepting", "depth": "3", "lqi": "203" } ], "routes": [ { "dest_nwk": "0x0000", "route_status": "Active", "memory_constrained": false, "many_to_one": true, "route_record_required": false, "next_hop": "0x0000" }, { "dest_nwk": "0x3722", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x3722" }, { "dest_nwk": "0xCB1C", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0xCB1C" }, { "dest_nwk": "0x580E", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x580E" }, { "dest_nwk": "0x8361", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x8361" }, { "dest_nwk": "0xDE66", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0xDE66" } ], "endpoint_names": [ { "name": "ON_OFF_LIGHT" } ], "user_given_name": "Fan Controller Office", "device_reg_id": "a39dabc9fcdd3691fae440554a0d51f4", "area_id": "b813b8c610604395ab5e589f9f8be62e", "cluster_details": { "1": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "_TZ3210_lzqq3u4r" }, "0x0005": { "attribute_name": "model", "value": "TS0501" } }, "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 } }, "unsupported_attributes": { "0x4003": { "attribute_name": "start_up_on_off" } } }, "0x0202": { "endpoint_attribute": "fan", "attributes": { "0x0000": { "attribute_name": "fan_mode", "value": 2 }, "0x0001": { "attribute_name": "fan_mode_sequence", "value": 0 } }, "unsupported_attributes": {} }, "0xef00": { "endpoint_attribute": "tuya_manufacturer", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```
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.

javicalle commented 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.

Brazen00 commented 1 year ago

Isn’t this it? https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0501_fan_switch.py

javicalle commented 1 year ago

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.

Brazen00 commented 1 year ago

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

Brazen00 commented 10 months ago

This issue is still occurring.

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

Brazen00 commented 4 months ago

This issue is still occurring.