* 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
* Add prettier (in pre-commit and CI)
* Make all file prettier
* Change order
* Add to Azure Pipelines
* Fix a YAML file prettier caught as invalid
* Remove flow mapping using curly braces from all YAML service files
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* Update vizio host check to handle entries that don't have port
* add comment explaining no_port test for future
* remove _name_is_same function and support user updating name in config
* Update strings.json
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* bump pyvizio version and add additional device info
* add patches for get_model and get_version
* change keywrod argument to positional for _test_service
* add media player test and update media player logic to qualify vizio for platinum quality score
* add SCAN_INTERVAL and log message once when device goes from available to unavailable and vice versa
* move test constants into one file to avoid defining dupes in each test file
* move constant to shrink diff
* move pytest fixtures to conftest.py
* remove commented out code
* move unload test to test_init
* updates to tests and logging based on review
* bypass notification service
* add fixture so component setup makes it through config flow
* split failure tests into two
* fix setup and entity check for test_init and setup failures in test_media_player
* make domain references consistent across test files
* remove logging steps that were introduced to help debug
* move common patches out to new fixture and use config entry everywhere appropriate
* fix docstring
* add test for update options to increase code coverage
* add one more assert
* refactor test_media_player to move boiler plate logic out of each test into _test_init function
* final refactor of test_media_player to move repeat logic into separate function
* update docstrings
* refactor setup failure tests to move shared logic into private function
* fix last new functions code to use variable instead of static config variable
* remove trailing comma
* test that volume_step gets properly passed to Vizio volume function
* fix comment language
* assert with unittest.mock.call in _test_service and use config_entries.async_setup instead of config_entries.async_add
* replace config_entries.async_add with config_entries.async_setup everywhere
* simplify if statement for argument assertion
* fix logging based on style guide
* remove accidentally committed changes
* update scan interval to something more reasonable and add tests for availability changes
* change filter function to list comprehension, simplify log messages, remove default entity id from logs since it is user configurable, fix docstrings
* remove connection check during setup since it is already done during config flow
* revert change and fix log message
* demote connection setup to warning
* add missing tests
* readd removed test
* add zeroconf discovery support for vizio integration
* no mock_coro_func needed
* add reasonable timeout and don't log exceptions from pyvizio due to timeout
* add test to test options update and bump pyvizio to avoid timeout issues
* update requirements_*
* fix gaps in coverage
* change return hint for async_setup_entry
* use source variables instead of strings
* only get unique ID if about to create entry
* update based on review
* Revert "update based on review"
This reverts commit 0d612a90eb7d02c92061f902973e527267e3110a.
* f-string
* fix last review
* revert cleanup changes to simplify PR
* remove unnecessary ConfigFlow object variables to simplify logic
* revert cleanup changes to make review easier, noted for future cleanup
* revert cleanup changes to make review easier, noted for future cleanup
* move zeroconf service type constant to test module
* use media player defined device classes instead of custom ones, add options flow test, add timeout options parameter
* make options update error more generic
* fix config flow options update logic
* simplify logic for options update during import
* use platform list for load and unload
* update private config flow function name and description
* fix grammar in strings.json
* update mock config variable names to be more accurate
* remove timeout conf option, create device_class property
* update requirements
* update .coveragerc to indicate that config_flow has tests
* fix source of device_class property and move constants to const.py
* fix grammar in error message
* remove redundant device check in async_setup_entry since device connection is checked during config flow
* revert change to async_setup_entry, raise ConfigEntryNotReady if device can't be connected to
* update error text
* add more context to error text
* add config flow support, device registry support, available property
* raise PlatformNotReady if HA cant connect to device
* remove test logging statement and fix integration title
* store import and last user input values so user can see errors next to value that caused error
* add PARALLEL_UPDATES
* add missing type hints
* add missing type hints to tests
* fix options config flow title
* changes based on review
* better key name for message when cant connect
* fix missed update to key name
* fix comments
* remove logger from test which was used to debug and update test function names and docstrings to be more accurate
* add __init__.py to vizio tests module
* readded options flow and updated main component to handle options updates, set unique ID to serial, fixes based on review
* pop hass.data in media_player unload instead of in __init__ since it is set in media_player
* update requirements_all and requirements_test_all
* make unique_id key name a constant
* remove additional line breaks after docstrings
* unload entries during test_user_flow and test_import_flow tests to hopefully reduce teardown time
* try to speed up tests
* remove unnecessary code, use event bus to track options updates, move patches to pytest fixtures and fix patch scoping
* fix comment
* remove translations from commit
* suppress API error logging when checking for device availability as it can spam logs
* update requirements_all and requirements_test_all
* dont pass hass to entity since it is passed to entity anyway, remove entity unload from tests, other misc changes from review
* fix clearing listeners
* use config_entry unique ID for unique ID and use config_entry entry ID as update signal
* update config flow based on suggested changes
* update volume step on config import if it doesn't match config_entry volume step
* update config_entry data and options with new volume step value
* copy entry.data and entry.options before updating when updating config_entry
* fix test_import_entity_already_configured
* add device_info property and move component to async
* use new VizioAsync class to have proper async support
* remove hass from VizioDevice init since it is not needed
* update requirements_all
* missed type hint
* updates based on review
* pyvizio version bump
* additional fixes based on review
* mistake in last commit
* remove device_info property because it can't be used unless this integration has config flow support
* move constants, move schema validation to init, prepare for zeroconf/config flow
* mistake in refactor
* update .coveragerc, move validate_auth to __init__, only attempt to get ESN if device setup is validated
* fix schema validation
* remove suppress warning config option
* remove config_flow from manifest since its not ready yet
* update requirements_all.txt
* fix issue with merge conflict
* move constants, move schema validation to init, prepare for zeroconf/config flow
* update requirements_all and make setup validation more pythonic
* mistake in refactor
* un-revert change from previous PR
* rename schema var
* update .coveragerc, move validate_auth to __init__, only attempt to get ESN if device setup is validated
* reinstate validate_setup but change logic to use new connection test function
* fix schema validation
* simplify string empty check logic
* missed commit
* add unique id property for Vizio devices so they get added to entity registry
* update requirements
* small change to make code more readable
* update to use f-string for consistency
* fix property name
* set unique_id to none if serial number couldnt be found
* set unique_id to none
* ESN should be globally unique so no device type needed. pyvizio will set ESN to None if ESN is unobtainable
* update vizio component to support latest pyvizio with soundbar support
* Resolved Hound issues
* Additional Hound issue
* Updated based on feedback
* Style updates
* Additional code styling changes
* Added check for auth token not being set for tv device_class
* Limited lines to 80 characters
* moved MAX_VOLUME into base package
* fixed supported commands
* styling changes
* fix styling yet again
* remove unnecessary elif
* removed play/pause since I can't get current state
* changed value access method from config dict
* fixed flake failures
* try to fix docstring
* try to fix docstring
* fixed auth token validation
* rebase and regenerate requirements_all.txt
* updated log text
* line length fix
* added config validation to handle conditionally optional parameter
* updated validate setup log message and string formatting based on review
* fix pylint error
* less ugly
* Consolidate
* Fix tests
* Update imports
* Fix import
* Use importlib because integration and package share name
* Fix more tests
* Update .coveragerc and CODEOWNERS