Commit Graph

27 Commits (df7be501d3c7e93df919dac06dcb110f95f69eb9)

Author SHA1 Message Date
Joost Lekkerkerker 9b41e3d124
Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Joost Lekkerkerker ac53b78a0c
Deduplicate constants A-D (#105638) 2023-12-13 14:21:44 +01:00
epenet 7b3a932cd9
Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
epenet b0631fed1d
Add missing mock in braviatv config flow tests (#89419) 2023-03-09 13:05:32 +01:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* 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) (#87844) 2023-02-10 16:05:01 +01:00
epenet 807c69f621
Add type hints to integration tests (b-c) (#87698) 2023-02-08 18:08:43 +01:00
Artem Draft 02e973026d
Add browse media and play media support in Bravia TV (#85288)
* 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 (#85127) 2023-01-05 11:34:07 +01:00
Artem Draft 3ac7c687be
Redesign and refactor Bravia TV config_flow (#84832)
fixes undefined
2022-12-30 16:35:18 +01:00
Artem Draft e32074c74e
Fix saving options with missing ignored sources in BraviaTV (#83891)
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 (#82902)
* 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 (#79618)
* 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 (#79405)
* 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 (#77772) 2022-09-23 09:03:43 -04:00
Artem Draft 19295d33ba
Migrate BraviaTV to new async backend (#75727) 2022-08-10 13:11:49 +02:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Shay Levy 92e0dc577e
Fix braviatv tests doing IO (#64549) 2022-01-20 12:28:52 +01:00
Maciej Bieniek ff8b96c65d
Remove YAML configuration import from Sony Bravia TV (#52141) 2021-06-24 11:10:21 +02:00
Maciej Bieniek 9588e0d35a
Fix `host_valid()` logic in BraviaTV config flow (#49857) 2021-04-29 16:09:59 +02:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Maciej Bieniek 751428fe2b
Catch NoIPControl exception (#36088) 2020-05-25 16:05:52 -04:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
David Nielsen 08e74352ec
Update bravia-tv backend (#34376)
* 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 (#33774)
* 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