Commit graph

66 commits

Author SHA1 Message Date
Ville Skyttä
24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Joost Lekkerkerker
c49f086790
Use shorthand attributes in Kodi (#99578) 2023-09-05 15:22:52 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Erik Montnemery
7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Erik Montnemery
cc53e4e6c1
Set has_entity_name in kodi (#94604)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-14 21:44:17 +02:00
starkillerOG
4ef315b32a
Add Kodi keypress event (#93321)
* Add keypress events

* Fix styling

* fix tests

* improve tests

* Revert device trigger

* Add entity_id to event for ease of filtering
2023-05-25 11:11:29 +02:00
epenet
3b83340f6e
Improve get_browse_image type hints in media player (#90057) 2023-03-26 19:54:01 +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
f69d76702a
Adjust entity registry access in integrations (2) (#88947) 2023-03-01 08:02:51 +01:00
Marc Mueller
45b4b0e990
Import ParamSpec from typing [Py310] (#86413)
* Import ParamSpec from typing [Py310]

* Update additional imports
2023-01-23 07:28:43 +01:00
epenet
d0605d3a59
Use new media player enums in kodi (#78106) 2022-09-10 22:22:18 +02:00
uvjustin
9b2d17cd00
Escape media_content_id in media player proxy (#77811)
* Escape media_content_id in media player proxy

* Change usage in kodi

* Change usage in roku

* Change usage in sonos

* Add test

* Add comment

* Change path regex instead of double quoting

* Use .+ instead of .*
2022-09-09 13:18:24 +02:00
epenet
14fc7c7595
Improve type hints in kodi media player (#77653) 2022-09-04 22:41:18 +02:00
epenet
448f4ee755
Improve entity type hints [j-k] (#77594) 2022-08-31 22:10:18 +02:00
Igor Loborec
1744e7224b
Remove available property from Kodi (#73103) 2022-06-05 16:27:46 -10:00
Erik Montnemery
47d0cc9b09
Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
Franck Nijhof
7d2deae592
Clean up use of deprecated async_get_registry methods (#72001) 2022-05-17 13:40:19 +02:00
Raman Gupta
5e3740d5ed
Add available property to kodi, with some code cleanup (#69115)
* Add available property to kodi, with some code cleanup

* Update homeassistant/components/kodi/media_player.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-04-30 10:05:22 +03:00
Marc Mueller
4a574eb701
Type kodi error decorator (#70989) 2022-04-28 17:03:27 +02:00
epenet
4a0e00d939
Use EntityFeature enum in components (k**) (#69411)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-04-07 15:31:54 +02:00
Raman Gupta
963ed74797
Fix kodi log spamming again (#69137)
* Fix kodi log spamming again

* use try except else
2022-04-02 13:26:50 -04:00
Raman Gupta
5f897874cb
Fix kodi log spamming (#69113) 2022-04-02 09:42:19 +02:00
Paulus Schoutsen
3bc2586874
Don't log the stack trace (#69000) 2022-03-31 20:10:16 +02:00
Martin
a9ebeb2876
Catch kodi protocol errors (#67555) 2022-03-30 12:14:53 -07:00
cvwillegen
8fc8778995
Improve log when connection to kodi media player cannot be created (#68458)
* Make clearer in log files that connection to media player cannot be created.

* Only give connection error once.

When connection is lost, only give an error message once. When connection is restored and lost again, give error message again.
2022-03-29 11:09:59 +02:00
Richard de Boer
7323ad2799
Support playing local "file" media on Kodi (#67832)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-03-08 07:56:15 -08:00
Paulus Schoutsen
442e2eecd5
Kodi: Mark MJPEG cameras using PNGs as incompatible (#67257) 2022-02-26 09:58:45 +01:00
Paulus Schoutsen
406fbca4bc
Add media source support to Kodi (#67203) 2022-02-24 23:40:28 -08:00
epenet
ed5e1af10a
Add type hints to media_player (part 2) (#64006) 2022-01-13 10:43:52 +01:00
epenet
bf78ddcadb
Add media_player setup type hints [a-l] (#63297)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 16:04:15 +01:00
Robert Hillis
05671557f0
Use DeviceInfo Class I-K (#58300) 2021-10-23 20:42:50 +02:00
Marc Mueller
9a58bfdf41
Use assignment expressions 17 (#57963)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-10-20 17:42:26 +02:00
Marc Mueller
4f8148f9ea
Use assignment expressions 07 (#57787) 2021-10-17 20:24:34 +02:00
Franck Nijhof
2ed386f9e6
Migrate to async_get_current_platform everywhere (#50034) 2021-05-03 09:34:28 -07:00
Tobias Sauerwein
467bd91c80
Add image proxy to Kodi media browser (#47315) 2021-03-29 17:30:51 -07:00
Ville Skyttä
2fb3be50ab
Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None

* Remove unnecessary async_get_device connections arg usages

Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
mvn23
212fb572e1
Fix kodi media_player unavailable at start (#41714) 2020-11-17 07:27:58 -10:00
On Freund
a50405aa6e
Fix kodi.add_to_playlist (#41185) 2020-10-04 10:53:44 +02:00
cgtobi
f9f17dc718
Update Kodi to no longer use protected methods (#40788)
* Replace protected methods

* Fix method name

* Bump PyKodi version to 0.2.1

* Reuse variable
2020-10-03 15:12:18 -05:00
On Freund
3f514da285
Fix kodi.call_method (#40236) 2020-09-18 15:24:14 +02:00
On Freund
cf6b84790f
Handle Kodi shutdown (#39856)
* Handle Kodi shutdown

* Core review comments

* Make async_on_quit a coroutine
2020-09-12 14:22:14 +02:00
cgtobi
ef8cdf0405
Add Kodi media browser support (#39729)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-07 18:22:20 +02:00
On Freund
c1ed584f2d
Add config flow to kodi (#38551)
* Add config flow to kodi

* Fix lint errors

* Remove entry update listener

* Create test_init.py

* Apply suggestions from code review

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update __init__.py

* fix indentation

* Apply suggestions from code review

* Apply suggestions from code review

* Update tests/components/kodi/__init__.py

* Fix init test

* Fix merge

* More review changes

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Fix black formatting

* Fix Flake8

* Don't store CONF_ID

* Fall back to entry id

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update __init__.py

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-20 23:16:58 -05:00
Phil Bruckner
716fa63e73
Update script helper constructor parameters (#38763)
Add domain and make it and name required.

Add optional running_description.
2020-08-12 11:39:05 -05:00
Ian Duffy
ef039d6a65
Fix Kodi play_media media type casing (#38665)
* [KODI] Fix casing issue

Alexa and the Services UI on HA feeds in a media type of "channel" for media type.
The Kodi code looks for a "CHANNEL" instead, as a result the functionality fails.

* Update homeassistant/components/kodi/media_player.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/kodi/media_player.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/kodi/media_player.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/kodi/media_player.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 11:25:22 -05:00
J. Nick Koston
f06ae1fa95
Prevent kodi from blocking startup (#38257)
* Prevent kodi from blocking startup

* Update homeassistant/components/kodi/media_player.py

* isort

* ignore args

* adjustments per review

* asyncio
2020-07-28 07:43:42 +02:00
Thomas Hollstegge
3af3900581
Kodi: Correctly report media content type for PVR channels (#35091) 2020-05-09 22:25:52 -04:00
Erik Montnemery
62bc02fdda
Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00
springstan
db72039b8f
Use list literals (#33659) 2020-04-04 23:14:47 +02:00
springstan
0d95eff21d
Use dict literals (#33658) 2020-04-04 22:31:56 +02:00