Commit graph

65 commits

Author SHA1 Message Date
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
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
A C++ MaNong
5b234b80e8
Keep webostv source list when TV is off (#38250)
* keep source list when TV is off

* remove source_list reset as the method ends here
2020-08-05 11:01:12 +02:00
Damien Levin
78225c9ddd
Set webostv scan interval to 10s for quick updates (#35795)
Co-authored-by: damien.levin@gmail.com <damienlevin@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-06-22 13:08:02 +02:00
David Zhu
6f4829c390
Add webostv payload option to command service (#36164)
* added optional argument to command service

* Fixed crash when optional argument is not provided

* Updated argument description

* fixed lint error

* Fix isort error

* switched to use dict for optional field instead of json string

* switched to use ATTR_PAYLOAD

* fixed test

* actually fixed test
2020-05-27 15:51:39 +02:00
jjlawren
1e00fc2af7
Change unique_id for webostv (#34979)
* Revert #34656

* Use pairing key as unique_id
2020-05-11 11:09:16 +02:00
Erik Montnemery
62bc02fdda
Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00
Aidan Timson
18478ebd05
Improve LG webosTV (#34147)
* Move consts to const, general cleanup

* Add unique id

* Add default icon

* Set supported features based on sound output

* Update homeassistant/components/webostv/media_player.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Set device class

* Add software_info to client mock

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-14 20:26:13 +02:00
Paulus Schoutsen
aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00
Paulus Schoutsen
f41623ca64
Log warning when entities referenced in service call not found (#31427)
* Raise entities not found error

* Make it a warning, not an error

* Add support for MATCH_ENTITY_NONE

* Fix lint

* Fix tests
2020-02-04 14:42:07 -08:00
Josh Bendavid
96ede54a1b
always call set_volume with integer values (#31418) 2020-02-02 14:50:30 -08:00
starkillerOG
1278f32306 Add webostv sound_output capability (#31121)
* Webostv: add sound_output capability

Add the ability to read and set the sound_output

* Webostv: add sound_output capability

* Webostv: add sound_output capability

* fix blank spaces

* fix to long line

* add ,

* Import ATTR_SOUND_OUTPUT

Do not have the ability to test this change right now

* Add white space

* Create const.py

* Use const import

* Use import from const.py

* Add docstring

* Change order

* Change order

* Fix import

* Fix import

* Fix typo

* Change order again

* Change order again

* Change order of attributes
2020-01-27 10:40:48 +01:00
Josh Bendavid
6f1c45257a Fix state handling for older webos versions (#31099)
* fix state handling for older webos versions

* update aiopylgtv to 0.3.2
2020-01-25 13:24:21 -05:00
Josh Bendavid
fae74f7ed7 Improve state tracking for WebOsTV (#31042)
* upgrade to aiopylgtv 0.3.0 and corresponding simplification and cleanup of webostv state tracking

* properly handle case where Live TV is not reported in list of apps

* fix tests (entity state is no longer linked to source id)

* fix pylint checks

* avoid unnecessary retrieval of channel list

* use only standard home assistant states
2020-01-22 19:06:08 +01:00