Commit graph

277 commits

Author SHA1 Message Date
mk-81
0df9006bf7
Fix Kodi on/off status (#117436)
* Fix Kodi Issue 104603

Fixes issue, that Kodi media player is displayed as online even when offline. The issue occurrs when using HTTP(S) only (no web Socket) integration after kodi was found online once.
Issue: In async_update the connection exceptions from self._kodi.get_players are not catched and therefore self._players (and the like) are not reset. The call of self._connection.connected returns always true for HTTP(S) connections.

Solution: Catch Exceptions from self._kodi.get_players und reset state in case of HTTP(S) only connection. Otherwise keep current behaviour.

* Fix Kodi Issue 104603 / code style adjustments

as requested
2024-05-14 21:02:17 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Sid
82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Sid
0b9c9aff62
Add ruff rules PIE790, PIE794, PIE807, PIE810 (#113617) 2024-03-16 11:04:58 -10:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller
2c06d4fcb9
Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Marc Mueller
59a6035d3f
Add empty line after module docstring [j-m] (#112700) 2024-03-08 09:01:29 -05:00
Joost Lekkerkerker
ae930215d4
Add icon translations to Kodi (#111853) 2024-03-01 12:11:52 +01:00
Erik Montnemery
52e7912caf
Migrate integrations i-m to generic flowhandler (#111863) 2024-02-29 20:08:46 +01:00
J. Nick Koston
4b7a313ece
Use identity checks for CoreState (#107846)
Some of the checks used ==, and some used is. Switch
everything to is as its faster
2024-01-12 10:21:26 +01:00
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
c0ffeeca7
cc2c7c7be1
KMtronic to LG Soundbar: add host field description (#104792) 2023-11-30 16:57:44 +01:00
AJ Jordan
2e643c0c75
Fix dead link in Kodi log message (#102743) 2023-10-25 06:07:38 +02:00
Tobias Sauerwein
3c5772c1c6
Remove myself as codeowner for sonos and kodi (#101662) 2023-10-08 17:01:00 +02:00
Jan Rieger
74a57e8676
Use more common translations (#100135) 2023-09-12 19:44:31 +02: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
Franck Nijhof
6c40004061
Migrate integration services (I-K) to support translations (#96373)
* Migrate integration services (I-K) to support translations

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/kodi/strings.json

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-12 10:38:47 -04:00
Jan Bouwhuis
7eb087a9d7
Use common string references for device_automation translations (#95897) 2023-07-10 12:56:51 +02:00
Erik Montnemery
5a90a44233
Use entity registry id in kodi device triggers (#95392) 2023-06-27 18:24:53 +02: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
Erik Montnemery
90d7fb8418
Sort manifests 5 (#87026) 2023-02-08 20:35:25 +01:00
epenet
1b23429f41
Add __init__ return type to integrations (#87637) 2023-02-07 15:55:14 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
GitHub Action
71d7098530 [ci skip] Translation update 2023-01-27 00:25:12 +00:00
epenet
1139555448
Add hints to get_service in kodi (#86698) 2023-01-26 11:40:48 +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
GitHub Action
d1ecc418bb [ci skip] Translation update 2023-01-19 00:25:04 +00:00
Ville Skyttä
ae302bbec0
Make use of str.removeprefix and .removesuffix (#85584) 2023-01-13 12:19:38 +01:00
GitHub Action
f25017313a [ci skip] Translation update 2022-12-09 00:24:29 +00:00
GitHub Action
1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00
GitHub Action
230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
GitHub Action
f3b3193f7a [ci skip] Translation update 2022-11-25 00:24:19 +00:00
GitHub Action
eaf6d43508 [ci skip] Translation update 2022-11-23 00:26:26 +00:00
GitHub Action
3bea04e387 [ci skip] Translation update 2022-11-21 00:26:41 +00:00
GitHub Action
fe5246fb6f [ci skip] Translation update 2022-11-19 00:26:11 +00:00
GitHub Action
388328adba [ci skip] Translation update 2022-10-17 00:36:39 +00:00
epenet
5c8e8e4860
Use new media player enums (#78264) 2022-09-12 20:06:27 +02: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
GitHub Action
6921583410 [ci skip] Translation update 2022-09-04 00:28:06 +00:00
epenet
448f4ee755
Improve entity type hints [j-k] (#77594) 2022-08-31 22:10:18 +02:00