-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS011F by _TZ3000_okaz9tjs #1966
Comments
You are using a local quirk. After reading the related issue not sure which is the quirk content. Have you tried to remove and pair the device again? |
This section on the related issue resolved it You would need enable the local quirk configuration. There are some info for example here: #693 (comment) https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts011f_plug.py class Plug_v2(CustomDevice):
Once added you need to restart HA, remove the device and pair it again. As part of the process, i removed and repaired the device. -which resulted in the correct values being displayed. Ive also tried the reconfiguration option after repairing. |
@dmulcahey Sorry to ping you directly, but I'm not familiar with the energy dashboard. The related quirk just modify:
class TuyaZBMeteringCluster(CustomCluster, Metering):
"""Divides the kWh for tuya."""
MULTIPLIER = 0x0301
DIVISOR = 0x0302
_CONSTANT_ATTRIBUTES = {MULTIPLIER: 1, DIVISOR: 100}
class TuyaZBElectricalMeasurement(CustomCluster, ElectricalMeasurement):
"""Divides the Current for tuya."""
AC_CURRENT_MULTIPLIER = 0x0602
AC_CURRENT_DIVISOR = 0x0603
_CONSTANT_ATTRIBUTES = {AC_CURRENT_MULTIPLIER: 1, AC_CURRENT_DIVISOR: 1000} No Thanks in advanced. |
Not sure what you mean. If it exposes a summation sensor you just need to go to the dashboard and add the device |
@javicalle The quirked device is not setting the multiplier and divisor so the quirk is adding them so the dashboard is shewing the right measurements. The rest is OK Zigbee and is working OK (not all tuyas is very bad ;-)) ). |
User claims that it was possible to add the device to the Energy dashboard before apply the quirk. I'm not familiar with the energy dashboard because I don't have it enabled in my instalation, but I can't see any reason why the behavior would change after applying the quirk. And I am not able to locate where is this functionallity in HA to take a look. |
Restart HA so its loading all things OK and can hocking up the device with the new configuration. |
@Fierydwarf can you do a HA restart and try to add the device again? |
@javicalle Sure. To confirm what you'd want me to do. Remove the device from ZHA, reboot, re-add the device , reboot? |
I'm going to suggest:
At this point, try again to add the device to the Energy dashboard. |
Could be that the device is not avaliable to add to dashboard if already included? |
Unfortunately, removing and re-adding didn't work. I'll just not add it to the energy monitor. At least the numbers are correct. |
Maybe the problem is with the use of a local quirk. |
I have this device and using the information above i created this quirk:- `"""TS011F plug.""" from zigpy.profiles import zha from zhaquirks.const import ( class TuyaZBMeteringCluster(CustomCluster, Metering):
class TuyaZBElectricalMeasurement(CustomCluster, ElectricalMeasurement): class Plug(CustomDevice):
` class TuyaZBMeteringCluster(CustomCluster, Metering): which I understand are for adjusting the incorrect power metering figures, but mine are still way out. It looks like the device has taken the quirk, and added three missing configuration items (backlight mode, child lock and power on state) but I'm not sure what to do to fix the numbers:- |
FYI, for some reason the RMS current values are starting to report correctly, so all that is left is the total summation values. |
I've not added the quirk yet, but I can't add these plugs to the energy dashboard either. Perhaps this is an change that was caused by a newer HA, I'm using Home Assistant 2022.12.1 at the moment |
I have that issue too! I added another plug to test if it I could add it to the energy dashboard with out the quirk and nothing. |
PR? |
PR, a GitHub Pull Request, to take the local quirk and include it in the zigpy standard delivery |
OK, I've added the local quirk as @Fierydwarf has and had a look around. Seems to me the issue is that the plug doesn't support the following atribute
Can anyone instruct me how to make a quirk return this when the device doesn't support it? |
look how the other attributes that is missing from the device is fixed here zha-device-handlers/zhaquirks/tuya/__init__.py Lines 989 to 995 in 071190e
And adding the 0x0300 and the definition is here in the system that is imprted https://github.com/zigpy/zigpy/blob/a5ae12efc6510df9c487e775bef7af8937ad85f5/zigpy/zcl/clusters/smartenergy.py#L208.. The value you shall using i think is 0x00 kWh (Kilowatt Hours) & kW (Kilowatts) in pure binary format .If you need other values look in ZCL R8 Table 10-72. UnitofMeasure Attribute Enumerations .
|
Here you have a couple of examples:
The later one ( |
Resolves issues zigpy#1764 and zigpy#1966
Thanks @javicalle and @MattWestb , I've successfully tested locally and submitted a PR for both this issue and #1764. @Fierydwarf do you want to see if it resolves your HA dashboard issues, for me it has. |
@mattsaxon could you leave code review & your suggestions in pull/2008 - based on issues/2005 there is a need to add |
Id be pleased to take a look, but am away from computer for 3 weeks |
Not sure which PR are you refering. |
Hi, I have a device kind “_TZ3000_okaz9tjs”, I followed the thread, but my device, don’t work well, { |
For reference (as others might be looking for the same quick): |
Previously i had issues with my TS011F by _TZ3000_okaz9tjs Tuya plug not showing the correct values - the issues were resolved here (#1764) by adding quirks.
Now i have another issue - the energy monitoring plug is now not available to the home assistant energy dashboard via Energy Dashboard > Add Device. it was before using quirks to modify the values.
For the device to be avaliable after modifying it using quirks. I hav a few of these plugs and would like to resolve this before adding them
Device signature
Diagnostic information
Additional logs
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: