- Bumps bravia-tv lib to 1.0.6 which fixes is_connected() to actually
return True only when API is connected, instead of just returning whether
or not cookies are cached (regardless if they actually worked).
- Wrap is_connected() because it now performs io.
- Remove unnecessary logic to refresh cookies. Now that
is_connected() works, the bravia instance only needs to be
reconnected when is_connected is False and TV is not off.
* bravia-tv version bump
* Fix Auth Cookies
- Fix authentication cookie expiration.
- Remove obsolete error handling (since bravia-tv==1.0.2)
- Remove obsolete mac address references. (since bravia-tv==1.0.2)
- Update tests.
* fix async_refresh_playing_info
* Improve code format
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Config_entry needs mac address for HA restart
This was mistakenly taken out. Home-Assistant needs to store mac address in
case restarted. TV needs to be on to acquire mac address. This is neccesary
to allow TV to be turned on by Home-Assistant after Home-Assistant is
restarted.
* Skip update() during state changes
It is best for performance to skip updates during state change because
bravia.turn_on() will commonly push async_update() beyond it's update
interval.
* update tests
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Run scripts
* Improvement strings
* Fix FlowOptions update listener
* Update .ceveragerc
* Add tests
* Better strings
* Add test for OptionsFlow
* Run gen_requirements_all.py once again
* Fix pylint errors
* Log error when there is no bravia.conf file during import
* Improvement strings
* Use braviarc object from hass.data in options flow
* Use async_add_executor_job for IO
* Fix options flow test
* Fix tests
* Remove host_reachable method
* Remove dependencies
* Change setup_platform method to async
* Remove calling system_info
* Save mac in the config entry
* Fix get ignore sources
* Fix read config from file
* Remove the side effect from init
* Fix user_input for user step
* Switch OrderedDict to dict
* New config_entry instance for each test
* Revert change
* Patch async_setup_entry in test_import
* Change a way to create source list
* Consolidate repeated block of code
* Update tests
* Suggested change
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Suggested channge
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Suggested change
* Patch async_setup_entry
* Remove unnecesary if
* suggested change
* Suggested change
* Fix tests
* Fix pylint error
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
BraviaRC is currently unmaintained for home-assistant. This commit
swaps it out with a new fork of BraviaRC called python-bravia-tv.
This captures all bug fixes from BraviaRC release 3.7 (previously
linked backend) to right before BraviaRC breaks when used by home-assistant.
The intent of forking is to be able to continue supporting home-assistant.
This is not intended to be a one off solution; this new fork will have
future updates and be maintain as needed.
This initial commit of python-bravia-tv improves the import process,
however overall preserves the original API.
Other fixes include:
* Fix set-volume slider
* Better error handling
* Increase input options
Resolves: #26351, #30964
See also: #12577, #14843, #17345, #18245