Commit Graph

17 Commits (e4ef06d6b147f3804f2af0ea07ad0679a79cd526)

Author SHA1 Message Date
Franck Nijhof 2ed386f9e6
Migrate to async_get_current_platform everywhere (#50034) 2021-05-03 09:34:28 -07:00
jan iversen 2e084f260e
Rename HomeAssistantType —> HomeAssistant, integrations s* - t* (#49550) 2021-04-22 16:21:38 +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
Franck Nijhof 53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00
k2v1n58 f14a4935df
Widen songpal volume step change compatibility (#36152)
* Update songpal / media_player.py

Based on issue https://github.com/home-assistant/core/issues/36135

* Update test_media_player.py
2020-05-28 00:09:15 +02:00
Xiaonan Shen 8994931ec4
Songpal code and test improvement (#35318)
* Use tests.async_mock instead of asynctest

* Remove unnecessary existence check

* Improve songpal service registering

* Add tests

* Seperate device api from entity api

* Improve disconnect log messages

* Improve tests

* Rename SongpalDevice to SongpalEntity

* Improve reconnecting

* Remove logging and sleep patch from tests

* Test unavailable state when disconnected

* Rename SongpalEntity.dev to _dev

* Add quality scale to manifest
2020-05-09 22:30:34 -04:00
Xiaonan Shen 33077f0cdd
Add config flow support to songpal integration (#34714)
* Add config flow to songpal

* Add config flow to songpal

* Add songpal to migrated service in discovery

* Improve songpal/set_sound_setting service

* Remove songpal config flow from .coveragerc omit

* Bump python-songpal to 0.12 and fix exception handling

* Revert "Improve songpal/set_sound_setting service"

This reverts commit 9be076ab52e21f268322572c36709a17d41db771.

* Code style fix

* Add connections to device_info

* Fix pylint

* Ignore braava tv

* Fix test warning

* Add @shenxn as codeowner

* Remove model from configuration data

* Get name from device in user step

* Add unload entry support

* Delete translations as it will get generated as part of CI

* Code cleanup

* Fix typo

* Remove _show_setup_form

* Change configuration from media_player to songpal

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2020-05-07 00:52:33 +02:00
Teemu R 9436645648
Fix songpal on devices where source!=uri (#34699) 2020-05-01 19:43:30 +02:00
Erik Montnemery 62bc02fdda
Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00
Paulus Schoutsen aef06a3544
Directly call write state 2 (#33513)
* Directly call async_write_ha_state pt2

* Directly call async_write_ha_state pt2

* Fix mock

* Address comments
2020-04-03 09:34:50 +02:00
Bas Nijholt 23b92b2a56 Sort imports according to PEP8 for components starting with "S" (#29777) 2019-12-09 14:38:01 +01:00
Raman Gupta c72e230432 move songpal service to songpal domain (#29143) 2019-11-27 11:19:01 +01:00
Teemu R 4b8a35dffb move songpal imports to top (#27402)
* move songpal imports to top

* Update media_player.py
2019-10-10 12:53:05 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -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
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Paulus Schoutsen f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00