1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-22 20:09:35 +00:00
Commit Graph

3274 Commits

Author SHA1 Message Date
Marc Mueller
ca55986057 Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
Joost Lekkerkerker
1fdd056c0e Fix ruff manual-dict-comprehension PERF403 (#120723)
* Fix PERF403

* Fix

* Fix
2024-06-28 14:17:47 +02:00
Joost Lekkerkerker
6ef8e87f88 Fix ruff redefined-argument-from-local PLR1704 (#120729)
* Fix PLR1704

* Fix
2024-06-28 12:31:07 +02:00
Erik Montnemery
8de771de96 Rename async_track_state_reported_event to async_track_state_report_event (#120637)
* Rename async_track_state_reported_event to async_track_state_report_event

* Update tests
2024-06-27 13:45:15 +02:00
Erik Montnemery
a165064e9d Improve typing of state event helpers (#120639) 2024-06-27 06:08:19 -05:00
Erik Montnemery
3e9b57cc07 Don't allow updating a device to have no connections or identifiers (#120603)
* Don't allow updating a device to have no connections or identifiers

* Move check to the top of the function
2024-06-27 09:26:31 +02:00
dougiteixeira
617ab48fa9 Address device helper review comments (#120615)
* Address review comments from #119761

* Address review comments from #119761

* Address review comments from #119761

* Remove reference from config entry
2024-06-27 08:50:20 +02:00
J. Nick Koston
a5a631148e Add async_track_state_reported_event to fix integration performance regression (#120622)
split from https://github.com/home-assistant/core/pull/120621
2024-06-26 23:04:27 -04:00
Marc Mueller
6bceb8ec48 Add some more VolDictType annotations (#120610) 2024-06-26 22:44:43 +02:00
Erik Montnemery
9bbeb5d608 Add primary_config_entry attribute to device registry entries (#119959)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-26 12:26:24 +02:00
Marc Mueller
d527113d59 Improve schema typing (3) (#120521) 2024-06-26 11:30:07 +02:00
Michael Hansen
d3ceaef098 Allow timer management from any device (#120440) 2024-06-26 09:06:56 +02:00
Marc Mueller
49df0c4366 Improve schema typing (2) (#120475) 2024-06-26 02:25:30 +02:00
Erik Montnemery
75c7ae7c69 Support in service descriptions for input sections (#116100) 2024-06-25 20:00:48 +02:00
Erik Montnemery
d4e93dd01d Validate new device identifiers and connections (#120413) 2024-06-25 19:17:54 +02:00
Marc Mueller
185e79fa1b Improve intent schema typing (#120442) 2024-06-25 19:02:04 +02:00
Marc Mueller
b393024acd Improve collection schema typing (#120441) 2024-06-25 18:57:15 +02:00
Denis Shulyaka
2386ed3830 Add script llm tool (#118936)
* Add script llm tool

* Add tests

* More tests

* more test

* more test

* Add area and floor resolving

* coverage

* coverage

* fix ColorTempSelector

* fix mypy

* fix mypy

* add script reload test

* Cache script tool parameters

* Make custom_serializer a part of api

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-06-25 10:43:26 -05:00
Marc Mueller
62fd692d27 Improve async_register_admin_service schema typing (#120405) 2024-06-25 12:48:00 +02:00
Marc Mueller
b4eee166aa Add voluptuous type aliases (#120399) 2024-06-25 11:58:27 +02:00
Erik Montnemery
0545ed8082 Section support for data entry flows (#118369)
* Add expandable support for data entry form flows

* Update config_validation.py

* optional options

* Adjust

* Correct translations of data within sections

* Update homeassistant/components/kitchen_sink/config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Add missing import

* Update tests/components/kitchen_sink/test_config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Format code

* Match frontend when serializing

* Move section class to data_entry_flow

* Correct serializing

* Fix import in kitchen_sink

* Move and update test

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-25 11:02:00 +02:00
Erik Montnemery
0d1b050520 Remove create_create from StorageCollectionWebsocket.async_setup (#119489) 2024-06-24 15:41:08 +02:00
Paulus Schoutsen
5c2db162c4 Remove "no API" prompt (#120280) 2024-06-24 08:57:59 +02:00
Paulus Schoutsen
19f97a3e53 LLM to handle decimal attributes (#120257) 2024-06-23 17:09:57 -04:00
Paulus Schoutsen
bc45dcbad3 Add template config_entry_attr function (#119899)
* Template config_entry_attr function

* Complete test coverage

* Improve readability
2024-06-22 21:51:09 -04:00
G Johansson
5ddda14e59 Remove deprecated (moved) helpers from helpers.__init__ (#120172) 2024-06-22 20:55:03 +02:00
dougiteixeira
6e32a96ff3 Add the ability to bind the template helper entity to a device (#117753) 2024-06-22 12:45:06 +02:00
tronikos
ad1f0db5a4 Pass prompt as system_instruction for Gemini 1.5 models (#120147) 2024-06-22 12:35:48 +02:00
dougiteixeira
a8ba22f6bb Add device linking and stale device link clean up helpers (#119761) 2024-06-21 14:46:39 +02:00
Marc Mueller
f0452e9ba0 Update mypy dev 1.11.0a8 (#120032) 2024-06-21 13:15:18 +02:00
J. Nick Koston
5ae13c2ae2 Make use_device_name a cached_property in the base entity class (#119758)
There is a small risk that _attr_name or entity_description
would not be set before state was first written, but that
would likely be a bug.
2024-06-18 21:52:36 -04:00
J. Nick Koston
419dcbf9a1 Fix typo in KEY_ALLOW_CONFIGRED_CORS (#119905) 2024-06-18 12:44:27 -05:00
Erik Montnemery
0ca3f25c57 Add WS command for subscribing to storage collection changes (#119481) 2024-06-18 16:15:42 +02:00
Paulus Schoutsen
eb89ce47ea Inline primary integration (#119860) 2024-06-18 08:08:08 +02:00
Erik Montnemery
e0378f79a4 Remove create_list from StorageCollectionWebsocket.async_setup (#119508) 2024-06-17 12:16:36 +02:00
Paulus Schoutsen
836abe68c7 Track primary integration (#119741)
* Track primary integration

* Update snapshots

* More snapshots updated

* Uno mas

* Update snapshot
2024-06-16 13:26:06 -04:00
tronikos
6b8bddf6e3 Make remaining time of timers available to LLMs (#118696)
* Include speech_slots in IntentResponse.as_dict

* Populate speech_slots only if available

* fix typo

* Add test

* test all fields

* Fix another test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-06-14 20:47:41 +02:00
Erik Montnemery
003f216820 Rename collection.CollectionChangeSet to collection.CollectionChange (#119532) 2024-06-14 08:54:37 +02:00
Erik Montnemery
2661581d4e Fix typos in collection helper (#119524) 2024-06-12 20:37:38 +02:00
Erik Montnemery
8620bef5b0 Support shared keys starting with period in services.yaml (#118789) 2024-06-11 16:31:19 +02:00
Erik Montnemery
904b89df80 Allow importing typing helper in core files (#119377)
* Allow importing typing helper in core files

* Really fix the circular import

* Update test
2024-06-11 13:48:12 +02:00
tronikos
5f9455e0fd Log errors in Intent.async_handle (#119182)
* Log errors in Intent.async_handle

* log exception stack trace

* Update homeassistant/helpers/intent.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-06-10 11:33:12 -04:00
epenet
960d1289ef Avoid references to websocket_api.const in core and other components (#119285) 2024-06-10 13:49:44 +02:00
J. Nick Koston
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
Paulus Schoutsen
c49ca5ed56 Ensure intent tools have safe names (#119144) 2024-06-08 17:53:47 +02:00
paulusbrand
624017a0f9 Add template Base64 decode encoding parameter (#116603)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-07 17:01:35 +02:00
Michael Hansen
87114bf19b Fix exposure checks on some intents (#118988)
* Check exposure in climate intent

* Check exposure in todo list

* Check exposure for weather

* Check exposure in humidity intents

* Add extra checks to weather tests

* Add more checks to todo intent test

* Move climate intents to async_match_targets

* Update test_intent.py

* Update test_intent.py

* Remove patch
2024-06-06 20:41:25 -05:00
J. Nick Koston
62b1bde0e8 Only entity verify state writable once after success unless hass is missing (#118896) 2024-06-06 11:46:44 -05:00
Marc Mueller
fe21e2b8ba Import Generator from typing_extensions (1) (#118986) 2024-06-06 17:02:13 +02:00
J. Nick Koston
475c20d529 Always do thread safety check when writing state (#118886)
* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* async_fire is more common than expected with ccs

* fix mock

* fix hass mocking
2024-06-05 23:41:55 -04:00