* 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>
* Optionally don't convert output of duration and time selectors
* Allow number selector selection to be None
* Never convert output of duration and time selectors
* Revert "Allow number selector selection to be None"
This reverts commit b6f52c1e83.
* Align selectors with frontend updates
* Drop metadata from MediaSelector selection
* Adjust blueprint tests
* Address review comments
* Add tests for new selectors
* Don't stringify input
* Require min+max for number selector in slider mode
* vol.Schema does not like static methods
* Tweak
* Allow area, device, and entity selectors to optionally support multiple selections like target selector
* Update according to code review comments
* Adjust tests
* Update according to review comments
* Tweak error message for multiple entities
Co-authored-by: Erik <erik@montnemery.com>
* Remove entities when config entry is removed from device
* Update tests/helpers/test_entity_registry.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Don't remove entities not connected to a config entry
* Update homeassistant/helpers/entity_registry.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>