* Decouple media lookup from play_media service
* More explicit input/search validation, cleanup, more tests
* Minor cleanup
* Normalize media_type string in lookup call
* Move key lookup, add tests via service calls
* Always allow play_media service calls
* No need to pass arguments to nested functions
* 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
* Add config options support
* Actually copy dict
* Move media_player options to PlexServer class
* Handle updated config options
* Move callback out of server
* 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
* 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
* 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