Commit Graph

29 Commits (6ec3234ccc06709d8f3b39612b20b06fd96ff352)

Author SHA1 Message Date
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
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
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 7421156dfc
Add support for the power socket of the Xiaomi AC Partner V3 (#22205) 2019-03-24 20:15:29 +01: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