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
Marc Mueller
14e19c6d9c
Remove unnecessary type ignores ( #116036 )
2024-04-23 17:32:21 +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
Sid
f7b7f74d10
Enable Ruff TRY201 ( #114269 )
...
* Enable Ruff TRY201
* remove redundant rules
2024-03-28 10:18:07 +01: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
2c06d4fcb9
Add empty line after module docstring (2) [components] ( #112736 )
2024-03-08 19:15:59 +01: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
3877a56d23
Avoid creating tasks for automation and script validation ( #111181 )
...
These functions created tasks to run small validators, and the cost of
creating all the tasks was more expensive than running the validators
themselves. Since the code is unlikely to suspend its more efficient to
await them in series.
2024-02-23 13:41:36 -05:00
Paul Bottein
2b534af960
Update reload icons for automation and person service ( #109147 )
2024-01-30 19:36:57 +01:00
Paul Bottein
4170a447fc
Allow system and helper integrations to provide entity_component icons ( #109045 )
2024-01-29 19:26:55 +01: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
Erik Montnemery
95f7db1970
Move config_per_platform and extract_domain_configs to config.py ( #104989 )
2023-12-04 12:48:49 +01:00
Paulus Schoutsen
1cfbdd6a5d
Allow overriding blueprints on import ( #103340 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-25 11:49:50 +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
James Chaloupka
a9891e40fd
Update Deprecated Selector Syntax ( #99308 )
2023-09-12 20:10:32 +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
Joost Lekkerkerker
b367c95c81
Add more common translations ( #96429 )
...
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
2023-07-12 22:00:05 -04:00
Franck Nijhof
bde7d734b5
Migrate automation services to support translations ( #96306 )
...
* Migrate automation services to support translations
* Apply suggestions from code review
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
---------
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:17:54 +02:00
Erik Montnemery
107f589a2e
Remove some duplicated translations ( #96300 )
2023-07-11 16:38:18 +02:00
Erik Montnemery
e18f7dffb0
Teach validate_config to validate lists of conditions ( #95380 )
...
* Teach validate_config to validate lists of conditions
* Update test
2023-06-27 19:44:23 +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
a153720599
Add state attribute translations for automations ( #89815 )
2023-03-16 23:02:11 -04:00
Franck Nijhof
f9919bb7cf
Add pre-defined entity name translations ( #89792 )
2023-03-16 21:10:20 +01:00
Franck Nijhof
f32b7859b8
Restructure translations for entity components ( #89702 )
2023-03-16 12:16:08 +01:00
Erik Montnemery
231aad7a68
Sort manifests 1 ( #87022 )
2023-02-08 20:29:44 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core ( #87543 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action
3f992ed31d
[ci skip] Translation update
2023-02-04 00:23:44 +00:00