* Move entity/area resolution to async_match_states
* Special case for covers in HassTurnOn/Off
* Enable light color/brightness on areas
* Remove async_register from default agent
* Remove CONFIG_SCHEMA from conversation component
* Fix intent tests
* Fix light test
* Move entity/area resolution to async_match_states
* Special case for covers in HassTurnOn/Off
* Enable light color/brightness on areas
* Remove async_register from default agent
* Remove CONFIG_SCHEMA from conversation component
* Fix intent tests
* Fix light test
* Fix humidifier intent handlers
* Remove DATA_CONFIG for conversation
* Copy ServiceIntentHandler code to light
* Add proper errors to humidifier intent handlers
* Add translation_key attribute to entity state
* Update accuweather test
* Index entity translation keys by platform
* Store translation key in entity registry
* Make validate async in SchemaOptionsFlowHandler
* Adjust group
* Adjust tests
* Move all to async
* Adjust integrations
* Missed an integration
* Missed one
* Rebase to fix conflict
* Upgrade pytest-aiohttp
* Make sure executors, tasks and timers are closed
Some test will trigger warnings on garbage collect, these warnings
spills over into next test.
Some test trigger tasks that raise errors on shutdown, these spill
over into next test.
This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.
Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309
* Replace loop with event_loop
* Make sure time is frozen for tests
* Make sure the ConditionType is not async
/home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
def wrapper(*args, **kwargs):
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
* Increase litejet press tests with a factor 10
The times are simulated anyway, and we can't stop the normal
event from occuring.
* Use async handlers for aiohttp
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
/Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
warnings.warn(
* Switch to freezegun in modbus tests
The tests allowed clock to tick in between steps
* Make sure skybell object are fully mocked
Old tests would trigger attempts to post to could services:
```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```
* Fix sorting that broke after rebase
* Allow configuring country and language in core config
* Add script for updating list of countries
* Use black for formatting
* Fix quoting
* Move country codes to a separate file
* Address review comments
* Add generated/countries.py
* Get default language from owner account
* Remove unused variable
* Add script to generate list of supported languages
* Add tests
* Fix stale docsring
* Use format_python_namespace
* Correct async_user_store
* Improve typing
* Fix with_store decorator
* Initialize language in core store migration
* Fix startup
* Tweak
* Apply suggestions from code review
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Update storage.py
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Create repairs issue if an outdated currency code is configured
* Add script for updating list of currencies
* Use black for formatting
* Move currency codes to a separate file
* Address review comments
* Add suggested_unit_of_measurement attribute to sensors
* Lazy calculation of initial entity options
* Add type alias for entity options
* Small tweak
* Add tests
* Store suggested_unit_of_measurement in its own option key
* Adapt to renaming of IMPERIAL_SYSTEM
* Fix rebase mistakes
* Apply suggestions from code review
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Improve check of new_entity_id in entity_registry.async_update_entity
* Fix race in rfxtrx config flow
* Make sure Event is created on time
* Rename poorly named variable
* Fix typing
* Correct typing of _handle_state_change
* Speed up generation of template states
* tweak
* cache
* cache hash
* weaken
* Revert "weaken"
This reverts commit 4856f50080.
* lower cache size as it tends to be the same ones over and over
* lower cache size as it tends to be the same ones over and over
* lower cache size as it tends to be the same ones over and over
* cover
* Update homeassistant/helpers/template.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* id reuse is possible
* account for iterting all sensors
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Remove async_remove_listener
This avoids the ambuigity as to what happens if same callback is added multiple times.
* Keep track of a context for each listener
This allow a update coordinator to adapt what data to request on update from the backing service based on which entities are enabled.
* Clone list before calling callbacks
The callbacks can end up unregistering and modifying the dict while iterating.
* Only yield actual values
* Add a test for update context
* Factor out iteration of _listeners to helper
* Verify context is passed to coordinator
* Switch to Any as type instead of object
* Remove function which use was dropped earliers
The use was removed in 8bee25c938
* Add return code to integration application credentials in config flow
* Update google tests to use new return code
* Update spotify test for no auth configured
* Add translation for oauth2_missing_credentials
* Add new return code to yolink
* Update homeassistant/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Initial developer credentials scaffolding
- Support websocket list/add/delete
- Add developer credentials protocol from yaml config
- Handle OAuth credential registration and de-registration
- Tests for websocket and integration based registration
* Fix pydoc text
* Remove translations and update owners
* Update homeassistant/components/developer_credentials/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/developer_credentials/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Remove _async_get_developer_credential
* Rename to application credentials platform
* Fix race condition and add import support
* Increase code coverage (92%)
* Increase test coverage 93%
* Increase test coverage (94%)
* Increase test coverage (97%)
* Increase test covearge (98%)
* Increase test coverage (99%)
* Increase test coverage (100%)
* Remove http router frozen comment
* Remove auth domain override on import
* Remove debug statement
* Don't import the same client id multiple times
* Add auth dependency for local oauth implementation
* Revert older oauth2 changes from merge
* Update homeassistant/components/application_credentials/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Move config credential import to its own fixture
* Override the mock_application_credentials_integration fixture instead per test
* Update application credentials
* Add dictionary typing
* Use f-strings as per feedback
* Add additional structure needed for an MVP application credential
Add additional structure needed for an MVP, including a target
component Xbox
* Add websocket to list supported integrations for frontend selector
* Application credentials config
* Import xbox credentials
* Remove unnecessary async calls
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Import credentials with a fixed auth domain
Resolve an issue with compatibility of exisiting config entries when importing
client credentials
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add entity registry helper to migrate entity to new platform
* Add additional assertion
* Add more properties to migration logic
* Change logic after thinking about erik's comments
* Require new_config_entry_id if entry.config_entry_id is not None
* Create private async_update_entity function that all update functions use
* Don't have special handling for entity ID missing in async_update_entity_platform
* fix docstring
* rebase off current
* rearrange
* Overload selector function
* Update/fix all selector references
* better typing?
* remove extra option
* move things around
* Switch to Sequence type to avoid ignoring mypy error
* Get rid of ...'s
* Improve typing to reduce number of ignores
* Remove all typing ignores
* Make config optional for selectors that don't need a config
* add missing unit prefixes
* Rename TypedDicts
* Update homeassistant/helpers/selector.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* review feedback
* remove peta from integration integration
* Fix min_max
* Revert change to selector function
* Fix logic
* Add typing for selector classes
* Update selector.py
* Fix indent
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add support for new select selector properties
* fix mode option
* Apply suggestions from code review
* Correct validation for empty options, update tests
Co-authored-by: Erik Montnemery <erik@montnemery.com>