Skip to content
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

Add support for Smartmi Standing Fan 3 (zhimi.fan.za5) #1087

Merged
merged 2 commits into from
Aug 15, 2021

Conversation

rnovatorov
Copy link
Contributor

Resolves #788.

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2021

Codecov Report

Merging #1087 (732d012) into master (81b51ab) will increase coverage by 0.03%.
The diff coverage is 80.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1087      +/-   ##
==========================================
+ Coverage   76.04%   76.08%   +0.03%     
==========================================
  Files          75       75              
  Lines        8730     8847     +117     
  Branches      748      759      +11     
==========================================
+ Hits         6639     6731      +92     
- Misses       1909     1930      +21     
- Partials      182      186       +4     
Impacted Files Coverage Δ
miio/fan_miot.py 84.38% <80.31%> (-3.66%) ⬇️
miio/__init__.py 100.00% <100.00%> (ø)
miio/discovery.py 48.64% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81b51ab...732d012. Read the comment docs.

@idantene
Copy link

Tested locally as well - works great! 👏🏻

Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @rnovatorov! I added a couple of comments inline, could you also add some tests to make coverage checks happy? :-)

miio/fan_miot.py Show resolved Hide resolved
miio/fan_miot.py Outdated Show resolved Hide resolved
miio/fan_miot.py Outdated Show resolved Hide resolved
miio/fan_miot.py Outdated Show resolved Hide resolved
@rnovatorov rnovatorov force-pushed the zhimi-fan-za5 branch 6 times, most recently from 4757f77 to 75e6568 Compare August 15, 2021 11:13
Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

I have checked the properties of the other fans and adapted some of the new methods to be similar to the existing ones. If you think that additional changes are required, then could you, please, be more specific about which properties you would like me to edit and how?

I think it's fine, just add tests and we will consolidate it when there will be a common fan base class (#1114 lists some of the upcoming changes to make it easier to interact).

miio/fan_miot.py Show resolved Hide resolved
miio/fan_miot.py Outdated Show resolved Hide resolved
@rnovatorov rnovatorov force-pushed the zhimi-fan-za5 branch 3 times, most recently from a784dab to 9edd995 Compare August 15, 2021 13:03
@rnovatorov
Copy link
Contributor Author

Added the tests. I guess everything is ready now.

Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Just a couple minor things, and this is ready to be merged. Please also update the README.md to include mention about this device.

miio/fan_miot.py Outdated Show resolved Hide resolved
miio/fan_miot.py Outdated Show resolved Hide resolved
miio/fan_miot.py Outdated Show resolved Hide resolved
miio/fan_miot.py Outdated Show resolved Hide resolved
@rnovatorov
Copy link
Contributor Author

Fixed the minor things. Mentioned the device in README.md.

@rytilahti rytilahti merged commit 75ac5fd into rytilahti:master Aug 15, 2021
@rnovatorov rnovatorov deleted the zhimi-fan-za5 branch August 15, 2021 21:13
rytilahti added a commit that referenced this pull request Sep 1, 2021
* Fix usage of deprecated depth for airhumidifer

[Full Changelog](0.5.7...0.5.8)

**Implemented enhancements:**

- vacuum: skip timezone call if there are no timers [\#1122](#1122) ([rytilahti](https://github.com/rytilahti))

**Closed issues:**

- Smart Mi Standing fan 3 \(Xiaomi Pedestal Fan 3, zhimi.fan.za5\) [\#788](#788)

**Merged pull requests:**

- readme: add micloudfaker to list of related projects [\#1127](#1127) ([unrelentingtech](https://github.com/unrelentingtech))
- Update readme with section for related projects [\#1126](#1126) ([rytilahti](https://github.com/rytilahti))
- add lumi.plug.mmeu01 - ZNCZ04LM [\#1125](#1125) ([starkillerOG](https://github.com/starkillerOG))
- Do not use deprecated `depth` property [\#1124](#1124) ([bieniu](https://github.com/bieniu))
- vacuum: remove long-deprecated 'return\_list' for clean\_details [\#1123](#1123) ([rytilahti](https://github.com/rytilahti))
- deprecate Fan{V2,SA1,ZA1,ZA3,ZA4} in favor of model kwarg [\#1119](#1119) ([rytilahti](https://github.com/rytilahti))
- Add support for Smartmi Standing Fan 3 \(zhimi.fan.za5\) [\#1087](#1087) ([rnovatorov](https://github.com/rnovatorov))
@rytilahti rytilahti mentioned this pull request Sep 1, 2021
rytilahti added a commit that referenced this pull request Sep 1, 2021
* Add support for smart mi standing fan 3 (zhimi.fan.za5)
* Fix usage of deprecated depth for airhumidifer

[Full Changelog](0.5.7...0.5.8)

**Implemented enhancements:**

- vacuum: skip timezone call if there are no timers [\#1122](#1122) ([rytilahti](https://github.com/rytilahti))

**Closed issues:**

- Smart Mi Standing fan 3 \(Xiaomi Pedestal Fan 3, zhimi.fan.za5\) [\#788](#788)

**Merged pull requests:**

- readme: add micloudfaker to list of related projects [\#1127](#1127) ([unrelentingtech](https://github.com/unrelentingtech))
- Update readme with section for related projects [\#1126](#1126) ([rytilahti](https://github.com/rytilahti))
- add lumi.plug.mmeu01 - ZNCZ04LM [\#1125](#1125) ([starkillerOG](https://github.com/starkillerOG))
- Do not use deprecated `depth` property [\#1124](#1124) ([bieniu](https://github.com/bieniu))
- vacuum: remove long-deprecated 'return\_list' for clean\_details [\#1123](#1123) ([rytilahti](https://github.com/rytilahti))
- deprecate Fan{V2,SA1,ZA1,ZA3,ZA4} in favor of model kwarg [\#1119](#1119) ([rytilahti](https://github.com/rytilahti))
- Add support for Smartmi Standing Fan 3 \(zhimi.fan.za5\) [\#1087](#1087) ([rnovatorov](https://github.com/rnovatorov))
rytilahti added a commit that referenced this pull request Sep 1, 2021
* Add support for smart mi standing fan 3 (zhimi.fan.za5)
* Fix usage of deprecated depth for airhumidifer

[Full Changelog](0.5.7...0.5.8)

**Implemented enhancements:**

- vacuum: skip timezone call if there are no timers [\#1122](#1122) ([rytilahti](https://github.com/rytilahti))

**Closed issues:**

- Smart Mi Standing fan 3 \(Xiaomi Pedestal Fan 3, zhimi.fan.za5\) [\#788](#788)

**Merged pull requests:**

- readme: add micloudfaker to list of related projects [\#1127](#1127) ([unrelentingtech](https://github.com/unrelentingtech))
- Update readme with section for related projects [\#1126](#1126) ([rytilahti](https://github.com/rytilahti))
- add lumi.plug.mmeu01 - ZNCZ04LM [\#1125](#1125) ([starkillerOG](https://github.com/starkillerOG))
- Do not use deprecated `depth` property [\#1124](#1124) ([bieniu](https://github.com/bieniu))
- vacuum: remove long-deprecated 'return\_list' for clean\_details [\#1123](#1123) ([rytilahti](https://github.com/rytilahti))
- deprecate Fan{V2,SA1,ZA1,ZA3,ZA4} in favor of model kwarg [\#1119](#1119) ([rytilahti](https://github.com/rytilahti))
- Add support for Smartmi Standing Fan 3 \(zhimi.fan.za5\) [\#1087](#1087) ([rnovatorov](https://github.com/rnovatorov))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Smart Mi Standing fan 3 (Xiaomi Pedestal Fan 3, zhimi.fan.za5)
4 participants