Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 ( #116250 )
2024-05-07 14:00:27 +02:00
J. Nick Koston
a22c221722
Rename bus._async_fire to bus.async_fire_internal ( #116027 )
2024-04-23 22:28:31 +02:00
Erik Montnemery
7cd0fe3c5f
Don't reload other automations when saving an automation ( #80254 )
...
* Only reload modified automation
* Correct check for existing automation
* Add tests
* Remove the new service, improve ReloadServiceHelper
* Revert unneeded changes
* Update tests
* Address review comments
* Improve test coverage
* Address review comments
* Tweak reloader code + add a targetted test
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Explain the tests + add more variations
* Fix copy-paste mistake in test
* Rephrase explanation of expected test outcome
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-16 15:58:57 +02:00
J. Nick Koston
288f3d84ba
Fix duplicate automation entity state writes ( #115386 )
...
_async_attach_triggers was writing state, async_enable was
writing state, and all of them were called async_added_to_hass
After entity calls async_added_to_hass via add_to_platform_finish
it will also write state so there were some paths that
did it 3x
async_disable was also writing state when the entity was
removed
2024-04-10 21:15:21 -04:00
J. Nick Koston
63545ceaa4
Ensure automations do not execute from a trigger if they are disabled ( #115305 )
...
* Ensure automations are stopped as soon as the stop future is set
* revert script changes and move them to #115325
2024-04-10 08:42:18 -04:00
J. Nick Koston
59d92f16bd
Use shorthand attributes in automation for name ( #115246 )
2024-04-09 07:04:12 -10:00
J. Nick Koston
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately ( #115169 )
2024-04-08 10:07:54 -10:00
Marc Mueller
816ce116bf
Remove unnecessary functools.cached_property backport ( #114239 )
2024-04-04 11:24:26 +02:00
J. Nick Koston
13d6ebaabf
Avoid delaying automation/script startup for sample blueprints ( #114277 )
...
Avoid delaying automation/script startup to check if the blueprint folder exists
automations and script both populate sample blueprints if none exist
The check to see if the blueprint folder exists always had to create
an executor job which would delay startup a bit if the executor was
busy. Since we do not need the sample blueprints to be populated
until the start event, we can run this in a task.
2024-03-27 09:55:59 +01:00
Marc Mueller
81c34ac952
Fix spelling [docstrings + comments] ( #114168 )
2024-03-25 11:33:00 +01:00
Franck Nijhof
670bd97777
Find referenced labels in automations & scripts ( #113812 )
2024-03-19 16:28:37 +01:00
Franck Nijhof
38d0854b70
Find referenced floors in automations & scripts ( #113802 )
2024-03-19 14:18:53 +01:00
J. Nick Koston
1949b9936b
Simplify automation startup logic ( #113122 )
2024-03-11 15:41:05 -10:00
Marc Mueller
ff3a801936
Add empty line after module docstring [a-d] ( #112697 )
2024-03-08 14:51:32 +01:00
J. Nick Koston
6a62a39456
Start automations with eager tasks ( #111568 )
2024-02-26 16:30:00 -10:00
J. Nick Koston
f96f4d31f7
Convert referenced registry functions to use cached_property ( #108895 )
...
* Convert referenced registry functions to use cached_property
These already implemented caching, but now that we can use cached_property
because the lock problem is solved, we can make the code simplier and faster
* missed one
* make them the same
2024-01-26 23:02:42 -05:00
Erik Montnemery
9bff039d17
Add set_conversation_response script action ( #108233 )
...
* Add set_conversation_response script action
* Update homeassistant/components/conversation/trigger.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Revert accidental change
* Add test
* Ignore mypy
* Remove incorrect callback decorator
* Update homeassistant/helpers/script.py
* Add test with templated set_conversation_response
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-01-23 09:13:42 -05:00
J. Nick Koston
4b7a313ece
Use identity checks for CoreState ( #107846 )
...
Some of the checks used ==, and some used is. Switch
everything to is as its faster
2024-01-12 10:21:26 +01:00
Erik Montnemery
c805ea7b4f
Include deprecated constants in wildcard imports ( #107114 )
2024-01-05 11:46:45 +01:00
Robert Resch
db985925c4
Deprecate deprecated automation constants ( #106067 )
2023-12-19 19:22:13 +01:00
J. Nick Koston
d00934a8f8
Refactor automation trigger attachment to avoid creating a closure ( #102288 )
2023-10-18 22:42:15 -10:00
Erik Montnemery
df73850f56
Move definition of attributes excluded from history to entity classes ( #100430 )
...
* Move definition of attributes excluded from history to entity classes
* Revert change which should be in a follow-up PR
* Fix sun unrecorded attributes
* Fix input_select unrecorded attributes
2023-09-21 15:02:47 +02:00
Erik Montnemery
fbcc5318c5
Move attributes to be excluded from recording to entity classes ( #100239 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-20 18:09:12 +02:00
Erik Montnemery
7e7cb15d5b
Revert "Allows defining list of attributes excluded from history in manifest.json" ( #99300 )
...
Revert "Allows defining list of attributes excluded from history in manifest.json (#99283 )"
This reverts commit 0366e14630
.
2023-08-30 08:26:26 +02:00
Erik Montnemery
0366e14630
Allows defining list of attributes excluded from history in manifest.json ( #99283 )
...
* Move list of attributes excluded from history to manifest.json
* Address comments
2023-08-29 20:14:33 +02:00
Erik Montnemery
17ac1a6d32
Set automations which fail validation unavailable ( #94856 )
2023-06-27 18:23:33 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap ( #94359 )
2023-06-27 17:42:46 +02:00
Erik Montnemery
334dacc322
Change Entity.name default to UNDEFINED ( #94574 )
...
* Change Entity.name default to UNDEFINED
* Update typing
* Update Pylint plugin
* Update TTS test
2023-06-15 11:09:53 +02:00
Erik Montnemery
d05d67414a
Teach search about blueprints ( #78535 )
2023-05-30 15:04:35 +02:00
J. Nick Koston
c25ccb90a4
Speed up creating automations ( #93776 )
...
Creating the inner coroutine for each automation to be run at started
was expensive when the user had 1000s of automations
2023-05-29 22:51:35 -05:00
rlippmann
f5911bcad6
Add slots to dataclasses in default_config ( #91410 )
...
* add dataclass slots to default config items
* remove slots from sun mixing
2023-04-14 14:22:39 -04:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 ( #87347 )
2023-02-03 23:08:48 +01:00
Karlie Meads
156307f3f2
Fix logic of disabled condition for "OR" ( #79718 )
2023-01-16 21:08:09 +01:00
Franck Nijhof
b0cee0bc46
String formatting and max line length - Part 1 ( #84390 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
Erik Montnemery
a6217ca9b9
Improve error message when an automation fails to validate ( #83977 )
2022-12-21 23:20:50 +01:00
Erik Montnemery
9bd676aff6
Improve automation reload ( #81854 )
...
* Improve automation reload
* Small tweak
* Improve
2022-11-10 14:44:55 +01:00
Erik Montnemery
627bd82766
Simplify parsing of script and automation config ( #80465 )
2022-10-17 11:42:17 +02:00
Erik Montnemery
4ebf9df901
Unconditionally call DomainBlueprints.populate ( #80336 )
2022-10-14 12:03:43 -04:00
Erik Montnemery
284893d942
Fix reload of automation and scripts when blueprint changed ( #80322 )
2022-10-14 16:43:09 +02:00
Erik Montnemery
81f40afd80
Only reload modified automations ( #80282 )
...
* Only reload modified automations
* Update tests
* Adjust spelling
* Improve efficiency of matching automations and configurations
* Reload automations without an alias if they have been moved
* Add test
* Add test
* Add test
2022-10-14 15:28:03 +02:00
Paulus Schoutsen
4843d330f3
Allow fetching automation config ( #79130 )
2022-09-28 12:49:00 +02:00
epenet
b4afb1cb6b
Make use of generic EntityComponent ( #78492 )
2022-09-15 11:53:00 +02:00
Erik Montnemery
30702bdcd2
Deduplicate some code in scripts and automations ( #78443 )
2022-09-15 07:41:11 +02:00
epenet
996bcbdac6
Make EntityComponent generic ( #78473 )
2022-09-14 14:16:23 -04:00
Erik Montnemery
2ba0f42acc
Prevent deleting blueprints which are in use ( #78444 )
2022-09-14 16:47:08 +02:00
epenet
5e338d2166
Improve type hints in automation ( #78368 )
...
* Improve type hints in automation
* Apply suggestion
* Apply suggestion
* Apply suggestion
* Add Protocol for IfAction
* Use ConfigType for IfAction
* Rename variable
2022-09-14 13:04:09 +02:00
J. Nick Koston
47848b7cf8
Fix IssueSeverity import ( #77338 )
2022-08-25 21:52:33 -05:00
Franck Nijhof
5f0cca9b26
Raise repairs issue if automation calls unknown service ( #76949 )
2022-08-25 20:56:26 -04:00
Franck Nijhof
9843753f30
Add alias support to all triggers ( #77184 )
2022-08-22 17:43:09 -04:00
Erik Montnemery
1c1b23ef69
Correct referenced entities and devices for event triggers ( #76818 )
2022-08-15 17:35:30 -04:00