Commit graph

61 commits

Author SHA1 Message Date
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof
8819634b61
String formatting and max line length - Part 6 (#84525) 2022-12-24 13:19:51 +01:00
an0nfunc
a5890b2374
Support xiaomi_miio Smartmi Air Purifier (zhimi.airpurifier.za1) (#80387) 2022-11-29 10:29:34 +01:00
Alejandro Del Rincón López
b51c434b9d
Add support for Xiaomi Purifier 4 Lite (#79758)
* Added support for Xiaomi Purifier 4 Lite

* Remove favorite level from Xiaomi purifier 4 lite.

* Fix linting

Co-authored-by: borky-git <borky-git@protonmail.com>
2022-10-07 13:48:05 +02:00
epenet
856318b137
Improve entity type hints [x] (#77887) 2022-09-06 14:00:09 +02:00
McYars
7f4c5c04d3
Add Xiaomi Smartmi Fresh Air System XFXTDFR02ZM (#76637) 2022-08-24 15:09:01 +02:00
borky
25d943d272
Add xiaomi air purifier 4 and 4 pro support (#75745)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-07-28 12:38:04 +02:00
Maciej Bieniek
503b31fb15
Migrate Xiaomi Miio to new entity naming style - part 1 (#75350) 2022-07-17 15:15:24 +02:00
epenet
5360e56d09
Remove xiaomi_miio from mypy ignore list (#74669) 2022-07-09 19:59:11 +02:00
starkillerOG
cfe9ea033a
Split miio gateway coordinator (#69755) 2022-05-19 11:14:07 +02:00
epenet
014aadb299
Use new CONF_MODEL core constant (2/3) (#68831)
* Use CONF_MODEL in xiaomi_miio

* Use CONF_MODEL in xiaomi

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-29 11:12:43 +02:00
Igor Pakhomov
0515a8bd2d
Add additional switch for dmaker.airfresh.a1/t2017 to xiaomi_miio (#67033)
* Add additional switch for dmaker.airfresh.a1/t2017 to xiaomi_miio
- Auxiliary heat switch
- Display switch

* Auxiliary heat => Auxiliary Heat

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
2022-03-01 14:15:23 +01:00
Igor Pakhomov
2ffb46dc93
Initial xiaomi_miio support for dmaker.airfresh.a1/t2017 (#66331)
* Initial support for dmaker.airfresh.a1/t2017

* fix typo
2022-02-11 23:28:22 +01:00
epenet
cb135bc889
Add basic type hints to xiaomi_miio (#62889)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-28 00:15:40 +01:00
Robert Hillis
83cb2d11d5
Use enums in xiaomi_miio (#61979) 2021-12-16 22:31:51 +01:00
Maciej Bieniek
43ccf1d967
Handle None values in Xiaomi Miio integration (#58880)
* Initial commit

* Improve _handle_coordinator_update()

* Fix entity_description define

* Improve sensor & binary_sensor platforms

* Log None value

* Use coordinator variable

* Improve log strings

* Filter attributes with None values

* Add hasattr condition

* Update homeassistant/components/xiaomi_miio/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-01 17:40:15 +01:00
Marc Mueller
1e98761f30
Use assignment expressions 15 (#57961) 2021-10-18 14:01:23 +02:00
Maciej Bieniek
b0ff28ceb4
Add entity category to Xiaomi Miio (#57719) 2021-10-14 17:31:25 -07:00
Maciej Bieniek
0044fa9fb9
Add support for pedestal MIOT fans to Xiaomi Miio integration (#56555)
* Add initial support for Xiaomi Fan ZA5

* Add sensor, number and switch platform

* Addionizer switch

* Improve ionizer icon

* Fix parent of XiaomiFanMiot class

* Add another MIOT models

* Fix consts

* Add powersupply attached binary sensor

* Simplify async_create_miio_device_and_coordinator

* Simplify XiaomiGenericFan

* Fix XiaomiFanZA5 parent

* Remove pass

* Remove unused _available variable

* 1C doesn't support direction

* Suggested change

* Use elif

* Clean up oscillation angle

* Fix typo
2021-09-28 10:21:14 +02:00
Jaroslav Hanslík
a4a6bf8a85
New icon names based on MDI 6.1.95 (#56085) 2021-09-11 12:34:31 -07:00
Maciej Bieniek
08a0377dcb
Add support for Xiaomi Miio Air Purifier 3C (#55484) 2021-08-31 16:44:13 +02:00
Maciej Bieniek
b97d131fb3
Add support for Xiaomi Miio pedestal fans (#55114)
Co-authored-by: Teemu R. <tpr@iki.fi>
2021-08-25 12:09:01 -05:00
Teemu R
3048923dc2
Remove deprecated async_setup_platforms() for xiaomi_miio (#54930) 2021-08-20 11:13:58 -07:00
Maciej Bieniek
fe6c896754
Add switch platform for Xiaomi Miio fans (#54834) 2021-08-20 15:12:29 +02:00
Maciej Bieniek
938ec27a86
Add support for MJJSQ humidifiers for Xiaomi MIIO integration (#53807) 2021-08-02 22:08:37 +02:00
Jan Bouwhuis
4a95ed9b7f
Fix Xiaomi-miio switch platform setup (#53739) 2021-07-29 22:10:41 -07:00
Jan Bouwhuis
1e33017db8
Fix Xiaomi humidifier name migration (#53738) 2021-07-29 22:10:16 -07:00
Jan Bouwhuis
781015fb19
Xiaomi_Miio Humidifier rework (#52366)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-28 10:52:43 +02:00
Marc Mueller
7711ac901c
Fix issues after pylint update (#53205) 2021-07-19 20:22:13 -07:00
Marc Mueller
f6b162bc39
Add pylint CodeStyle extension (#53147) 2021-07-19 06:57:06 -07:00
Daniel Hjelseth Høyer
fbad453c89
Pylint 2.9.3 (#52972)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Franck Nijhof
258b388f41
Collection of changing entity properties to class attributes (#51248)
* Collection of changing entity properties to class attributes

* Apply suggestions from code review

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-05-31 10:50:11 +02:00
J. Nick Koston
c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
starkillerOG
b2efcb3c22
Support all Xiaomi Miio gateway switches (#46657)
* Support all gateway switches

* fix checks

* process revieuw

* Update homeassistant/components/xiaomi_miio/switch.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* generilize variable matching

* fix styling

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-15 12:15:34 +01:00
Erik Montnemery
1fc8e32d86
Update integrations t-z to override extra_state_attributes() (#47760) 2021-03-11 20:16:26 +01:00
tkdrob
3baeed3684
Clean up constants (#47323) 2021-03-05 19:08:04 +01:00
starkillerOG
b58f9ce33a
Fix Xiaomi Miio setup of switch entity for lumi.acpartner.v3 (#47345) 2021-03-04 21:53:09 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
starkillerOG
2f9fda73f4
Add config flow to Xiaomi Miio switch (#46179) 2021-02-15 20:11:27 +01:00
Teemu R
bdb71c9159
Only log xiaomi_miio update exceptions once (#41226)
* xiaomi_miio: only log update exceptions once

Replaces #37695

* add som more missed exception logger cases + do not change the control flow as pointed out by @cgtobi

* Use patch&MagickMock from tests.async_mock

* Fix linting for alarm_control_panel

* update the test to verify that the warning on update is only logged when the device was previously available
2020-10-25 01:53:36 +02:00
Matthias Alphart
93a9a11065
Add config validator helper positive_float (#41640) 2020-10-11 22:04:49 +02:00
springstan
e51be33e18
Remove unnecessary should poll from switch classes (#41218) 2020-10-04 21:31:02 +02:00
Jin
4b5d0915a9
Add support for hmi208(xiaomi plug BLE) (#39306)
As this plug has already been supported in [python-miio v5.1](https://github.com/rytilahti/python-miio/releases/tag/0.5.1).
Changes towards xiaomi-miio made for fully supporting this device in HA.
2020-08-28 17:24:14 +02:00
Ville Skyttä
b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Erik Montnemery
066e921a8b
Rename SwitchDevice to SwitchEntity (#34673) 2020-04-26 18:50:37 +02:00
springstan
fca90a8ddc
Improve string formatting v5 (#33697)
* Improve string formatting v5

* Address review comments
2020-04-05 17:48:55 +02:00
Bas Nijholt
c7b2c09a61 Sort imports according to PEP8 for xiaomi_miio (#29677) 2019-12-09 11:42:18 +01:00
Raman Gupta
040fd9c258 Update service domains for xiaomi_miio from base domains to xiaomi_miio domain (#29134)
* move service constants to const.py, move all custom xiaomi_miio services to xiaomi_miio domain

* update service names

* try to fix black error

* try black formatting again

* final black formatting attempt

* update service names to reflect platform

* fix typo
2019-12-02 11:49:39 -08:00
Teemu R
b6c7976477 Add xiaomi_miio chuangmi.plug.hmi206 (#28688)
Related: https://github.com/rytilahti/python-miio/issues/574
2019-11-11 07:59:07 +01:00
Tomasz
f8d3ea20b6 Move imports in xiaomi_miio (#27773)
* move imports in xiaomi_miio

* reorder imports with isort

* fix pylint error

* Rename imports
2019-11-08 18:32:44 +01:00