Commit Graph

28 Commits (7e7267f8229e8429e09b8177784b5e52b0abef93)

Author SHA1 Message Date
starkillerOG 78dabc83ec
Add Xiaomi Miio zhimi.airpurifier.mc2 (#48840)
* add zhimi.airpurifier.mc2

* fix issort
2021-04-08 13:40:29 +02:00
billsq 55db855f91
Add support for Xiaomi Air Purifier Pro H (#47601) 2021-03-16 20:54:13 +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
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 7dc9071776
Add Xiaomi Miio fan config flow (#46866)
* Miio fan config flow

* fix styling and imports

* Update homeassistant/components/xiaomi_miio/fan.py

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

* Update homeassistant/components/xiaomi_miio/fan.py

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

* Update homeassistant/components/xiaomi_miio/fan.py

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

* Update homeassistant/components/xiaomi_miio/fan.py

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

* Update homeassistant/components/xiaomi_miio/fan.py

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

* rename device -> entity

* fix indent

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-25 04:25:06 +01:00
J. Nick Koston 068d1b5eb8
Separate fan speeds into percentages and presets modes (#45407)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: John Carr <john.carr@unrouted.co.uk>
2021-01-27 17:44:36 -06:00
Anton Palgunov d3f952f831
Add new air-humidifier device CA4 with miot protocol (#39398)
* Add new air-humidifier device CA4 with miot protocol

* Update homeassistant/components/xiaomi_miio/fan.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* xiomi_miio fan Standard speed for fan, removed static attributes

* xiomi_miio fan Standard speed for fan, removed static attributes

* xiomi_miio fan unnessary elif

* added mode_mapping

* Changed mode_mapping to constant also move reverse to constant

* Removerd water_level

* Return to exclude breaking changes

Co-authored-by: Teemu R. <tpr@iki.fi>
2020-11-19 21:56:53 +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
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
Alexander Hardwicke 368116d242
Give fan and remote components unique LED strings (#37605) 2020-07-08 15:29:51 -04:00
Andrey Kupreychik 912eb321d9
Add support for Mi AirPurifier 3 (#31729)
* Adding support for Mi AirPurifier 3

* Adding support for Mi AirPurifier 3H

* Enabled setting fan level for AirPurifier 3/3H

* Get rid of isinstance for MIOT AirPurifier

* Bumping xiaomi-miio dependency

* Fixed lint error

* Update manifest.json

* Fixed requirements files for 0.5.0.1

Co-authored-by: Piotr Król <Piotr@gorszyportal.pl>
2020-04-03 16:32:18 +02:00
Franck Nijhof f5d4878992 Fix isort on a small set of misc files (#29803) 2019-12-10 09:25:42 +01: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
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
Sebastian Muszynski 5b96704c4a Use dict[key] for required config keys (#28304)
* Use dict[key] for required config keys

* Change CONF_NAME too because it has a default
2019-10-29 01:45:22 +01:00
Sebastian Muszynski a0f764cf6d Remove blocking I/O from the event loop (#28305) 2019-10-29 01:44:26 +01:00
Sebastian Muszynski 5c01dd483f Add Xiaomi Air Humidifier CB1 (zhimi.humidifier.cb1) support (#27232) 2019-10-05 13:31:10 -07:00
Kevin Eifinger 04ead6f273 move ATTR_MODE to homeassistant.const (#27118) 2019-10-02 09:33:47 -07:00
Franck Nijhof dae6895a95 Use literal string interpolation in integrations X-Z (f-strings) (#26395) 2019-09-03 21:15:31 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen f995ab9d54
Don't pass in loop (#23984)
* Don't pass in loop

* Revert some changes

* Lint + Axis revert

* reinstate loop

* Fix a test

* Set loop

* Update camera.py

* Lint
2019-05-22 21:09:59 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Sebastian Muszynski f4102339c1 Bump python-miio version (#22202)
* Bump python-miio version

* Rename speed property to motor_speed

* Enable set_led service of the Air Humidifier

* Allow a favorite level in [0...17]

* Allow a scene in [0...6]
2019-03-21 08:56:36 +01:00
Fabian Affolter 127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
Paulus Schoutsen e2d3c27e85
Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00