Commit graph

40 commits

Author SHA1 Message Date
epenet
469dbec089
Add type hints to plex data (#89221)
* Add type hints to plex data

* Rename method
2023-03-17 22:14:24 +01:00
epenet
75e52ef389
Use DOMAIN constant in plex (#78764) 2022-09-19 15:08:40 +02:00
epenet
474844744b
Improve entity type hints [p] (#77871) 2022-09-06 09:51:33 +02:00
epenet
7185e1140d
Add setup type hints to plex (#62883)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-29 18:05:56 +01:00
epenet
f6ffae9e10
Use DeviceInfo on components with configuration_url (#58223)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-22 17:40:13 +02:00
jjlawren
3ffe0b3625
Add configuration_url to Plex integration (#58149) 2021-10-21 08:01:00 +02:00
jjlawren
2ff1fc83bc
Add latest added media as Plex library sensor attribute (#56235) 2021-09-29 17:11:53 -07:00
Erik Montnemery
103e21c278
Move temperature conversions to sensor base class (5/8) (#54475) 2021-08-12 13:26:17 +02:00
jjlawren
f39f087b10
More graceful exception handling in Plex library sensors (#52969) 2021-07-13 20:22:31 +02:00
jjlawren
2970931d8d
Use entity class attributes for Plex (#52617) 2021-07-12 23:01:58 +02:00
jjlawren
7dfe63e06f
Set Plex sensor availability properly (#48546) 2021-03-31 17:02:23 +02:00
jjlawren
d62297a28b
Add Plex library count sensors (#48339) 2021-03-31 13:57:16 +02:00
Erik Montnemery
c900e3030b
Migrate integrations n-q to extend SensorEntity (#48214) 2021-03-22 19:46:46 +01:00
Erik Montnemery
14ff6d4d1f
Update integrations p-s to override extra_state_attributes() (#47759) 2021-03-11 21:23:20 +01:00
jjlawren
f2f935506e
Use Plex websocket payloads to reduce overhead (#42332)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-12-02 19:00:13 +01:00
jjlawren
e940811a8b
Clean up Plex clip handling (#38500) 2020-08-03 12:41:24 +02:00
jjlawren
5c28919fba
Wrap possible I/O in executor (#37688) 2020-07-12 18:09:47 -04:00
jjlawren
d445c16697
Handle Plex Live TV sessions (#36919) 2020-06-19 17:12:47 +02:00
jjlawren
e78ceab560
Wrap Plex property that can make I/O requests (#35383)
* Wrap property that sometimes makes I/O requests

* Simpler solution

* Combine into single function
2020-05-09 10:59:34 +02:00
jjlawren
3873b23704
Fix minor async issues in Plex (#33785)
* Fix minor async context issues

* Annotate callback
2020-04-07 10:17:16 -07:00
jjlawren
b48dcca05d
Defer Plex sensor retry instead of aborting (#33753) 2020-04-06 16:18:13 -07:00
jjlawren
c39fe36a1c
Skip parsing Plex session if incomplete (#33534)
* Skip parsing session if incomplete

* Schedule an update if session data is incomplete

* Mark as callback

* Remove update() & convert to async, abort if any session is incomplete
2020-04-06 10:15:11 -07:00
Franck Nijhof
7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
jjlawren
047111b00f
Fix Plex sensor title handling (#31973)
* Fix Plex sensor title parsing

* Revert episode year for now
2020-02-19 22:33:38 -08:00
jjlawren
408b41ea02
Add device registry support for Plex (#31797)
* Add device registry support for Plex

* Fix model

* Use Plex server as sensor device identifier
2020-02-13 16:37:52 -08:00
jjlawren
3a3328dc13
Skip updates when Plex client viewing photos (#31556) 2020-02-06 14:26:34 -08:00
Quentame
e3a3964911 Add icon to Plex sensor (#30172) 2019-12-23 09:25:57 -07:00
jjlawren
ef687a36ff
Add Plex debug logging (#28665) 2019-11-09 17:02:56 -06:00
jjlawren
d1fcc5762b Make dispatch signals unique per server (#28029) 2019-10-21 10:44:07 +02:00
jjlawren
eeb1bfc6f5 Central update for Plex platforms (#27764)
* Update Plex platforms together

* Remove unnecessary methods

* Overhaul of Plex update logic

* Apply suggestions from code review

Use set instead of list

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Review suggestions and cleanup

* Fixes, remove sensor throttle

* Guarantee entity name, use common scheme

* Keep name stable once set
2019-10-19 23:31:15 +02:00
jjlawren
2d12bac0e2 Add Plex config flow support (#26548)
* Add config flow support

* Log error on failed connection

* Review comments

* Unused errors

* Move form to step

* Use instance var instead of passing argument

* Only share servers created by component

* Return errors early to avoid try:else

* Separate debug for validation vs setup

* Unnecessary

* Unnecessary checks

* Combine import flows, move logic to component

* Use config entry discovery handler

* Temporary lint fix

* Filter out servers already configured

* Remove manual config flow

* Skip discovery if a config exists

* Swap conditional to reduce indenting

* Only discover when no configs created or creating

* Un-nest function

* Proper async use

* Move legacy file import to discovery

* Fix, bad else

* Separate validate step

* Unused without manual setup step

* Async oops

* First attempt at tests

* Test cleanup

* Full test coverage for config_flow, enable tests

* Lint

* Fix lint vs black

* Add test init

* Add test package requirement

* Actually run script

* Use 'not None' convention

* Group exceptions by result

* Improve logic, add new error and test

* Test cleanup

* Add more asserts
2019-09-19 23:29:26 +02:00
jjlawren
30fb4ddc98 Move config and connections to Plex component (#26488)
* Move config and connections to component

* Separate imports

* Set a unique_id on sensor

* Set a platforms const

* Add SERVERS dict, hardcode to single server

* Move to debug

* Return false

* More debug

* Import at top to fix lint

* Guard against legacy setup attempts

* Refactor to add setup callback

* Review comments

* Log levels

* Return result of callback

* Store CONFIGURING in hass.data

* Set up discovery if no config data

* Use schema to set defaults

* Remove media_player options to remove entities

* Improve error handling
2019-09-09 23:28:20 +02:00
jjlawren
23fdc04554 Add plex server config options to media_player platform (#26458)
* Add server config options to media_player platform

* Unnecessary else

* Default host

* No need to try for default values

* Use const
2019-09-05 22:20:58 +02:00
jjlawren
2cd845fb25 Standardize Plex server connections (#26444)
* Common connection class

* Omit tests for new Plex files

* Oops

* Add missing properties

* Remove redundant log message

* Stopgap to avoid duplicate setups

* Cleaner check for server setup

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Cleaner check for server setup

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Not needed with previous setup check

* Remove username/password support

* Reduce log level

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Don't do setup in __init__

* Oops

* Committing too fast...

* Connect after init

* Catch update exceptions like media_player

* Pass in validated PlexServer instance

* Remove unnecessary check

* Counter should be unknown on init

* Remove servername config option
2019-09-05 19:50:26 +02:00
Franck Nijhof
1c5e0123c9 Use literal string interpolation in integrations N-Q (f-strings) (#26391) 2019-09-03 11:35:00 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Tobias Sauerwein
048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Niccolò Maggioni
5ad3e75a4d Support for Plex sensor with enforced SSL (#21432) 2019-03-25 20:45:13 +01:00
Paulus Schoutsen
f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00
Renamed from homeassistant/components/sensor/plex.py (Browse further)