python-miio
python-miio copied to clipboard
Added initial zhimi.humidifier.ca6 support
See #1884 for more information.
Codecov Report
Attention: Patch coverage is 91.97080%
with 22 lines
in your changes are missing coverage. Please review.
Project coverage is 81.58%. Comparing base (
8643a57
) to head (252e49c
). Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1885 +/- ##
==========================================
+ Coverage 81.41% 81.58% +0.16%
==========================================
Files 193 194 +1
Lines 18636 18857 +221
Branches 4045 4114 +69
==========================================
+ Hits 15173 15384 +211
- Misses 3180 3185 +5
- Partials 283 288 +5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Dear @rytilahti and @syssi , first of all, I have to say that I'm not a professional software developer for a long time. Thus please excuse me for my way of working with GitHub (branching, PR, etc.)
In addition to this PR I have implemented initial support of zhimi.humidifier.ca6
in home-assistant/core in this branch. All zhimi.humidifier.ca6
features work well. Below are a couple of screenshots.
But I can't make PR to home-assistant/core because of the manifest.json
. I have to use custom requirements (see below), which I can't commit to home-assistant/core repo:
"requirements": ["construct==2.10.68", "micloud==0.5", "git+https://github.com/smmoroz/python-miio.git#python-miio==0.6.0"],
So, I don't know how to proceed. Maybe you can backport my changes and release 0.5.13
of python-miio?
Here are a few screenshots from HA:
Sorry for the late reply, but instead of creating a new file to maintain, it would be better to either use
genericmiot
or adapt theairhumidifer_miot
as necessary.
I moved CA6 support to airhumidifer_miot
file. Please review.
I also noticed that in order to support status
command of miiocli,
I need to implement @sensor
and @setting
. This is not yet done. BTW, status
doesn't work even for CA4 devices.
I added @sensor
and @setting
to AirHumidifierMiot
and its subclasses. But I'm not sure I did it in the most elegant way, because I had to use embed
method in subclasses.
+1
+1
Looks much better, thanks. I'm wondering, are these devices so different that they wouldn't fit in the same implementation class?