Commit graph

84 commits

Author SHA1 Message Date
Manu
7a0b4fc62c
Add support for variant of Xiaomi Mi Air Purifier 3C (zhimi.airp.mb4a) (#126867)
Add model id zhimi.airp.mb4a
2024-09-27 12:00:19 +02:00
epenet
1893545705
Move xiaomi_miio base entity to separate module (#126198) 2024-09-18 10:59:27 +02:00
Paul Bottein
33f0840a26
Add translations for xiaomi miio fan preset modes (#122367) 2024-07-22 11:21:54 +02:00
G Johansson
ca4c617d4b
Add TURN_OFF/TURN_ON feature flags for fan (#121447) 2024-07-19 11:35:24 +02:00
Marc Mueller
3937cc2963
Improve SERVICE_TO_METHOD typing (#120474) 2024-06-26 02:20:48 +02:00
Marc Mueller
c773d57d39
Add empty line after module docstring [w-z] (#112706) 2024-03-08 10:35:45 -05:00
Joost Lekkerkerker
ac53b78a0c
Deduplicate constants A-D (#105638) 2023-12-13 14:21:44 +01:00
Jan Bouwhuis
953a212dd6
Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component (#104560)
* Use ServiceValidationError for fan preset_mode

* Use _valid_preset_mode_or_raise to raise

* Move preset_mode validation to entity component

* Fix bond fan and comments

* Fixes baf, fjaraskupan and template

* More integration adjustments

* Add custom components mock and test code

* Make NotValidPresetModeError subclass

* Update homeassistant/components/fan/strings.json

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

* Keep bond has_action validation

* Move demo test asserts outside context block

* Follow up comment

* Update homeassistant/components/fan/strings.json

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Fix demo tests

* Remove pylint disable

* Remove unreachable code

* Update homeassistant/components/fan/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Use NotValidPresetModeError, Final methods

* Address comments

* Correct docst

* Follow up comments

* Update homeassistant/components/fan/__init__.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-29 13:56:51 +01:00
Jan-Philipp Benecke
be01eb5aad
Explicitly use device name as entity name for Xiaomi fan and humidifier (#95986) 2023-07-06 13:25:34 +02:00
Sebastian Muszynski
2d62735b0d
Fix deprecated asyncio.wait use with coroutines (#94371) 2023-06-11 20:01:41 +02:00
Franck Nijhof
f67ebcade1
Enable Ruff SIM201 (#88171) 2023-02-15 14:43:02 +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
Pete
1f7c90baa0
Fix fan speed regression for some xiaomi fans (#78406)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-17 23:45:31 -04:00
Pete
5d7e9a6695
Fix setting and reading percentage for MIOT based fans (#77626) 2022-09-03 22:55:34 +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
Teemu R
e4f6f738e8
Bump python-miio to 0.5.12 (#75415)
* Bump python-miio to 0.5.12

* Fix imports
2022-07-19 18:56:41 +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
epenet
3c82c718cb
Improve typing in fans and locks (#73901) 2022-06-23 16:34:40 +02:00
epenet
48bd7cf5e1
Add missing ToggleEntity type hints in fans (#73887) 2022-06-23 12:01:05 +02:00
epenet
6b6e5fad3c
Add missing type hints in fans (#73835) 2022-06-22 18:43:41 +02:00
SNoof85
cbcf832436
Fix for Xiaomi miio fan speed (#72027)
Update fan.py
2022-05-20 15:22:38 +02:00
epenet
1ec08d2fe0
Use EntityFeature enum in components (x**) (#69469) 2022-04-07 14:39:09 +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
J. Nick Koston
723dcbafca
Complete fan speed transition from #59781 (#67743) 2022-03-09 10:38:12 +01:00
Teemu R
046c0ae61b
Bump python-miio dependency to 0.5.10 (#66782) 2022-02-18 10:44:31 +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
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
4cdbd3c576
Fix Unable to serialize to JSON error in Xiaomi Miio (#56929) 2021-10-02 09:05:49 +02: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
Maciej Bieniek
bb6f97c4d3
Rework Xiaomi Miio fan platform (#55846) 2021-09-20 14:49:39 +02:00
Maciej Bieniek
86247c93fc
Fix available property for Xiaomi Miio fan platform (#55889)
* Fix available

* Suggested change
2021-09-07 11:34:41 +02:00
Maciej Bieniek
753285eae7
Fix a lazy preset mode update for Xiaomi Miio fans (#55837) 2021-09-06 12:33:34 +02:00
Maciej Bieniek
08a0377dcb
Add support for Xiaomi Miio Air Purifier 3C (#55484) 2021-08-31 16:44:13 +02:00
Maciej Bieniek
f942cb03a4
Fix AttributeError for non-MIOT Xiaomi Miio purifiers (#55271) 2021-08-26 09:29:25 -07: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
Maciej Bieniek
06604728c5
Remove should poll property from Xiaomi Miio fan platform (#55201) 2021-08-25 15:25:46 +02:00
Maciej Bieniek
0c68a54dea
Fix TypeError in Xiaomi Miio fan platform (#55091) 2021-08-23 22:51:29 +02:00
Maciej Bieniek
4a6ca8a04e
Add number platform for Xiaomi Miio fan (#54977) 2021-08-21 19:09:42 +02: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
SmaginPV
07c0fc9eba
Remove deprecated Xiaomi Miio fan speeds (#54182) 2021-08-18 15:53:17 +02:00
Maciej Bieniek
c937a235e1
Add select platform for Xiaomi Miio fans (#54702)
* Add select platform for Xiaomi Miio purifiers

* Add missing condition for AirFresh

* Suggested change

* Remove fan_set_led_brightness from services.yaml

* Remove zhimi.airpurifier.v3
2021-08-18 11:24:15 +02:00
Maciej Bieniek
ebaae8d2bf
Add sensor platform for Xiaomi Miio fans (#54564) 2021-08-15 13:49:29 +02:00
Jan Bouwhuis
5de1adacf7
Xiaomi miio add coordinator to fan platform (#54366)
* init coordinator for airpurifiers and airfresh

* Update fan entities with coordinator

* cache mode and fan_level at user update

* pylint define attributes in _init

* Update homeassistant/components/xiaomi_miio/fan.py

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

* Update homeassistant/components/xiaomi_miio/fan.py

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

* Update homeassistant/components/xiaomi_miio/fan.py

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

* cleanup code

* Set hass.data[DATA_KEY] to enable

* rename to filtered_entities in service handler

* Update homeassistant/components/xiaomi_miio/fan.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* flake

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2021-08-10 14:55:11 +02:00
Jan Bouwhuis
d55c764048
Fix Xiaomi-miio turn fan on with speed, percentage or preset (#54353) 2021-08-09 14:43:59 -07:00
Jan Bouwhuis
0149095824
Fix xiaomi air fresh fan preset modes (#54342) 2021-08-09 20:57:36 +02:00