Commit graph

60 commits

Author SHA1 Message Date
epenet
4afc472068
Use root import for media_player and media_source (#125828)
* Use root import for media_player and media_source

* One more
2024-09-12 15:38:53 +02:00
epenet
e750f8f457
Add alias to DOMAIN import (part 4) (#125563)
* Add alias to DOMAIN import (part 4)

* Simplify

* More integration

* Apply suggestions from code review

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

* Revert "Apply suggestions from code review"

This reverts commit 07471d3629.

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-09-09 21:32:33 +02:00
epenet
36d8ffa79a
Force alias when importing media player PLATFORM_SCHEMA (#120537) 2024-06-26 12:19:04 +02:00
Sid
c2b3bf3fb9
Enable Ruff RET502 (#115139) 2024-05-21 22:19:33 +02:00
J. Nick Koston
b8ddf51e28
Avoid creating tasks to update universal media player (#116350)
* Avoid creating tasks to update universal media player

Nothing was being awaited in async_update. This entity has polling
disabled and there was no reason to implement manual updates since
the state is always coming from other entities

* manual update
2024-04-28 18:17:26 -04:00
Marc Mueller
0f03079065
Update import for EventStateChangedData [i-z] (#114900) 2024-04-04 11:48:29 -10:00
Sid
82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Marc Mueller
3db28d46b2
Replace EventType with Event [t-z] (#112742) 2024-03-08 19:37:26 +01:00
Marc Mueller
062cc4bfce
Add empty line after module docstring [t-v] (#112705) 2024-03-08 10:35:23 -05:00
Joost Lekkerkerker
6545fba549
Use shorthand attributes in Universal (#100219) 2023-09-12 10:34:41 -05:00
Marc Mueller
582499a260
Improve async_track_template_result callback typing (#97135) 2023-07-24 12:42:17 +02:00
Marc Mueller
8c870a5683
Use EventType for state changed [m-z] (#97118) 2023-07-24 08:07:07 +02:00
Artem Draft
c14a2dd912
Add active_child_template to universal media player (#88816)
* Add active_children_template in universal

* handle multiple updates

* edit docstring

* Rename parameter to active_child_template
2023-06-28 16:36:18 +02:00
epenet
f56bf134d2
Improve browse_media type hints in media player (#90060)
* Improve browse_media type hints in media player

* Adjust components

* Adjust base entity
2023-03-24 21:49:12 -07:00
epenet
4836404288
Improve media_player type hints in integrations (#90029)
Fix some media_player type hints
2023-03-21 11:10:12 +01:00
Artem Draft
f18c0bf626
Pass assumed_state property in universal media player (#87846)
Pass assumed_state property in universal media player
2023-02-25 07:43:58 +01:00
Artem Draft
6474297d1f
Browse media support in universal media player (#85668)
Allow forward and override browse media in universal media player
2023-02-23 09:17:46 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
Franck Nijhof
647469f472
Remove str from media player device class (#83398)
* Remove str from media player device class

* Adjust pylint plugin
2022-12-06 14:57:34 +01:00
epenet
6f05a74686
Enforce MediaPlayerEntityFeature (#82462) 2022-11-22 07:15:37 +01:00
epenet
18e30e7c06
Adjust type hints for MediaPlayerEntityFeature (#82258) 2022-11-17 13:58:34 +01:00
epenet
7eefaa308f
Use new media player enums in universal (#78112) 2022-09-10 22:29:04 +02:00
holysoles
c3b2e03ce8
Support unique_id for Universal Media Player (#77461)
* support unique id

* tests for unique_id

* use unique_id attribute
2022-09-09 11:50:39 +02:00
epenet
3798d28bec
Improve entity type hints [u] (#77884) 2022-09-06 13:37:00 +02:00
Joakim Plate
083e902dc0
Ignore unknown states in universal media player (#77388)
Ignore unknown states
2022-08-31 19:53:14 +02:00
epenet
d8b2563b3d
Use _attr_should_poll in components [u-z] (#77371) 2022-08-26 21:22:27 +02:00
Artem Draft
b7a6f4e220
Fix missing ordered states in universal media player (#75099) 2022-07-13 09:12:50 +02:00
Chris Browet
596f60bdb5
Universal media player: ordered states (#68036) 2022-06-28 22:03:56 -07:00
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
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
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
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