Commit graph

25 commits

Author SHA1 Message Date
Joost Lekkerkerker
ac53b78a0c
Deduplicate constants A-D () 2023-12-13 14:21:44 +01:00
Maciej Bieniek
66d24b38aa
Add diagnostics platform to BraviaTV ()
* Add diagnostics platform

* Add test

* Improve test

* Use consts

* Fix test

* Patch methods

* Patch methods
2023-12-13 08:18:50 +01:00
epenet
7b3a932cd9
Remove incorrect constant usage in test () 2023-04-11 10:00:17 +02:00
epenet
b0631fed1d
Add missing mock in braviatv config flow tests () 2023-03-09 13:05:32 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ()
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
fa7acb4f0d
Add type hints to integration tests (part 3) () 2023-02-10 16:05:01 +01:00
epenet
807c69f621
Add type hints to integration tests (b-c) () 2023-02-08 18:08:43 +01:00
Artem Draft
02e973026d
Add browse media and play media support in Bravia TV ()
* Add media browsing and play media support in Bravia TV

* Add fix invalid Bravia Content-Type header for icons

* Avoid duplicates in source_list

* Small cleanup

* Edit comment

* Revert en.json
2023-01-24 14:31:09 +01:00
Artem Draft
49885757db
Bump pybravia to 0.3.0 () 2023-01-05 11:34:07 +01:00
Artem Draft
3ac7c687be
Redesign and refactor Bravia TV config_flow ()
fixes undefined
2022-12-30 16:35:18 +01:00
Artem Draft
e32074c74e
Fix saving options with missing ignored sources in BraviaTV ()
fix https://github.com/home-assistant/core/issues/83217
fixes undefined
2022-12-13 08:45:04 +01:00
epenet
db9e8d2fa1
Use OptionsFlowWithConfigEntry in braviatv ()
* Use OptionsFlowWithConfigEntry in braviatv

* Make use of add_suggested_values_to_schema

* Full coverage
2022-11-29 16:48:51 +01:00
Maciej Bieniek
9dd9147343
Use HA uuid as client_id in BraviaTV ()
* Use uuid as clientid/nickname

* Fixes after rebase

* Move gen_instance_ids() to utils

* Store client_id and nickname in config_entry

* Update tests

* Clean names

* Rename consts
2022-10-05 11:24:52 +03:00
Maciej Bieniek
3b794038b1
Add reauth flow to BraviaTV integration ()
* Raise ConfigEntryAuthFailed

* Add reauth flow

* Add tests

* Patch pair() method to avoid IO

* Remove unused errors dict
2022-10-02 13:07:57 -07:00
Artem Draft
7c460cc641
Add PSK auth and SSDP discovery to Bravia TV () 2022-09-23 09:03:43 -04:00
Artem Draft
19295d33ba
Migrate BraviaTV to new async backend () 2022-08-10 13:11:49 +02:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum () 2022-07-07 19:57:36 +03:00
Shay Levy
92e0dc577e
Fix braviatv tests doing IO () 2022-01-20 12:28:52 +01:00
Maciej Bieniek
ff8b96c65d
Remove YAML configuration import from Sony Bravia TV () 2021-06-24 11:10:21 +02:00
Maciej Bieniek
9588e0d35a
Fix host_valid() logic in BraviaTV config flow () 2021-04-29 16:09:59 +02:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Maciej Bieniek
751428fe2b
Catch NoIPControl exception () 2020-05-25 16:05:52 -04:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
David Nielsen
08e74352ec
Update bravia-tv backend ()
* 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>
2020-04-21 16:46:12 +02:00
Maciej Bieniek
6dc6f2d099
Add config flow for braviatv integration ()
* 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>
2020-04-15 01:04:06 +02:00