Marc Mueller
12757a8cd2
Update typing - collections.abc (1) ( #63933 )
...
* Update typing - collections.abc (1)
* Additional typing updates
2022-01-12 07:56:35 +01:00
Marc Mueller
d3b7bd25ef
Update typing (1) ( #63922 )
2022-01-11 21:26:03 +01:00
Marc Mueller
eb2238a9e1
Add types for HassJob [helpers.event] ( #63675 )
2022-01-08 14:26:22 +01:00
Marc Mueller
250af90acb
Improve callable typing [helpers.event] ( #63543 )
2022-01-06 21:01:27 -10:00
Marc Mueller
198ade5e2b
Fix typing `TrackTemplateResultListener` [helpers.event] ( #63541 )
2022-01-06 13:43:54 -10:00
Ruslan Sayfutdinov
55f4962c06
Fix pylint plugin which checks relative imports ( #62693 )
2021-12-23 11:14:47 -08:00
Erik Montnemery
39d6aba3bc
Improve startup of unavailable template entities ( #59827 )
2021-11-22 09:20:38 -08:00
Erik Montnemery
acf58111c6
Correct initial update of async_track_template_result ( #59705 )
2021-11-15 13:00:46 +01:00
Erik Montnemery
34e5596375
Use async_track_utc_time_change to schedule short term statistics ( #58903 )
2021-11-01 10:49:54 -07:00
Erik Montnemery
bed4096430
Allow specifying a super template for async_track_template_result ( #58477 )
2021-10-27 16:07:17 +02:00
Marc Mueller
7af67d34cf
Use assignment expressions 01 ( #56394 )
2021-09-18 13:31:35 -10:00
Ville Skyttä
59809503d1
Various type hint related improvements ( #54971 )
...
* Avoid some implicit generic Anys
* Fix hassio discovery view type hints
* Fix http view result type in assert message
2021-08-21 13:58:49 +02:00
Daniel Hjelseth Høyer
fbad453c89
Pylint 2.9.3 ( #52972 )
...
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Erik Montnemery
1cc8280959
Enable basic type checking for the homeassistant component ( #52464 )
...
* Enable basic type checking for the homeassistant component
* Tweak
2021-07-05 11:26:31 +02:00
Eduard van Valkenburg
779ef3c8e1
Add timedelta option for async_call_later ( #50164 )
2021-06-12 13:14:35 +02:00
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors ( #50884 )
2021-05-20 18:53:29 +03:00
Martin Hjelmare
7c4893cbb1
Fix event action return value typing ( #50353 )
...
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
2021-05-11 16:23:59 +02: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
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
Ville Skyttä
970cbcbe15
Type hint improvements ( #49320 )
2021-04-17 08:35:21 +02:00
Erik Montnemery
16196e2e16
Don't log template errors from developer tool ( #48933 )
2021-04-09 12:10:02 -07:00
Marc Mueller
6fb2e63e49
Update typing 02 ( #48014 )
2021-03-17 18:34:19 +01:00
J. Nick Koston
c9df42b69a
Add support for pre-filtering events to the event bus ( #46371 )
2021-02-14 09:42:55 -10:00
tkdrob
c2302784c2
Use core constants for helpers ( #46240 )
2021-02-08 22:53:17 +01:00
Erik Montnemery
0780e52ca4
Support templates in event triggers ( #46207 )
...
* Support templates in event triggers
* Don't validate trigger schemas twice
2021-02-08 14:06:27 +01:00
Ville Skyttä
d13b58a4e6
Upgrade mypy to 0.800 ( #45485 )
...
* Upgrade mypy to 0.800
https://mypy-lang.blogspot.com/2021/01/mypy-0800-released.html
* Fix issues flagged by mypy 0.800
* Add overloads + small changes
* Apply grammar
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-30 22:33:53 +01:00
J. Nick Koston
2ef25e7414
Fix script wait templates with now/utcnow ( #44717 )
2021-01-01 13:03:34 +01:00
Anders Melchiorsen
650c57db5b
Fix async_track_utc_time_change firing too early ( #42176 )
2020-11-05 16:34:56 +01:00
Paulus Schoutsen
bba770b411
Fix CI ( #42397 )
2020-10-26 13:36:03 +01:00
Anders Melchiorsen
cb0c937b3e
Refresh now() templates on second=0 ( #42225 )
2020-10-23 00:11:02 +02:00
J. Nick Koston
31c21126a8
Implement time tracking in templates ( #41147 )
...
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
2020-10-19 11:02:43 +02:00
J. Nick Koston
3a9b2392f8
Suppress domain and all listeners during template rate limit ( #42005 )
2020-10-19 10:17:51 +02:00
J. Nick Koston
21cc23244d
Improve template ratelimit performance ( #41741 )
2020-10-15 12:02:05 +02:00
J. Nick Koston
53a1d92f2b
Permit event trackers to accept an empty list of entities or domains ( #41857 )
2020-10-15 09:26:51 +02:00
J. Nick Koston
1bcedd15b3
Update sun listeners to use HassJob ( #41695 )
...
Avoids checking the callable type every time sun events trigger
2020-10-13 21:37:10 +02:00
J. Nick Koston
3a863c4a0f
Fully convert async_track_time_interval to use HassJob ( #41513 )
...
The callback type for interval_listener was being determined
each time the interval hit.
This was missed in the original conversion.
2020-10-09 09:35:09 +02:00
J. Nick Koston
9e1461da62
Determine how to run listeners at setup time instead of execution time ( #41304 )
2020-10-07 16:51:50 +02:00
Franck Nijhof
ee914366a8
Add native Python types support to templates ( #41227 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-07 00:05:52 +02:00
J. Nick Koston
51da605b9f
Remove manual rate_limit control directive from templates ( #41225 )
...
Increase default rate limit for all states and entire
domain states to one minute
Ensure specifically referenced entities are excluded from
the rate limit
2020-10-04 22:40:04 +02:00
J. Nick Koston
ab17b4ab70
Simplify template tracking and make it easier to follow ( #41030 )
2020-10-02 07:27:39 -05:00
J. Nick Koston
b45215f1d2
Implement template rate_limit directive ( #40667 )
2020-10-01 21:39:44 +02:00
J. Nick Koston
7285c7806f
Seperate state change tracking from async_track_template_result into async_track_state_change_filtered ( #40803 )
2020-10-01 10:19:20 +02:00
J. Nick Koston
205cf57a77
Code cleanups for async_track_template_result ( #40737 )
2020-09-30 13:00:21 +02:00
J. Nick Koston
57b7559832
Ensure all jinja2 errors are trapped and displayed in the developer tools ( #40624 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-26 17:03:32 -05:00
J. Nick Koston
3261a904da
Reduce the number of template re-renders when we are only counting states ( #40272 )
2020-09-26 16:29:49 -05:00
J. Nick Koston
e9abb357e4
Log template listeners when debug logging is on ( #40180 )
2020-09-17 14:45:30 -05:00
J. Nick Koston
949bd8d738
Reduce listener cancelation code in template tracker ( #40040 )
2020-09-14 21:43:00 +02:00
J. Nick Koston
aaa8083d49
Change template loop detection strategy to allow self-referencing updates when there are multiple templates ( #39943 )
2020-09-12 14:20:21 +02:00
J. Nick Koston
741487a1fc
Return the listeners with the template result for the websocket api ( #39925 )
2020-09-11 13:18:40 -05:00
J. Nick Koston
e208aac834
Add async_track_state_removed_domain to allow tracking when a state is removed from a domain ( #39859 )
...
when a state is removed from a domain
2020-09-11 13:03:31 +02:00