Commit Graph

1621 Commits (506d09d0580dc8550dda5b0a36390dcf768de411)

Author SHA1 Message Date
epenet 99941b1c32
Warn on use of deprecated async_get_registry (#72088)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-18 12:04:06 -07:00
epenet 50ca14538a
Cleanup deprecated async_get_registry in core (#72087) 2022-05-18 17:58:28 +02:00
Allen Porter 26ee289be3
Add return code to integration application credentials in config flow (#71986)
* 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>
2022-05-18 06:30:57 -07:00
Franck Nijhof bfb47eb212
Final clean up of helpers accessed via hass (#72032)
* Final clean up of helpers accessed via hass

* Fix circular dep

* Fix import
2022-05-17 23:42:37 +03:00
Franck Nijhof 5f44d0f8f9
Clean up accessing storage.Store helper via hass (#72009) 2022-05-17 18:45:57 +02:00
Franck Nijhof 69cc6ab5f1
Clean up accessing entity_registry.async_get_registry helper via hass (#72005) 2022-05-17 16:40:45 +02:00
Franck Nijhof 7d2deae592
Clean up use of deprecated async_get_registry methods (#72001) 2022-05-17 13:40:19 +02:00
J. Nick Koston a614ddca28
Support requesting translations for multiple integrations in a single request (#71979) 2022-05-17 01:23:11 -05:00
Paulus Schoutsen 3b88c6c012
Inverse parallel updates default check, follow sync "update" method (#71720) 2022-05-16 17:10:34 -07:00
Erik Montnemery 4885331509
Fail template functions when no default specified (#71687) 2022-05-13 09:46:49 -07:00
Paulus Schoutsen 64636a4310
Add service entity context (#71558)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-05-09 14:45:53 -07:00
J. Nick Koston 30fdfc454f
Avoid lowercasing entities after template ratelimit recovery (#71415) 2022-05-09 12:48:38 +02:00
Joakim Plate 2dbe910e31
Adjust warning for missing entites (#71343) 2022-05-09 12:37:24 +02:00
Paulus Schoutsen e35a5a1a28
Fix other enums in helpers (#71505) 2022-05-07 20:57:48 -07:00
Paulus Schoutsen b1a04302b5
Stringify enums in selectors (#71441) 2022-05-06 11:25:01 -07:00
Paulus Schoutsen c8f95b7dfc
Ignore loading system entity category (#71361) 2022-05-05 14:33:37 -07:00
Paulus Schoutsen 353cc0b8c2
Fix importing blueprints (#71365)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-05-05 14:33:17 -07:00
Erik Montnemery eba125b093
Ensure 'this' variable is always defined for template entities (#70911) 2022-05-03 07:43:44 -07:00
Franck Nijhof 99360ad7f4
Indicate disabled steps in script trace (#71237) 2022-05-03 13:04:59 +02:00
Erik Montnemery 92f1855bcf
Fix script conditions (#71235) 2022-05-03 11:28:08 +02:00
Erik Montnemery 1931600eac
Isolate parallel subscripts (#71233) 2022-05-03 10:36:58 +02:00
Erik Montnemery 1aaf78ef99
Remove entity category system in favor of hidden_by (#68550) 2022-05-02 09:33:16 -07:00
Franck Nijhof a4682ae6e1
Adjust version number in template default deprecation warning (#71203) 2022-05-02 18:35:37 +03:00
Erik Montnemery f35e7d1129
Allow cancelling async_at_start helper (#71196) 2022-05-02 07:41:14 -07:00
Erik Montnemery f6c2fb088c
Stop script if sub-script stops or aborts (#71195) 2022-05-02 14:59:58 +02:00
Allen Porter 00b5d30e24
Add application credentials platform (#69148)
* 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>
2022-04-30 08:06:43 -07:00
Franck Nijhof 682ac52a20
Support shorthand logical operators in script sequences (#71022) 2022-04-29 18:06:21 +02:00
Marc Mueller 283c04e424
Improve typing [helpers.entity] (#70890) 2022-04-28 10:52:42 +02:00
Marc Mueller 93cbb331e5
Update Mypy to 0.950 (#70948)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-27 20:49:54 -05:00
Marc Mueller 964c764dae
Improve typing [helpers.sun] (#70892) 2022-04-27 17:19:46 +02:00
Marc Mueller 7dfe8591c4
Improve typing [helpers.event] (#70891) 2022-04-27 17:19:06 +02:00
Erik Montnemery c5d69ab1b2
Handle removed entites in collection.sync_entity_lifecycle (#70759)
* Handle removed entites in collection.sync_entity_lifecycle

* Add comment
2022-04-27 08:05:00 -07:00
Marc Mueller 97af164858
Prepare for upcoming mypy update (#70800) 2022-04-26 07:41:52 -07:00
Paulus Schoutsen 5317bf02e6
Fix hidden default (#70699) 2022-04-25 10:10:42 -07:00
Erik Montnemery f6d9c75476
Remove metadata from device conditions and triggers (#70695) 2022-04-25 09:48:24 -07:00
Marc Mueller 9b9b553521
Disable no-self-use [pylint] (#70641)
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
Dave T 70e125850c
Limit autogenerated entity_id string length (#69739) 2022-04-21 22:39:51 -07:00
Franck Nijhof 7b75a16745
Add visible by default property to base Entity (#70370) 2022-04-21 22:06:34 -07:00
Marc Mueller 90dab235f7
Update pylint to 2.13.7 (#70381)
* Update pylint to 2.13.7

* Spelling

* Remove old pylint config value

* Code updates
2022-04-21 13:02:52 -07:00
Franck Nijhof 35687def02
Merge stop & error script actions (#70109) 2022-04-20 14:22:37 -07:00
Erik Montnemery 64381acbaf
Mark device actions from hidden or auxiliary entities as secondary (#70278) 2022-04-20 10:48:46 -07:00
akloeckner d20a620590
Make `this` variable available in template entities (#65201)
* feat: make this variable available in template entities

This makes the variable `this` available in template entities.
It will simplify the use of self-referencing template entities.
Because, without this, we have to repeat the entity id every time.
If we can solve this without explicitly spelling the entity id,
code can be re-used much better.

As a side-effect, this will allow to use `variables`-like patterns,
where attributes can be used as variables to calculate subsequent attributes or state.

Example:
```yaml
template:
  sensor:
    - name: test
      state: "{{ this.attributes.test }}"
      # not: "{{ state_attr('sensor.test', 'test' }}"
      attributes:
        test: "{{ now() }}"
```

* expose entity_id instead of this

* add test

* Refactor to expose this variable

* Tweak repr dunder

Co-authored-by: Erik <erik@montnemery.com>
2022-04-20 15:30:17 +02:00
Thomas Lovén b50f369fe4
Add shorthand notation for boolean conditions (#70120) 2022-04-18 22:09:09 +02:00
Franck Nijhof ce1f074ca9
Add Template selector (#70229) 2022-04-18 11:28:01 -07:00
J. Nick Koston 026e1635cc
Rename async_process_integration_platform to async_process_integration_platform_for_component (#70217) 2022-04-17 20:59:31 -10:00
J. Nick Koston b4ef150339
Add a guard when there are no integration platforms loaded (#70182) 2022-04-17 22:45:52 -07:00
J. Nick Koston c393622b64
Avoid calling time.monotonic on coordinator refresh unless we are debugging (#70209) 2022-04-17 22:40:44 -07:00
J. Nick Koston 42c448c422
Add the ability to process integration platforms on demand (#70174) 2022-04-17 00:23:00 -10:00
Raman Gupta 3bcd921a28
Add entity registry helper to update entity platform (#69162)
* 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
2022-04-16 16:18:52 -04:00
Franck Nijhof 1b48d7eda1
Add for each item support to repeat action (#70093) 2022-04-15 19:10:25 +02:00