-
Notifications
You must be signed in to change notification settings - Fork 721
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
Improve Legrand 064882 cable outlet heat mode #3031
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #3031 +/- ##
==========================================
- Coverage 89.85% 89.85% -0.01%
==========================================
Files 322 322
Lines 10380 10385 +5
==========================================
+ Hits 9327 9331 +4
- Misses 1053 1054 +1 ☔ View full report in Codecov by Sentry. |
dd6f739
to
2de7ca9
Compare
After the cluster changes are cleaned up we should look at converting this to a v2 quirk instead which would remove the need to open a PR in HA. |
|
a3f72de
to
37ef827
Compare
@dmulcahey How does it work with |
Translations will default to the attribute name. Strings.json will still need a HA PR |
I updated to quirk v2.
I also have an issue with tests |
tests will pass after the Zigpy bump I think. |
4058bd2
to
78d691c
Compare
Yeah, some classes like
Yeah, the enum states aren't translatable at the moment. There's this PR: home-assistant/core#109309, but I see some issues with state restoration when coming from an old version (due to
A helper for creating a quirk v2 device is added with #3032 |
78d691c
to
f2176fb
Compare
Yes I was considering this too. I'm not sure my python level is enough for that but I can give a try 🙂 As I know, there is no standard attribute for the preset in the thermostat cluster right? The idea is to map the 6 heat mode into 2 hvac modes and 5 presets :
I already did something similar in my home assistant qubino custom component : https://github.com/piitaya/home-assistant-qubino-wire-pilot |
Correct, at least not one that's mapped to HA presets for the "generic thermostat implementation" in ZHA. (Also, other devices like the Aqara E1 thermostat currently just implements the preset mode (manual, auto, away) as a config select entity. Of course, it would be better if it were added to the climate entity though.) |
Just my 2 cents : Legrand 064882 cable outlet provides a "hard off" state, by toggling the switch in standard mode, that completely turns off the power (ie no power on the L wire) It's a big advantage compared to the other devices I tried because, for example:
What I'm trying to say is that you maybe should keep the 2 different off modes, mapping it for example like that;
|
IMHO, it feels strange to have a climate entity for a device you can't actually set the temperature, just the mode. |
My suggestion #3030 was inspired by the solution I'm actually using: a custom integration for the Heatzy Pilote device. It creates a climate entity (I agree it's weird without temperature setting!). It just have to be ergonomic for the end user I guess, regardless of the entity domain 😉 |
Having that useless big slider, a wrong information ( |
I agree that a climate card is not designed for this case scenario, however we must be sure that giving the wrong class (ie not climate) to a device supposed to drive a heater wouldn't lead to disadvantages in the HA ecosystem, for example in the interactions with other integrations supposed to deal with climate entities (voice assistants, cards or custom cards, or custom integrations designed to work around climate management, etc...) |
Yeah, talking with Paul I realized my only issue is finally the climate card and the more info dialog. If the auto-generated dashboard use a tile card in this situation instead of a climate, then I'm fine with it. |
d201df5
to
f2e0760
Compare
I exposed the mode as a select and not a climate using zha thermostat because it was too complicated and I prefer to have a minimal working solution as many people will want to use the device with ZHA. |
I can also remove the I tried to create a PR to use it as a climate in ZHA but it seems to be to much work as the ZHA Climate is currently linked to the Thermostat Cluster. |
Proposed change
Following #2807
Expose multiple entities :
The pilot wire mode should be replaced by a climate entity but it requires some work on
zha
library.Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black