1
mirror of https://github.com/home-assistant/core synced 2024-09-18 19:55:20 +02:00
Commit Graph

59 Commits

Author SHA1 Message Date
Dave T
865159781f
Use new enums in vizio tests (#62710)
* Use new enums in vizio tests

* Code review: revert wrong conftest changes

* Code review: Revert incorrect removal of vizio const

* Reinstate wrongly reverted files

* Fix double line

* Fix new test after rebase
2022-02-21 08:28:56 +01:00
Raman Gupta
051bf173dc
revert change in vizio logic to fix bug (#66424) 2022-02-14 09:49:19 +02:00
Joshua Roys
9134e5c844
Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
Raman Gupta
867f8237e9
Remove attributes from vizio state when they don't make sense (#64025)
* Remove attributes from vizio state when they don't make sense

* rename var
2022-01-13 20:59:55 +01:00
Robert Hillis
432d48a4d7
Use platform enums in vizio tests (#62555) 2021-12-22 07:33:13 -05:00
epenet
cbab0ba9c0
Drop base ATTR constants in zeroconf (#60561)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 12:29:41 +01:00
epenet
54df81cbab
Use ZeroconfServiceInfo in vizio (#60115)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-29 18:27:15 +01:00
Paulus Schoutsen
b0f24b65d6
Drop more persistent notification patches (#57295) 2021-10-08 16:45:05 +02:00
Raman Gupta
f0e0b41f77
Use entity attributes for vizio integration (#56093) 2021-09-27 20:20:15 +02:00
Raman Gupta
92d1871de5
Fix flaky vizio test and add comments to explain logic (#50948) 2021-05-22 08:57:30 +02:00
Raman Gupta
6cb283d36b
Fix vizio integration (#50436) 2021-05-11 22:05:45 -07:00
jan iversen
6992e24263
Rename HomeAssistantType —> HomeAssistant, integrations t* - v* (#49544)
* Integration vizio: HomeAssistantType -> HomeAssistant.

* Integration velbus: HomeAssistantType -> HomeAssistant.

* Integration vacuum: HomeAssistantType -> HomeAssistant.

* Integration upnp: HomeAssistantType -> HomeAssistant.

* Integration upcloud: HomeAssistantType -> HomeAssistant.

* Integration twinkly: HomeAssistantType -> HomeAssistant.

* Integration tts: HomeAssistantType -> HomeAssistant.

* Integration tradfri: HomeAssistantType -> HomeAssistant.

* Integration traccar: HomeAssistantType -> HomeAssistant.

* Integration tplink: HomeAssistantType -> HomeAssistant.
2021-04-22 10:53:57 -04:00
Marc Mueller
54d1e9985f
Update typing 15 (#48079) 2021-03-18 15:13:22 +01:00
Raman Gupta
783e0f9a14
Setup config entry even if vizio device is unreachable (#46864) 2021-02-24 20:15:47 +01:00
Paulus Schoutsen
9e07910ab0
Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Raman Gupta
b651f63ef0
Suppress vizio logging API call failures to prevent no-op logs (#44388) 2021-01-01 13:35:05 +01:00
Raman Gupta
95504b7408
Abort vizio discovery flow without unique ID (#43303)
* abort vizio discovery flow if unique ID cant be found because it means we cant connect

* add tests

* fix abort call
2020-11-17 07:11:42 +01:00
Raman Gupta
098dead16d
Fix Vizio host string for zeroconf discovery (#42738) 2020-11-02 13:08:36 +01:00
Philip Allgaier
dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
Raman Gupta
d0a5feda44
Fix Vizio async_unload_entry bug (#40210) 2020-09-18 13:18:56 +02:00
Ville Skyttä
aad6a24f28
Fix vizio async mock fixtures on Python 3.8.0 and .1 (#39926) 2020-09-14 08:35:30 +02:00
Raman Gupta
04c849b0ee
Remove vizio test assertions for integration details in test_init (#39579) 2020-09-02 18:38:53 +02:00
Martin Hjelmare
24f63127de
Fix vizio black formatting (#39573) 2020-09-02 14:16:23 +02:00
Raman Gupta
7ff633f531
Automatically update app list for Vizio SmartTV's (#38641) 2020-09-02 11:55:10 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Raman Gupta
fbf44b37a9
Simplify vizio unique ID check since only IP and device class are needed (#37692) 2020-08-12 16:50:36 +02:00
Raman Gupta
0d5e279509
Standardize Vizio update service schema (#38636)
* update voluptuous schema to match standards and to handle data transformations

* improve test
2020-08-07 21:29:54 -05:00
Raman Gupta
297dd9bbc2
Add vizio service to update a device setting (#36739)
* track all settings and add service to update a setting

* sort setting types

* reduce frequency of updates due to the increase in API calls per update

* change dict call to a get in case audio settings aren't available

unlikely to occur but less error prone

* Update if statement to be more consistent

* revert changes to track all settings and store in state machine

* revert one more change

* force setting_type and setting_name to lowercase to make it easier to understand how to make service call

* make service calls even simpler by attempting to transform certain parameters as much as possible
2020-08-06 22:43:03 -04:00
Raman Gupta
572d5a09cd
Vizio: when checking new host against existing config entry hosts, make check hostname aware (#37397)
* make ip check hostname aware

* add executor job for sync function doing IO and remove errant comma

* revert change to update new_data explicitly for options keys since it is already done later

* empty commit to retrigger CI
2020-07-08 15:31:41 -04:00
Raman Gupta
db92ffdf89
Clean up vizio translation strings (#35725)
* further vizio string updates

* fix errant find/replace
2020-05-25 16:36:49 -04:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Raman Gupta
3e06e6b4b3
Don't attempt to set Vizio is_volume_muted property if Vizio API doesn't provide muted state (#34782) 2020-04-30 21:05:45 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Raman Gupta
c9cc024e9b
Abort vizio zeroconf config flow if unique ID is already configured (#34313) 2020-04-16 16:16:35 -07:00
Raman Gupta
ca67fd9faa
Skip ignored hosts when checking existing config entries in config flow (#34280) 2020-04-16 14:53:34 -07:00
Raman Gupta
8825561a99
Refactor vizio media_player tests to remove conditional statements from helper function (#33615) 2020-04-16 14:52:43 -07:00
Raman Gupta
b46eee04e4
Fix vizio bug that occurs when CONF_APPS isn't in config entry… (#33857)
* fix bug when search for string in dict fails when dict is null

* another bug fix that I only noticed because of this other bug

* add test to cover failure scenario

* update docstring

* add additional assertions to cover failure scenario that's being fixed
2020-04-08 20:44:33 -07:00
Franck Nijhof
262b01d632
Removal of old style class definitions in tests (#33671) 2020-04-05 02:21:07 +02:00
Raman Gupta
081b822d25
Add support for Vizio sound mode (#33200)
* add sound mode support for devices that support it

* make setting and unsetting flag better

* move eq and audio settings into constants

* fix missed statement to use constant instead of hardcoded string

* further fixes based on review

* bump pyvizio version to include newly identified app
2020-04-02 22:48:19 -04:00
Raman Gupta
d5f4dfdd6b
Update vizio app_id state attribute to show app config dict in… (#32727)
* bump pyvizio and update app_id to show app config to aid in HA config generation. squashed from multiple commits to make a rebase on dev easier

* bump pyvizio for bug fixes

* fix pyvizio version number

* only return app_id if app is unknown and explicitly create the dict that's returned

* fix tests

* fix docstring for app_id
2020-03-25 09:35:36 -07:00
Raman Gupta
ca3a22b5a3
Filter out duplicate app names from vizio's source list (#33051)
* filter out additional app config names from pyvizios app list

* add test

* change where filtering app list occurs

* fix test

* fix mistake in change

* hopefully final test fix

* fix test scenario that unknowingly broke with test change
2020-03-22 17:34:00 +01:00
Raman Gupta
26d7b2164e
Move apps configuration to options flow for vizio integration (#32543)
* move apps configuration to options flow

* add additional assertion to new test

* add additional assertions for options update

* update docstrings, config validation, and tests based on review
2020-03-13 12:16:24 +01:00
Raman Gupta
77ebda0c20
Update Vizio source property to only return current app if i… (#32713)
* only return current app for source if current app is set

* check for None specifically

* make sure current app isn't called for speaker
2020-03-12 11:01:05 +01:00
Paulus Schoutsen
a579fcf248
Add app support for TVs to Vizio integration (#32432)
* add app support

* code cleanup, add additional test, add CONF_APPS storage logic for import

* simplify schema defaults logic

* remove unnecessary lower() and fix docstring

* remove default return for popping CONF_APPS during import update because we know entry data has CONF_APPS due to if statement

* further simplification

* even more simplification

* fix type hints

* move app configuration to separate step, fix tests, and only make app updates if device_type == tv

* remove errors variable from tv_apps and move tv_apps schema out of ConfigFlow for consistency

* slight refactor

* remove unused error from strings.json

* set unique id as early as possible

* correct which dictionary to use to set unique id in pair_tv step
2020-03-05 13:34:12 -08:00
Raman Gupta
4f619691df
Add is_volume_muted property to vizio integration (#32332)
* add is_muted property and update tests

* black

* manually set is_muted on async_mute_volume calls to set state early

* combine two lines into one

* set is_muted to None when device is not on
2020-03-04 10:04:52 +01:00
Raman Gupta
b9fa32444a
Support vizio pairing through config flow (#31520)
* support pairing through config flow

* simplify import failure log messages

* remove unnecessary list comprehension

* bump pyvizio to add passing ClientSession in where it was missed

* show different message if user completes pairing through import

* remove dupe failure message since reasons for failure are the same in both instances

* remove extra constant

* add host reachability check during pairing workflow

* revert redundant connection check since check is implicitly done during pairing process

* fix rebase errors

* fix string

* updates based on review

* update docstring

* missed commit

* update import confirmation message to be less wordy

* use ConfigFlow _abort_if_unique_id_configured

* fix test
2020-02-27 22:04:59 -08:00
Raman Gupta
309989be89
Fix vizio bug to use 'get' to get volume_step since it is optional (#32151)
* use get to get volume_step since it is optional

* always set volume_step to default in options and data if its not included
2020-02-24 23:37:54 +01:00
Raman Gupta
7a6b13cb0d
Update vizio dependency and integration name (#31975)
* bump pyvizio version and clean up code

* fix requirements

* update parameter to optional per review in docs PR
2020-02-20 08:43:29 -08:00
Raman Gupta
284fd46ea8
For vizio integration, set unique ID early to prevent multiple zeroconf discovery items for the same device to appear (#31686)
* set unique ID early to prevent multiple zeroconf discovery items for the same device to appear

* add test
2020-02-10 14:54:52 -08:00