Marc Mueller
f1d48ddfe3
Update pylint to 2.8.0 ( #49637 )
2021-04-24 14:39:24 -10:00
jan iversen
49c23bad29
Revert "Remove HomeAssistantType from typing.py as it is no...2 ( #49617 )
...
This reverts commit 39cb22374d
.
Added comment that HomeAssistantType is not to be used, but only
kept in order not to break custom components.
2021-04-24 09:10:07 -10:00
jan iversen
39cb22374d
Remove HomeAssistantType from typing.py as it is no longer used. ( #49593 )
2021-04-23 11:08:58 +02:00
Erik Montnemery
d28b959a09
Improve sun condition trace ( #49551 )
2021-04-22 16:46:27 -07:00
Paulus Schoutsen
1016d4ea28
Support trigger-based template binary sensors ( #49504 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-22 14:54:28 -07:00
Marc Mueller
c07646db5d
Update typing syntax ( #49480 )
...
* Update typing syntax
* Replace typing imports with ones from collections where possible
* Changes after review
2021-04-20 17:40:41 +02:00
Erik Montnemery
a968dea152
Fix deadlock when restarting scripts ( #49410 )
2021-04-19 14:45:01 +02:00
J. Nick Koston
6048e88c8b
Improve debuggability by providing job as an arg to loop.call_later ( #49328 )
...
Before
`<TimerHandle when=1523538.181864923 async_track_point_in_utc_time.<locals>.run_action() at /usr/src/homeassistant/homeassistant/helpers/event.py:1177>`
After
`<TimerHandle when=1524977.1818648616 async_track_point_in_utc_time.<locals>.run_action(<Job HassJobType.Coroutinefunction <bound method DataUpdateCoordinator._handle_refresh_interval of <homeassistant.components.roku.RokuDataUpdateCoordinator object at 0x7fcc978a51c0>>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:1175>`
2021-04-19 11:02:17 +02:00
J. Nick Koston
f96a6e878f
Ensure restore state is not written after the stop event ( #49329 )
...
If everything lined up, the states could be written
while Home Assistant is shutting down after the stop
event because the interval tracker was not canceled on
the stop event.
2021-04-17 09:03:18 +02:00
Ville Skyttä
970cbcbe15
Type hint improvements ( #49320 )
2021-04-17 08:35:21 +02:00
Erik Montnemery
2c8b7c56f5
Fix race when restarting script ( #49247 )
2021-04-16 09:03:34 +02:00
Mike Degatano
236d274351
Add `search` and `match` as Jinja tests ( #49229 )
2021-04-15 20:13:27 +02:00
Ruslan Sayfutdinov
80f66f301b
Define data flow result type ( #49260 )
...
* Define data flow result type
* Revert explicit definitions
* Fix tests
* Specific mypy ignore
2021-04-15 07:17:07 -10:00
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