J. Nick Koston
8bee25c938
Fix stop listener memory leak in DataUpdateCoordinator on retry ( #49186 )
...
* Fix stop listener leak in DataUpdateCoordinator
When an integration retries setup it will add a new stop listener
* Skip scheduled refreshes when hass is stopping
* Update homeassistant/helpers/update_coordinator.py
* ensure manual refresh after stop
2021-04-14 12:16:59 -10:00
Tobias Sauerwein
9d4ad1821e
Fix logic of entity id extraction ( #49164 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-14 14:12:26 +02:00
J. Nick Koston
44beff31c2
Cancel config entry retry, platform retry, and polling at the stop event ( #49138 )
2021-04-13 16:16:26 -10:00
J. Nick Koston
82790cd28d
Do not compile static templates ( #49148 )
...
self._compiled_code is unreachable if self.is_static
2021-04-13 16:51:56 +02:00
Raman Gupta
769923e8dd
Raise exception for invalid call to DeviceRegistry.async_get_or_create ( #49038 )
...
* Raise exception instead of returning None for DeviceRegistry.async_get_or_create
* fix entity_platform logic
2021-04-13 14:18:51 +02:00
J. Nick Koston
53853f035d
Prevent calling stop or restart services during db upgrade ( #49098 )
2021-04-12 17:18:38 -07:00
Erik Montnemery
ff5fbea1fb
Improve trace of template conditions ( #49101 )
...
* Improve trace of template conditions
* Refactor
* Fix wait_template trace
* Update tests
2021-04-12 20:22:28 +02:00
Franck Nijhof
a610076001
Support min()/max() as template function ( #48996 )
2021-04-12 10:02:04 +02:00
Erik Montnemery
7e4be921a8
Add helper to get an entity's supported features ( #48825 )
...
* Add helper to check entity's supported features
* Move get_supported_features to helpers/entity.py, add tests
* Fix error handling and improve tests
2021-04-10 08:19:16 +02:00
J. Nick Koston
4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth ( #48962 )
2021-04-09 19:41:29 -10:00
Jason
7cc857a298
Add custom JSONEncoder for subscribe_trigger WS endpoint ( #48664 )
2021-04-09 20:47:10 -07:00
Erik Montnemery
16196e2e16
Don't log template errors from developer tool ( #48933 )
2021-04-09 12:10:02 -07:00
J. Nick Koston
40450b9cfd
Detach aiohttp.ClientSession created by config entry setup on unload ( #48908 )
2021-04-09 10:14:33 -07:00
Marc Mueller
8e2b5b36b5
Bump pyupgrade to 2.12.0 ( #48943 )
2021-04-09 09:58:27 -07:00
Erik Montnemery
d1df6e6fba
Don't get code_context when calling inspect.stack ( #48849 )
...
* Don't get code_context when calling inspect.stack
* Update homeassistant/helpers/config_validation.py
2021-04-09 07:26:09 +02:00
Erik Montnemery
9f5db2ce3f
Improve warnings on undefined template errors ( #48713 )
2021-04-06 12:11:42 -07:00
J. Nick Koston
12e3bc8101
Provide api to see which integrations are being loaded ( #48274 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-04 22:11:44 -10:00
J. Nick Koston
b5c679f3d0
Apply ConfigEntryNotReady improvements to PlatformNotReady ( #48665 )
...
* Apply ConfigEntryNotReady improvements to PlatformNotReady
- Limit log spam #47201
- Log exception reason #48449
- Prevent startup blockage #48660
* coverage
2021-04-04 12:31:58 +02:00
J. Nick Koston
3bc583607f
Optimize storage collection entity operations with asyncio.gather ( #48352 )
2021-04-03 23:35:33 -10:00
Paulus Schoutsen
e882460933
Support modern config for the trigger based template entity ( #48635 )
2021-04-02 16:57:16 -07:00
FMKaiba
09eb74fd9d
Upgrade Astral to 2.2 ( #48573 )
2021-04-02 00:29:08 +02:00
Franck Nijhof
4e3c12883e
Allow templatable service target to support scripts ( #48600 )
2021-04-01 13:10:01 -07:00
Erik Montnemery
9f481e1642
Include script script_execution in script and automation traces ( #48576 )
2021-04-01 09:42:23 -07:00
Ruslan Sayfutdinov
a6759d731d
Use Mapping[str, Any] instead of dict in Entity ( #48421 )
2021-03-31 19:34:00 +02:00
Erik Montnemery
b26779a27a
Add id to automation triggers ( #48464 )
2021-03-31 14:56:04 +02:00
Bram Kragten
d1a1e70726
Search for areas used in automations and scripts ( #48499 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-30 15:01:56 -07:00
Marc Mueller
2956eb0902
Update pylint to 2.7.3 ( #48488 )
...
* Update pylint to 2.7.3
* Add class-const-naming-style
* Remove unused-import message
* Additional cleanup
2021-03-29 18:02:56 -10:00
J. Nick Koston
a851bff95a
Create async_config_entry_first_refresh to reduce coordinator boilerplate ( #48451 )
2021-03-29 12:51:39 -10:00
Franck Nijhof
38d14702fa
Remove HomeAssistantType alias from helpers ( #48400 )
2021-03-27 12:55:24 +01:00
Franck Nijhof
45f77ccccf
Merge of nested IF-IF cases - Core ( #48364 )
2021-03-27 09:23:32 +01:00
J. Nick Koston
79af18a8ab
Bump httpx to 0.17.1 ( #48388 )
...
* Bump httpx to 0.17.1
* git add
* typing
* add test
* tweak
2021-03-27 09:02:01 +01:00
Paulus Schoutsen
63e3012380
Fix script default trace ( #48390 )
2021-03-26 23:56:40 -07:00
Erik Montnemery
c6a20d0fc1
Improve traces for nested script runs ( #48366 )
2021-03-26 10:14:01 -07:00
J. Nick Koston
c4f98a3084
Small speed up to adding entities ( #48353 )
2021-03-26 12:05:19 +01:00
Franck Nijhof
f0e5e616a7
Fix device discovery of OAuth2 config flows ( #48326 )
2021-03-25 10:35:01 -07:00
Erik Montnemery
8896ae0d56
Add support for tracing script execution ( #48276 )
...
* Add support for tracing script execution
* Tweak
2021-03-24 17:56:22 +01:00
Erik Montnemery
9f8b697e64
Refactor tracing: Prepare for tracing of scripts ( #48231 )
2021-03-23 14:53:38 -07:00
Franck Nijhof
6932cf9534
Use contextlib.suppress where possible ( #48189 )
2021-03-23 14:36:43 +01:00
Franck Nijhof
dc15f243e6
Upgrade pyupgrade to v2.11.0 ( #48220 )
2021-03-22 13:29:39 +01:00
Erik Montnemery
272dffc384
Improve script tracing ( #48100 )
...
* Improve script tracing
* Fix test
2021-03-22 13:15:45 +01:00
Erik Montnemery
f8755a52c2
Warn on undefined variables in templates ( #48140 )
...
* Warn on undefined variables in templates
* Add test
* fix tests
* fix tests
2021-03-20 15:16:04 +01:00
Franck Nijhof
fb849b81b5
Rewrite of not a == b occurances ( #48132 )
2021-03-20 01:27:04 +01:00
J. Nick Koston
c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period ( #48064 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Marc Mueller
4cb7718192
Update typing 16 ( #48087 )
2021-03-18 22:58:19 +01:00
Erik Montnemery
7b717bc437
Correct trace for repeat script actions ( #48031 )
2021-03-18 13:14:06 -07:00
J. Nick Koston
08db262972
Add a service to reload config entries that can easily be called though automations ( #46762 )
2021-03-17 21:27:21 -07:00
Marc Mueller
6fb2e63e49
Update typing 02 ( #48014 )
2021-03-17 18:34:19 +01:00
Alan Tse
f86e7535e0
Add location details to deprecation warning ( #47155 )
2021-03-16 21:16:07 +01:00
Erik Montnemery
1cde1074c9
Correct trace for choose and repeat script actions ( #47973 )
...
* Correct trace for choose and repeat script actions
* only choose-wrap the choices
* Update tests
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-16 08:49:16 +01:00
Erik Montnemery
f82e59c32a
Make it possible to list debug traces for a specific automation ( #47744 )
2021-03-15 16:51:04 -07:00