Artur Pragacz and GitHub
e144804d28
Fix async_unload teardown race in scripts ( #169562 )
2026-05-05 15:03:37 +02:00
epenet and GitHub
7169d52010
Remove import annotations from core ( #169547 )
2026-04-30 20:34:43 +02:00
Erik Montnemery and GitHub
4b28928702
Remove scripts from DATA_SCRIPTS on unload ( #169415 )
2026-04-29 18:09:49 +02:00
Erik Montnemery and GitHub
3be1aa5441
Include errors in script trace when continue_on_error is set ( #168676 )
2026-04-29 17:30:47 +02:00
Erik Montnemery and GitHub
62082bdf14
Use modern condition API in script helper ( #169355 )
2026-04-29 08:51:57 +02:00
Erik Montnemery and GitHub
a92277b7fa
Add method Script.unload ( #169036 )
2026-04-24 15:12:17 +02:00
5cb5b0eb45
Handle wait_for_trigger service actions when extracting references ( #161706 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com >
2026-01-28 10:37:39 +00:00
Abílio Costa and GitHub
0ea03f549c
Support target conditions in script relation extraction ( #161338 )
2026-01-21 12:01:15 +00:00
Artur Pragacz and GitHub
2d33a720f7
Modernise condition checker in helper ( #159159 )
2025-12-16 10:46:10 +01:00
karwosts and GitHub
ddd8cf7fde
Fix a bad script error message ( #157654 )
2025-12-01 15:19:30 -05:00
karwosts and GitHub
03b15f1dba
Log script condition warnings with the instance logger ( #154966 )
2025-10-24 18:42:17 +02:00
35f9cc55f1
Fix Automation/Script: sequence within a parallel ignoring enabled flag ( #142977 )
...
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com >
Co-authored-by: Franck Nijhof <git@frenck.dev >
2025-04-19 11:49:05 +02:00
alorente and GitHub
63df2474a9
Fix missing response for queued mode scripts ( #141460 )
2025-03-28 10:47:41 +00:00
Artur Pragacz and GitHub
798ee60ae5
Make variables action not restricted to local scopes ( #141114 )
...
Make variables action in scripts not restricted to local scopes
2025-03-23 14:07:52 +01:00
b964bc58be
Fix variable scopes in scripts ( #138883 )
...
Co-authored-by: Erik <erik@montnemery.com >
2025-02-26 16:19:19 +01:00
Artur Pragacz and GitHub
7117708937
Improve reading clarity of steps code in scripts helper ( #134395 )
...
* Reorganize steps code in scripts helper
* Address feedback
* Revert to getattr
2025-02-19 19:37:36 +01:00
Artur Pragacz and GitHub
6c3a9cb1a8
Improve reading clarity of steps code in scripts helper part 1 ( #138628 )
2025-02-19 11:18:28 -06:00
Ville Skyttä and GitHub
40eb8b91cc
Adjust to recommended propcache.api import paths ( #136150 )
2025-01-21 10:58:22 +01:00
Joost Lekkerkerker and GitHub
b4f4b06f29
Enable RUF021 ( #135832 )
2025-01-17 10:20:45 +01:00
Artur Pragacz and GitHub
b009f11013
Fix referenced objects in script sequences ( #135499 )
2025-01-13 11:40:53 +01:00
epenet and GitHub
5df7092f41
Improve formatting in core files ( #135256 )
...
* Adjust core files formatting
* Adjust translations script
2025-01-10 09:08:37 +01:00
Franck Nijhof and GitHub
56b4733e4a
Clean up early assignment in script response ( #131691 )
2024-11-27 10:24:06 +01:00
Petro31 and GitHub
33222436d2
Nested stop actions will now return response_variables ( #126393 )
...
fix-nested-stop-variable-response
2024-11-27 09:18:02 +01:00
756a866ffd
Add completed to the wait variable when using triggers (wait_for_trigger) ( #123427 )
...
* Add support for the wait.completed variable when using wait with triggers
* Remove junk comment
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com >
2024-10-23 17:19:07 +02:00
J. Nick Koston and GitHub
0f29fd3e10
Switch to using fast cached_property implementation in propcache ( #127339 )
2024-10-03 13:11:02 -05:00
b3377fe5fb
Add condition to trigger template entities ( #119689 )
...
* Add conditions to trigger template entities
* Add tests
* Fix ruff error
* Ruff
* Apply suggestions from code review
* Deduplicate
* Tweak name used in debug message
* Add and improve type annotations of modified code
* Adjust typing
* Adjust typing
* Add typing and remove unused parameter
* Adjust typing
Co-authored-by: Martin Hjelmare <marhje52@gmail.com >
* Adjust return type
Co-authored-by: Martin Hjelmare <marhje52@gmail.com >
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com >
Co-authored-by: Martin Hjelmare <marhje52@gmail.com >
2024-09-11 09:36:49 +02:00
Erik Montnemery and GitHub
992de497f2
Remove unnecessary assignment of Template.hass from script helper ( #123780 )
2024-08-13 11:55:37 +02:00
Erik Montnemery and GitHub
efb7bede40
Enable strict typing on script helper ( #122075 )
2024-07-17 13:51:59 +02:00
Erik Montnemery and GitHub
385f5be7e8
Remove dead code from script helper ( #122074 )
2024-07-17 13:16:57 +02:00
Marc Mueller and GitHub
ca55986057
Import Generator from collections.abc (1) ( #120914 )
2024-07-01 11:51:51 +02:00
J. Nick Koston and GitHub
ad7097399e
Ensure multiple executions of a restart automation in the same event loop iteration are allowed ( #119100 )
...
* Add test for restarting automation
related issue #119097
* fix
* add a delay since restart is an infinite loop
* tests
2024-06-08 17:07:39 -04:00
Marc Mueller and GitHub
fe21e2b8ba
Import Generator from typing_extensions (1) ( #118986 )
2024-06-06 17:02:13 +02:00
J. Nick Koston and GitHub
7bbb33b415
Improve script disallowed recursion logging ( #118151 )
2024-05-26 12:58:34 +02:00
Marc Mueller and GitHub
0e03e591e7
Improve callable annotations ( #118024 )
2024-05-24 10:24:09 +02:00
9224997411
Add sequence action for automations & scripts ( #117690 )
...
Co-authored-by: Robert Resch <robert@resch.dev >
2024-05-24 09:34:49 +02:00
Marc Mueller and GitHub
900b6211ef
Use PEP 695 for function annotations (2) ( #117659 )
2024-05-18 11:44:39 +02:00
Marc Mueller and GitHub
87bb7ced79
Use PEP 695 for simple type aliases ( #117633 )
2024-05-17 14:42:21 +02:00
Matthias Alphart and GitHub
ec4c8ae228
Allow templates for enabling actions ( #117049 )
...
* Allow templates for enabling automation actions
* Use `cv.template` instead of `cv.template_complex`
* Rename test function
2024-05-15 21:03:52 +02:00
ac54cdcdb4
Enable Ruff RUF010 ( #115371 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2024-05-08 23:54:49 +02:00
Marc Mueller and GitHub
8f614fb06d
Use HassKey for helpers (2) ( #117013 )
2024-05-07 11:24:13 -05:00
Sid and GitHub
2cc916db6d
Replace pylint broad-except with Ruff BLE001 ( #116250 )
2024-05-07 14:00:27 +02:00
Sid and GitHub
b456d97e65
Replace pylint protected-access with Ruff SLF001 ( #115735 )
2024-05-06 20:33:26 +02:00
J. Nick Koston and GitHub
91fa8b50cc
Turn on thread safety checks in async_dispatcher_send ( #116867 )
...
* Turn on thread safety checks in async_dispatcher_send
We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash
* Turn on thread safety checks in async_dispatcher_send
We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash
* adjust
2024-05-05 16:29:43 -04:00
J. Nick Koston and GitHub
164403de20
Add thread safety checks to async_create_task ( #116339 )
...
* Add thread safety checks to async_create_task
Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here
* Add thread safety checks to async_create_task
Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here
* missed one
* Update homeassistant/core.py
* fix mocks
* one more internal
* more places where internal can be used
* more places where internal can be used
* more places where internal can be used
* internal one more place since this is high volume and was already eager_start
2024-04-28 18:29:00 -04:00
J. Nick Koston and GitHub
7715bee6b0
Fix script in restart mode that is fired from the same trigger ( #116247 )
2024-04-27 07:08:29 -05:00
J. Nick Koston and GitHub
a22c221722
Rename bus._async_fire to bus.async_fire_internal ( #116027 )
2024-04-23 22:28:31 +02:00
J. Nick Koston and GitHub
4529268544
Ensure scripts with timeouts of zero timeout immediately ( #115830 )
2024-04-19 18:24:54 +02:00
J. Nick Koston and GitHub
f80894d56f
Stop scripts with eager tasks ( #115340 )
2024-04-10 08:41:13 -04:00
J. Nick Koston and GitHub
569f54d8e3
Terminate scripts with until and while conditions that execute more than 10000 times ( #115110 )
2024-04-07 11:02:53 -10:00
0d66d298ec
Enable Ruff RET504 ( #114528 )
...
* Enable Ruff RET504
* fix test
* Use noqa instead of cast
* fix sonos RET504
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com >
2024-04-06 11:07:37 +02:00