Closed ThiSaadeh closed 5 months ago
Change CustomDevice
to EnchantedDevice
(might need to import that). Then, restart HA with the new custom quirk and reconfigure the plug using the UI (or re-pair it).
Then, check if it works. Otherwise, I think your plug doesn't support those attributes for some reason.
Out of curiosity, what's the difference between Custom and Enchanted?
I just did what you recommended, I can see the quirk loaded into the system on the log:
Logger: zhaquirks Source: components/zha/init.py:122 First occurred: 20:35:32 (1 occurrences) Last logged: 20:35:32
Loaded custom quirks. Please contribute them to https://github.com/zigpy/zha-device-handlers
But removing/adding the plug still defaults to the standard Plug implementation, so looking at the re-added plug lists:
Quirk: zhaquirks.tuya.ts011f_plug.Plug
Instead of the one I wrote-up. Did I miss anything? Thanks!
It was missing Endpoint 242, I got it re-added using the custom quirk, but still couldnt get it to work with the Led Status / Last State / Child lock.
Custom and Enchanted?
Enchanted "casts a Tuya spell" when reconfiguring clusters (so during pairing) that Tuya devices need in order to work properly. (They try to detect if they're connected to a Tuya hub)
But removing/adding the plug still defaults to the standard Plug implementation
Well, then you don't need a custom quirk, because an existing one already matches. If child lock and so on don't work, then it's possible that the plug just doesn't support them in the first place.
How are you trying to configure those options? Using the clusters menu (Manage Zigbee device)? If so, make sure to only change the upper text field. Always leave the lower text field completely empty. Can you read the attributes on the Tuya OnOff clusters using the clusters UI?
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.
Bug description
I've recently bought a smart plug from Tuya which is labeled as: "_TZ3000_lotmgthb TS011F", it loads the standard "zhaquirks.tuya.ts011f_plug.Plug", I've noticed that the ENDPOINT and INPUT_CLUSTERS are pretty similar, except that the one in the quirk includes an INPUT as [9] but reading the remainder of the quirks within the same file I couldn't figure out what it stands for, I can write and load custom quirks, but writing my own custom quirk by using others as an example I land at the standard quirk mentioned above.
The issue is, the pug itself only switches on/off but everything else from turning off the led, child lock, etc doesn't work at all.
P.s.: I re-wrote the quirk using the skeleton of a different one that works at home, but honestly it looks exactly the same as the quirk it's already loading on it.
Steps to reproduce
Adding the plug and going through the device settings page trying to change params on it doesnt work, but it doesnt throw errors on the log, it just doesnt affect the unit.
Expected behavior
Led turn-off/turn-on, last state setup or child lock doesn't work on it.
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]Device signature
Device signature
```json "signature": { "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information
Diagnostic information
```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.10.3", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.5", "docker": true, "arch": "aarch64", "timezone": "America/Sao_Paulo", "os_name": "Linux", "os_version": "6.1.21-v8", "supervisor": "2023.10.0", "host_os": "Home Assistant OS 11.0", "docker_version": "24.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "sonoff": { "version": "3.5.2", "requirements": [ "pycryptodome>=3.6.6" ] }, "watchman": { "version": "0.5.1", "requirements": [ "prettytable==3.0.0" ] }, "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] } }, "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", "universal_silabs_flasher" ], "requirements": [ "bellows==0.36.5", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.104", "zigpy-deconz==0.21.1", "zigpy==0.57.2", "zigpy-xbee==0.18.3", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.5", "universal-silabs-flasher==0.0.14", "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": "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": 58737, "manufacturer": "_TZ3000_lotmgthb", "model": "TS011F", "name": "_TZ3000_lotmgthb TS011F", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug", "manufacturer_code": 4417, "power_source": "Mains", "lqi": 144, "rssi": -64, "last_seen": "2023-10-14T19:23:55", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Logs
Logs
```python [Paste the logs here] ```Additional information
This is exactly what I had written: