Commit Graph

41 Commits

Author SHA1 Message Date
Franck Nijhof 8f4caf4141
Clean up accessing event helpers via hass (#72011) 2022-05-17 19:36:29 +02:00
epenet 75eec850c1
Use EntityFeature enum in components (u**) (#69462) 2022-04-06 21:35:15 -10:00
Marc Mueller 048d8f9263
Add strict typing to `core.py` (6) - Implicit reexport (#63345) 2022-01-04 19:51:19 +01:00
epenet 1519aa202d
Add media_player setup type hints [m-x] (#63298)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 16:09:34 +01:00
Marc Mueller 184e0d7fdf
Use assignment expressions 26 (#58187) 2021-10-22 11:31:17 +02:00
Marc Mueller d5116810d4
Use assignment expressions 08 (#57788) 2021-10-17 20:02:42 +02:00
Chris Browet 12c32ac806
Universal media player: consider unknown as inactive child state (#57029) 2021-10-04 17:10:41 +02:00
Felix 4d93184197
Strip attributes whitespace in universal media_player (#54451)
When using whitespace in attributes the lookup of the state attribute fails because an entity with whitespace in its name cannot be found.

Works:
entity_id|state_attribute

Does not work:
entity_id | state_attribute

Fixes #53804
2021-08-11 12:17:12 +02:00
Graham Rogers 4f96f05a75
Improve Universal media player toggle default behavior (#49395)
Before it could not be overridden and the default behavior meant nothing was called when all children were off, so it could not be used to turn on the media player. The new default behavior is to delegate to `turn_on` and `turn_off` instead, which is more likely to be the expected behavior.
2021-08-02 15:10:56 +02:00
Marc Mueller f6b162bc39
Add pylint CodeStyle extension (#53147) 2021-07-19 06:57:06 -07:00
tkdrob 5d6f4068d3
Add targets and selectors for services (U-W) (#50630)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-15 10:49:10 +02:00
Artem Draft d29e812033
New overrides in universal media player (#48611)
* Update media_player.py

fix missing overrides in universal

* Update media_player.py

Black

* add tests and allow overrides for missing services

* switch sync to async

* Update tests/components/universal/test_media_player.py

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

* setup component after modifying config

* switch test to sync

* fix black

* fix test

* rework tests, disable override media_seek

Co-authored-by: raman325 <7243222+raman325@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-11 23:44:26 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Marc Mueller b67b9b94f9
Update typing 13 (#48077) 2021-03-18 14:43:52 +01:00
Erik Montnemery 1fc8e32d86
Update integrations t-z to override extra_state_attributes() (#47760) 2021-03-11 20:16:26 +01:00
Marc Mueller 16dcbf1467
Update pylint (#47205) 2021-02-28 22:09:01 -10:00
Franck Nijhof a80921ab65
Minor service definition tweaks (#46741) 2021-02-18 17:14:36 +01:00
tkdrob 68e78a2ddc
Remove unnecessary constants from universal (#46537) 2021-02-16 09:49:31 -05:00
Raman Gupta cfdaadf5d9
Allow users to set device class for universal media player (#46550) 2021-02-14 17:05:23 -10:00
Raman Gupta a3b733f1ec
Add additional supported feature support to universal media player (#44711)
* add additional supported feature support to universal media player

* add missing services
2021-02-14 19:35:14 -05:00
Philip Allgaier dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
J. Nick Koston 44952a94cf
Add missing conext preservation to bayesian and universal (#40178)
We already do this for template sensors, but it was
missing for bayesian and universal
2020-09-17 16:47:23 +02:00
J. Nick Koston a77e09b2c2
Make async_track_template_result track multiple templates (#39371)
* Make async_track_template_result track multiple templates

Combine template entity updates to only write ha
state once per template group update

* Make async_track_template_result use dataclasses for input/output

* black versions

* naming
2020-08-31 19:07:40 -05:00
J. Nick Koston 810df38f0d
Add the ability to reload light/cover groups from yaml (#39250)
* Add the ability to reload light/cover groups from yaml

Update previous usage to reduce code duplication.

* Fix conflict from rebase
2020-08-25 18:13:43 -05:00
J. Nick Koston 90842fcb84
Support reloading the universal platform (#39248) 2020-08-26 00:25:15 +02:00
J. Nick Koston 9baf3ff706
Update universal media_player to use async_track_template_result (#39054)
* Update universal media_player to use async_track_template_result

* Review comments and add missing test cover
2020-08-22 18:12:53 -05:00
J. Nick Koston e938dcfbda
Switch universal media_player to use async_track_state_change_event (#37832)
async_track_state_change_event is faster than async_track_state_change
and since we do not care about the data being returned to the callback
this is a simple speedup
2020-07-14 22:32:03 -07:00
Franck Nijhof f42eb0d5ca
Fix missing service call context in multiple locations (#37094) 2020-06-25 17:09:52 -07:00
Erik Montnemery 62bc02fdda
Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Paulus Schoutsen e9e44dbd97
Fix callback and async (#31281)
* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
2020-01-29 13:59:45 -08:00
Franck Nijhof bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal (#30551) 2020-01-07 20:58:49 +01:00
Franck Nijhof b4d6d238e5 Correct names in manifests (T-Z) (#30546) 2020-01-07 14:31:18 +01:00
Bas Nijholt e37443f10c Sort imports according to PEP8 for components starting with "U" (#29779)
* use isort to sort imports for components starting with 'u'

* add 'pylint: disable=import-error' to the right place
2019-12-09 19:07:32 +01:00
Michaël Arnauts cc346e57e6 Cast the volume_level of a universal media_player to a float (#29045)
* Make sure to cast the volume_level of a universal media_player to a float

* Fix test that expects the wrong bahaviour

* Catch exception instead of checking for None
2019-11-25 18:01:24 -08:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen a52f96b23a
Add stub services.yaml and make validation mandatory (#23213) 2019-04-18 15:13:35 -07:00
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -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
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00