Skip to content

Make TS011F plugs inherit EnchantedDevice #1833

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

Merged
merged 1 commit into from
Oct 17, 2022
Merged

Conversation

javicalle
Copy link
Collaborator

There are reports that some Blitzwolf SHP 15 plugs (depending on its version) don't report the On/Off update from the physical device. The herdsman-converters lib have 3 implementations for the TS011F plugs, 2 of them 'implements' the EnchantedDevice approach:

My assumption is that the use of the EnchantedDevice cannot be harmful. Also I have not located implementations that could be affected if a device starts to behave in a 'standard' way, but there are no guarantees on what will happen and I do not know the scope (of devices) that the change can affect.

If the change is considered too risky, I can try to narrow it down to only the devices that have been reported, but I'll need to check how to match 2 compatible signatures and ensure priority is resolved in the desired order:

        MODEL: "TS011F",
vs 
        MODELS_INFO: [("TS011F", "_TZ3000_u5u4cakc")],

Fix: #1787

There are reports that some Blitzwolf SHP 15 plugs (depending on its version) don't report the On/Off update from the physical device.
The `herdsman-converters` lib have 3 implementations for the `TS011F` plugs, 2 of them 'implements' the EnchantedDevice approach:
* https://github.com/Koenkk/zigbee-herdsman-converters/blob/96563772e92eb459bf52c10e241c3a725968bcab/devices/tuya.js#L2185

My assumption is that the use of the `EnchantedDevice` cannot be harmful.
Also I have not located implementations that could be affected if a device starts to behave in a 'standard' way, **but** there are no guarantees on what will happen and I do not know the scope (of devices) that the change can affect.

If the change is considered too risky, I can try to narrow it down to only the devices that have been reported, but I'll need to check how to match 2 compatible signatures and ensure priority is resolved in the desired order:
```python
        MODEL: "TS011F",
vs 
        MODELS_INFO: [("TS011F", "_TZ3000_u5u4cakc")],
```
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3260856818

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 80.067%

Totals Coverage Status
Change from base Build 3259514820: 0.0%
Covered Lines: 5969
Relevant Lines: 7455

💛 - Coveralls

@codecov-commenter
Copy link

Codecov Report

Base: 80.06% // Head: 80.06% // No change to project coverage 👍

Coverage data is based on head (4a63df9) compared to base (fceacf1).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1833   +/-   ##
=======================================
  Coverage   80.06%   80.06%           
=======================================
  Files         240      240           
  Lines        7455     7455           
=======================================
  Hits         5969     5969           
  Misses       1486     1486           
Impacted Files Coverage Δ
zhaquirks/tuya/ts011f_plug.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MattWestb
Copy link
Contributor

My experience and is adding it to the class and keep the MODEL and i think we need doing this on all new tuya devices Zigbee and MCU.

First out of the TS011F was the LIDL with updated firmware and more is likely cumming.

Copy link
Contributor

@MattWestb MattWestb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dmulcahey dmulcahey merged commit 3ba3124 into zigpy:dev Oct 17, 2022
@javicalle javicalle deleted the patch-6 branch October 17, 2022 14:35
@yfands
Copy link

yfands commented Oct 17, 2022

Does that mean I can delete ts011f_plug.py from my custom_zha_quirks directory?

Regards Frank

@javicalle
Copy link
Collaborator Author

Does that mean I can delete ts011f_plug.py from my custom_zha_quirks directory?

Not yet.
The PR has been just merged to the code mainstream. It will be included in the next zha-quirks tag/version. There is no a ETA for the version, but for sure will be before the next major HA version (v2022.11).

Sooo, in short: no, but it will be inlcuded in the next HA version.

@MattWestb
Copy link
Contributor

The updated quirk is in released HA 2022.10.5.

So feel free updating HA and also before deleting the "temporary quirk" before doing the install then the local is higher priority then the device is being loaded.

After update look for the quirk is being loaded if its one "standard" or one local quirk and also pleas reporting back if its working OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZHA Blitzwolf SHP 15 energy monitor outlet, on/off switch wont register in Home Assistant
6 participants