* Connect websocket when platforms ready, not when HA is ready
* Use callbacks from platform setup tasks instead
* Convert setup to async
* Apply suggestions from code review
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Save client identifier from auth for future use
* Use websocket events to update Plex
* Handle websocket disconnections
* Use aiohttp, shut down socket cleanly
* Bad rebase fix
* Don't connect websocket during config_flow validation, fix tests
* Move websocket handling to external library
* Close websocket session on HA stop
* Use external library, revert unnecessary test change
* Async & lint fixes
* Clean up websocket stopper on entry unload
* Setup websocket in component, pass actual needed object to library
* 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
* Consolidate
* Fix tests
* Update imports
* Fix import
* Use importlib because integration and package share name
* Fix more tests
* Update .coveragerc and CODEOWNERS