Commit graph

78 commits

Author SHA1 Message Date
Shay Levy
b14f22926a
Fix WebOS TV media player status when OFF after IDLE (#121251) 2024-07-05 00:19:24 +03:00
Marc Mueller
25d1ca747b
Use PEP 695 for decorator typing (3) (#117640) 2024-05-17 16:27:32 +02:00
rale
a6fdd4e1e2
Report webOS media player state (#113774)
* support for webos media player state

* add test coverage and don't use assumed state if media player state is available

* fallback to assumed state if media state isn't available

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

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-04-29 21:43:46 +03:00
Marc Mueller
c773d57d39
Add empty line after module docstring [w-z] (#112706) 2024-03-08 10:35:45 -05:00
Marc Mueller
8b0c9d3d18
Use builtin TimeoutError [t-z] (#109683) 2024-02-05 12:20:36 +01:00
Ellis Michael
a289ab9044
Don't check SSL certificate retrieving webos image (#104014)
I didn't test this in HA, but I did test this in a Python REPL, manually
querying my TV. The old method for ignoring SSL certificate validation
doesn't work at all. This method does and is supported by the aiohttp
documentation.

https://docs.aiohttp.org/en/stable/client_reference.html

Fixes #102109
2024-01-29 21:41:53 +02: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
Marc Mueller
8b0fdd6fd2
Use asyncio.timeout [s-z] (#98452) 2023-08-15 14:34:18 +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
Marc Mueller
ad0873549d
Fix ssl DeprecationWarnings (#97623) 2023-08-03 09:11:41 +02:00
Marc Mueller
0afa964724
Fix async_timeout DeprecationWarnings (#97622) 2023-08-02 20:29:03 +02:00
Erik Montnemery
fc068f878b
Minor adjustment in sharkiq, webostv, ws66i (#94611) 2023-06-14 21:41:32 +02:00
Erik Montnemery
7fbeac9bbe
Set has_entity_name in webostv (#94607)
* Set has_entity_name in webostv

* Fix log message
2023-06-14 22:11:09 +03:00
Franck Nijhof
c56832bb2c
Enable Ruff SIM300 (#86793) 2023-01-30 11:03:23 +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
Shay Levy
c40c37e9ee
Add reauth flow to webOS TV integration (#86168)
* Add reauth flow to webOS TV integration

* Remove unnecessary else
2023-01-18 18:48:38 +02:00
Shay Levy
dd18708b63
Remove WebOS TV client wrapper (#86001) 2023-01-16 12:03:57 +01:00
Shay Levy
9b5ac5b173
Fix WebOS TV image fetch SSL verify failure (#85841) 2023-01-13 23:50:02 +02:00
Franck Nijhof
8819634b61
String formatting and max line length - Part 6 (#84525) 2022-12-24 13:19:51 +01:00
epenet
9d192643ee
Move PluggableAction to trigger helpers (#81900)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Joakim Plate <elupus@ecce.se>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-11-22 11:35:18 +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
8bdeb3ca5b
Use new media player enums [u-w] (#78067) 2022-09-08 23:22:16 +02:00
epenet
aadecdf6cb
Add type hints to MediaPlayerEntity (#76743)
* Add media-player checks to pylint plugin

* Fix invalid hints

* Add tests

* Adjust tests

* Add extra test

* Adjust regex

* Cleanup comment

* Revert

* Revert

* Update homeassistant/components/media_player/__init__.py

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Update homeassistant/components/denonavr/media_player.py

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-08-15 00:54:25 +03:00
Marc Mueller
93cbb331e5
Update Mypy to 0.950 (#70948)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-27 20:49:54 -05:00
epenet
a6f112df80
Use EntityFeature enum in components (w**) (#69468)
* Use EntityFeature enum in webostv

* Use EntityFeature enum in wemo

* Use EntityFeature enum in whirlpool

* Use EntityFeature enum in wilight
2022-04-07 08:12:39 +03:00
Marc Mueller
6e49b0e122
Use assignment expressions [K-Z] (#66881) 2022-02-19 17:19:46 +01:00
Shay Levy
5c5bb4835e
Enable assumed state in webostv media player (#66486) 2022-02-14 11:14:57 +01:00
Shay Levy
fe077b6990
Use shorthand attributes in webostv (#66418) 2022-02-13 23:47:37 +02:00
Shay Levy
89b20b9133
Fix webostv restored supported features turn on (#66318)
* Fix webostv restored supported features turn on

* Remove ternary operator expression
2022-02-11 16:48:36 +02:00
Pedro Lamas
ebbe1ff1a2
Cache webostv supported_features state (#65930)
* Cache webostv supported_features state

* Fixes typings

* Restore supported_features attribute on restart

* Reverts change on supported_features initial state

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

* Fixes tests

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-02-07 17:49:18 +02:00
Shay Levy
9d39a38c16
Fix webostv media player (#64690)
* Fix webostv media player

* Revise service call error handling
2022-01-22 19:26:02 +02:00
Shay Levy
de19483632
Fix webostv media next/previous services (#64355) 2022-01-18 12:09:26 +01:00
Shay Levy
32d4f104ff
Enable strict typing in webostv (#64193)
* Enable strict typing in webostv

Enable strict typing in webostv

* Apply review comments
2022-01-16 22:07:29 +01:00
Shay Levy
dee843bf6e
Add LG webOS Smart TV config flow support (#64117)
* Add webOS Smart TV config flow support (#53256)

* Add Webostv config flow

* Fix tests mocks and apply review comments

* Apply review comments

* Change config flow to use ssdp UDN as unique_id

* Fix device info

* More review comments

* Fix _async_check_configured_entry

* Remove turn on script

* Add webOS Smart TV device triggers (#53752)

* Add webOS Smart TV config flow support (#53256)

* Add Webostv config flow

* Fix tests mocks and apply review comments

* Apply review comments

* Change config flow to use ssdp UDN as unique_id

* Fix device info

* More review comments

* Fix _async_check_configured_entry

* Remove turn on script

* Add webOS Smart TV device triggers (#53752)

* Fix webOS Smart TV mypy and pylint errors (#62620)

* Change webOS Smart TV PyPi aiopylgtv package to bscpylgtv (#62633)

* Change webOS Smart TV PyPi aiopylgtv package to bscpylgtv

* Update bscpylgtv to 0.2.8 (revised websockets requirment)

* Change webOS Smart TV PyPi package to aiowebostv (#63759)

* Change webOS Smart TV PyPi package to aiowebostv

* Apply suggestions from code review

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

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

* webOS TV check UUID for user added device (#63817)

* webOS TV check uuid when for user added device

* Apply suggestions from code review

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

* Add test for form abort and host update

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

* Rework webOS Smart TV device trigger to custom trigger platform (#63950)

* Rework webOS Smart TV device trigger to custom trigger platform

* Review comments and add tests

* Fix webOS TV import from YAML (#63996)

* Fix webOS TV import from YAML

* Fix requirements

* Migrate YAML entities unique id to UUID

* Add backoff to migration task delay

* Assert result data and unique_id

* Apply suggestions from code review

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

* Add codeowner

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-14 22:48:45 +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
Robert Hillis
b4c9d1844e
Use enums in webostv (#62000) 2021-12-16 09:20:52 +01:00
Michael
90e52cd3ad
Use relative imports [S-Z] (#61576) 2021-12-13 09:39:13 +01:00
Marc Mueller
f149bef9f3
Use assignment expressions 18 (#57967) 2021-10-18 18:36:35 +02:00
Marc Mueller
48bada5a18
Update pylint to 2.11.1 (#56364) 2021-09-18 13:52:59 +02:00
Milan Meulemans
3f6282eb7a
Activate mypy for LG webOS Smart TV (#53958) 2021-08-04 19:31:24 +03:00
Franck Nijhof
6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +01:00
J. Nick Koston
c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Franck Nijhof
8a56dbf587
Add flake8 comprehensions checks to pre-commit & CI (#48111) 2021-03-19 13:41:09 +01:00
Erik Montnemery
1fc8e32d86
Update integrations t-z to override extra_state_attributes() (#47760) 2021-03-11 20:16:26 +01:00
springstan
92379ad8d2
Use list literal without using dict.keys() (#42573) 2020-10-30 09:19:13 -05:00
springstan
61d9067a49
Return empty dictionary at first for attributes (#41348) 2020-10-06 18:08:53 +02:00
springstan
513f03eb1f
Return attribute dict directly without temporary variable v2 (#41271) 2020-10-06 16:55:16 +02:00
Pedro Lamas
d5741a5ba4
Fix webostv supported features for "external_speaker" sound output (#40435) 2020-09-22 10:49:44 +02:00
Paulus Schoutsen
05d54a60b0
Deprecate optional script context (#39034)
Co-authored-by: Phil Bruckner <pnbruckner@gmail.com>
2020-08-21 14:17:47 +02:00