Commit Graph

2987 Commits (672df7355cb6b8598e0bba10391fe764b3f7a5e9)

Author SHA1 Message Date
Erik Montnemery 3e62c6ae2f
Move core config functionality to its own module (#129065)
* Move core config functionality to its own module

* Adjust test
2024-10-24 13:34:51 +02:00
Jonas Bergler 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
Denis Shulyaka e0e61b5262
Expose scripts with no fields as entities (#123061) 2024-10-22 23:14:07 -07:00
epenet f8e6fb81d6
Improve template docstring (#128967) 2024-10-22 19:15:27 -10:00
Erik Montnemery 0d447c9d50
Improve entity cached attributes (#128876) 2024-10-21 10:29:01 +02:00
epenet e5a07da0c9
Add checks for config entry state in async_config_entry_first_refresh (#128148) 2024-10-16 14:06:25 +02:00
Michael Hansen 67e0ccf677
Use exposed error messages in Assist (#127503)
* Use exposed error messages

* Report expose errors

* Remove comment

* Relative import

* Rework expose check logic

* Delay creation of all names list, and skip config/hidden entities

* Clean up commented code and type issue

* Fix test

* Move assistant check
2024-10-11 13:06:03 -04:00
epenet 63391717e7
Replace ValueError with deprecation in data update coordinator (#128082)
* Replace ValueError with deprecation in data update coordinator

* Rephrase
2024-10-11 17:24:47 +02:00
Erik Montnemery e682d3461f
Remove parameter add_config_entry from DeviceRegistry.async_update_device (#128139) 2024-10-11 14:01:14 +02:00
Erik Montnemery 416ead5311
Improve docstring of EntityComponent and EntityPlatform (#128135) 2024-10-11 13:43:20 +02:00
Erik Montnemery 8ba14ef113
Minor improvement of device_registry (#128075)
* Minor improvement of device_registry

* Remove uncovered line
2024-10-10 22:41:44 +02:00
epenet f504c27972
Add ability to pass the config entry explicitly in data update coordinators (#127980)
* Add ability to pass the config entry explicitely in data update coordinators

* Implement in accuweather

* Raise if config entry not set

* Move accuweather models

* Fix gogogate2

* Fix rainforest_raven
2024-10-10 10:20:15 +02:00
G Johansson 959898e0fc
Fix merge_response template not mutate original object (#127865)
* Fix merge_response template not mutate original object

* Add comment
2024-10-08 18:35:06 +02:00
Erik Montnemery 0956dbb578
Rename `UnitOfConductivity` enum members (#127919)
* Rename UnitOfConductivity enum members

* Update test snapshots
2024-10-08 14:44:01 +02:00
Erik Montnemery d6ee10a543
Make FlowHandler.context a typed dict (#126291)
* Make FlowHandler.context a typed dict

* Adjust typing

* Adjust typing

* Avoid calling ConfigFlowContext constructor in hot path
2024-10-08 12:18:45 +02:00
J. Nick Koston 24fbc366a6
Restore __slots__ to registry entries (#127481) 2024-10-05 12:16:52 +02:00
J. Nick Koston db494de809
Restore __slots__ to core objects (#127441) 2024-10-03 22:23:47 +02:00
J. Nick Koston 0f29fd3e10
Switch to using fast cached_property implementation in propcache (#127339) 2024-10-03 13:11:02 -05:00
J. Nick Koston e2b1ef053f
Cache serialization of config entry storage (#127435) 2024-10-03 19:51:09 +02:00
Artur Pragacz c175a68a26
Skip unnecessary checks for entities with unique_id (#125051) 2024-10-01 11:27:14 -05:00
Artur Pragacz 98a86c7636
Improve code of normalized name registry (#125282) 2024-10-01 11:20:52 -05:00
J. Nick Koston 9ec26a9be5
Fix getting the current host for IPv6 urls (#126889) 2024-09-27 11:26:35 +02:00
Erik Montnemery 3c0be47d3c
Add FlowManager.async_has_matching_flow (#126804)
* Add FlowManager.async_flow_has_matching_flow

* Revert changes from the future

* Apply suggested changes to apple_tv config flow

* Rename methods after discussion

* Update homeassistant/data_entry_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Move deduplication functions to config_entries, add tests

* Adjust tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-27 10:51:36 +02:00
J. Nick Koston 75ae6a8087
Fix getting the host for the current request (#126882) 2024-09-27 03:36:05 -05:00
Joost Lekkerkerker 3810c3cbaf
Improve trigger schema validation to ask for `trigger` instead of `platform` (#126750)
* Add check for missing trigger

* Fix

* Fix

* Escape
2024-09-25 16:44:14 +02:00
Joost Lekkerkerker 33d83e43de
Update trigger validation message (#126749) 2024-09-25 15:33:03 +02:00
Joost Lekkerkerker a1906b434f
Change trigger platform key to trigger (#124357)
* fix

* Fix

* Fix

* Update homeassistant/helpers/config_validation.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Fix

* Fix

* Fix

* Fix

* Add more tests

* Fix

* Fix tests

* Add tests

* Let's see what the CI does

* It fails on the code that tested the thing ofc

* It fails on the code that tested the thing ofc

* Revert test thingy

* Now the test works again, lovely

* Another one

* Fix websocket thingy

* Only copy when needed

* Improve comment

* Remove test

* Fix docstring

* I think this now also work since this transforms trigger to platform

* Add comment

* Update homeassistant/helpers/config_validation.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/helpers/config_validation.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/helpers/config_validation.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Check for mapping

* Add test

* Update homeassistant/helpers/config_validation.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update test to also test for trigger keys

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-25 14:19:58 +02:00
starkillerOG 69ecdda5f5
Add SSL Cipher option to aiohttp async_get_clientsession (#126317)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-24 21:31:52 +02:00
G Johansson 93aade6e8e
Change lock state to an enum (#126379)
* Add new LockState enum for lock states

* Add rest

* Fix insteon tests

* Fix mqtt tests

* Fix tesla_fleet

* Revert back ST_STATE_LOCKED

* Add back constant
2024-09-24 12:30:50 +02:00
Erik Montnemery b2982c18bb
Reinitialize zeroconf discovery flow on unignore (#125753)
* Reinitialize zeroconf discovery flow on unignore

* Adjust tests

* Improve comments

* Fix logic for updating discovery keys

* Add tests

* Use mock_config_flow helper in new config_entries test

* Add discovery_keys attribute to ConfigEntry

* Update zeroconf rediscovery

* Change type of ConfigEntry.discovery_keys

* Update tests

* Fix DiscoveryKey.from_json_dict and add tests

* Fix test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 16:49:21 +02:00
J. Nick Koston 0e0ac3efe5
Remove uneeded isoformat calls in registry as_storage_fragment properties (#126440) 2024-09-23 14:23:43 +02:00
epenet cd95c133af
Enable all TID ruff rules (#126312)
* Enable ruff rule TID252

* One more

* comment
2024-09-20 12:25:51 +02:00
Alberto Montes 28ece89272
Update string formatting to use f-string on core codebase (#125988)
* Update string formatting to use f-string on core codebase

* Small change given review feedback
2024-09-19 14:31:13 +02:00
Paul Bottein b471a6e519
Add has_entity_name to entity display dict and fix name (#125832)
* Add has_entity_name to entity display dict and fix name

* Fix tests
2024-09-19 11:35:44 +02:00
epenet 88cacbc898
Expose component constants for llm helper (#125891)
* Expose climate INTENT_GET_TEMPERATURE

* Expose conversation trace items

* More fixes for llm helper
2024-09-13 12:43:37 +02:00
chammp 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 ded34561b1
Simplify cv._base_trigger_list_flatten (#125613) 2024-09-09 21:14:41 +02:00
karwosts 056e6eae82
Add a syntax for merging lists of triggers (#117698)
* Add a syntax for merging lists of triggers

* Updating to the new syntax

* Update homeassistant/helpers/config_validation.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* fix suggestion

* update test and add comments

* not actually json

* move test to new file

* update tests

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-09 13:51:32 +02:00
Denis Shulyaka a85ccb94e3
LLM Tool parameters check (#123621)
* LLM Tool parameters check

* fix tests
2024-09-08 18:42:51 -07:00
J. Nick Koston 051a28b55a
Remove unneeded wrapping of URL in URL in network helper (#125265)
* Remove unneeded wrapping of URL in URL in network helper

* fix mocks
2024-09-06 15:34:52 +02:00
Robert Resch 4d96ed4c68
Update modified_at datetime on storage collection changes (#125218) 2024-09-04 15:05:51 +02:00
Erik Montnemery 8759a6a14d
Make optional arguments to frame.report kwarg only (#125062)
* Make optional arguments to frame.report kwarg only

* Update homeassistant/helpers/frame.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-03 17:03:36 +02:00
Erik Montnemery cf10549df4
Restore unnecessary assignment of Template.hass in event helper (#125143) 2024-09-03 15:25:35 +02:00
Erik Montnemery c321bd70e1
Log deprecation warning when `cv.template` is called from wrong thread (#125141)
Log deprecation warning when cv.template is called from wrong thread
2024-09-03 14:37:21 +02:00
Erik Montnemery 851600630c
Log deprecation warning when `template.Template` is created without `hass` (#125142)
* Log deprecation warning when template.Template is created without hass

* Improve docstring
2024-09-03 14:28:33 +02:00
Artur Pragacz fb27297df9
Fix area registry indexing when there is a name collision (#125050) 2024-09-02 09:23:07 -10:00
Erik Montnemery df4bd721b5
Deprecate template.attach (#124843) 2024-09-02 15:33:10 +02:00
Erik Montnemery baa876d4d9
Remove lying comment from service.async_register_entity_service (#125079) 2024-09-02 15:18:02 +02:00
Erik Montnemery 114e254aa6
Don't raise when registering entity service with invalid schema (#125057)
* Don't raise when registering entity service with invalid schema

* Update homeassistant/helpers/service.py

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

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-09-02 14:20:50 +02:00
G Johansson 78cf7dc873
New template merge_response (#114204)
* New template merge_response

* Extending

* Extend comment

* Update

* Fixes

* Fix comments

* Mods

* snapshots

* Fixes from discussion
2024-09-02 08:13:10 +02:00
J. Nick Koston 0a9e20615e
Limit maximum template render output to 256KiB (#124946)
* Limit maximum template render output to 256KiB

fixes #124931

256KiB is likely to still block the event loop for an unreasonable amont of
time but its likely someone is using the template engine for large
blocks of data so we want a limit which still allows that but has
a reasonable safety to prevent the system from crashing down

* Update homeassistant/helpers/template.py
2024-08-30 22:33:57 +02:00
Erik Montnemery 174f22aa2f
Prevent nesting sections in data entry flows (#124645) 2024-08-28 15:42:15 +02:00
Erik Montnemery c772c4a2d5
Allow specifying icons for service sections (#124656)
* Allow specifying icons for service sections

* Improve kitchen_sink example
2024-08-28 11:15:26 +02:00
Erik Montnemery 55c42fde88
Improve validation of entity service schemas (#124102)
* Improve validation of entity service schemas

* Update tests/helpers/test_entity_platform.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-27 19:05:49 +02:00
Petro31 5d64155bb6
Add zip to template engine (#122460)
* add zip to template engine

* fix doc strings
2024-08-22 19:11:08 +02:00
Erik Montnemery 533442f33e
Add async friendly helper for validating config schemas (#123800)
* Add async friendly helper for validating config schemas

* Improve docstrings

* Add tests
2024-08-17 11:01:49 +02:00
Erik Montnemery f1b7847d1c
Simplify cv._make_entity_service_schema (#124046) 2024-08-16 14:09:09 +02:00
Erik Montnemery 69943af68a
Deduplicate async_register_entity_service (#124045) 2024-08-16 14:06:35 +02:00
Erik Montnemery 799e95c1bd
Do sanity check in EntityComponent.async_register_entity_service schema (#124029)
* Do sanity check in EntityComponent.async_register_entity_service schema

* Improve test
2024-08-16 13:39:25 +02:00
Erik Montnemery f9ade788eb
Do sanity check EntityPlatform.async_register_entity_service schema (#123058)
* Do a sanity check of schema passed to EntityPlatform.async_register_entity_service

* Only attempt to check schema of Schema

* Handle All/Any wrapped in schema

* Clarify comment

* Apply suggestions from code review

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

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-08-16 10:01:12 +02:00
Erik Montnemery e1a0a855d5
Support None schema in EntityComponent.async_register_entity_service (#123867) 2024-08-14 11:44:38 +02:00
Erik Montnemery 7063541733
Support None schema in EntityPlatform.async_register_entity_service (#123064) 2024-08-14 10:46:29 +02:00
Erik Montnemery 78f7b3340d
Remove unnecessary assignment of Template.hass from event helper (#123777) 2024-08-13 12:09:30 +02:00
Erik Montnemery 992de497f2
Remove unnecessary assignment of Template.hass from script helper (#123780) 2024-08-13 11:55:37 +02:00
Erik Montnemery 6317053cc6
Remove unnecessary assignment of Template.hass from condition helper (#123775) 2024-08-13 11:52:27 +02:00
Erik Montnemery c49a31e0de
Remove unnecessary assignment of Template.hass from script variables helper (#123712) 2024-08-12 21:51:24 +02:00
Erik Montnemery c5e8710889
Remove unnecessary assignment of Template.hass from service helper (#123710) 2024-08-12 21:51:02 +02:00
Erik Montnemery 6caec89793
Remove unnecessary assignment of Template.hass from trigger entity helper (#123709) 2024-08-12 21:50:50 +02:00
J. Nick Koston 69740e865c
Reduce number of aiohttp.TCPConnector cleanup_closed checks to one per minute (#123268) 2024-08-08 15:52:09 -05:00
epenet ddc94030a6
Fix raise-within-try in config validation helper (#123353) 2024-08-08 18:50:49 +02:00
Erik Montnemery 449afe9e6f
Correct type annotation for `EntityPlatform.async_register_entity_service` (#123054)
Correct type annotation for EntityPlatform.async_register_entity_service

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-08-02 11:58:07 +02:00
Denis Shulyaka ed6d6575d7
Add aliases to script llm tool description (#122380)
* Add aliases to script llm tool description

* Also add name
2024-08-02 08:05:06 +02:00
J. Nick Koston 2f3f124aa1
Drop unnecessary lambdas in the entity filter (#122941) 2024-07-31 20:44:47 +02:00
karwosts 3df78043c0
Add enable_millisecond to duration selector (#122821)
* Add enable_milliseconds to duration selector.

* One more test
2024-07-31 16:13:05 +02:00
Allen Porter 8d0e998e54
Improve conversation agent tracing to help with eval and data collection (#122542) 2024-07-31 14:38:44 +02:00
Franck Nijhof 8b96c7873f
Rename 'service' to 'action' in automations and scripts (#122845) 2024-07-31 14:36:53 +02:00
Allen Porter f14471112d
Improve LLM tool quality by more clearly specifying device_class slots (#122723)
* Limit intent / llm API device_class slots to only necessary services and limited set of values

* Fix ruff errors

* Run ruff format

* Fix typing and improve output schema

* Fix schema and improve flattening

* Revert conftest

* Revert recorder

* Fix ruff format errors

* Update using latest version of voluptuous
2024-07-31 14:36:02 +02:00
Denis Shulyaka be24475cee
Update selector converters for llm script tools (#122830) 2024-07-30 08:24:03 -07:00
epenet 07c7bb8b2a
Use HOMEASSISTANT_DOMAIN alias for core DOMAIN (#122760) 2024-07-29 13:35:36 +02:00
Allen Porter e5bb1b2cc6
Update LLM prompt to improve quality for local LLMs (#122746) 2024-07-29 12:04:23 +02:00
J. Nick Koston 1879db9f8f
Revert to using call_soon for event triggers and state changed event trackers (#122735) 2024-07-29 11:45:39 +02:00
Erik Montnemery 5dbd7684ce
Fail tests if recorder creates nested sessions (#122579)
* Fail tests if recorder creates nested sessions

* Adjust import order

* Move get_instance
2024-07-25 21:18:55 +02:00
J. Nick Koston e1e64be3c9
Remigrate device_registry created_at/modified_at (#122490)
* Remigrate device_registry created_at/modified_at

Nightly current does not boot up because the device registry
will have KeyError: created_at if the previous nightly was
installed.

* reduce

* split migration per discord comments
2024-07-23 15:47:27 -05:00
Robert Resch e00f159ebe
Fix loading created_at/modified_at from entity registry store (#122486) 2024-07-23 21:15:12 +02:00
J. Nick Koston 6bdc5be433
Bump aiohttp to 3.10.0b1 (#122409) 2024-07-23 12:10:22 -05:00
Marc Mueller da6a7ebd42
Update clientsession socket family typing (#122464) 2024-07-23 09:04:09 -05:00
Marc Mueller 5727f30026
Changes for aiohttp 3.10.0 (#122463) 2024-07-23 15:37:26 +02:00
Robert Resch 545514c5cd
Add created_at/modified_at to category registry (#122454) 2024-07-23 14:39:38 +02:00
Erik Montnemery 92acfc1464
Indicate database migration in /api/core/state response (#122445)
* Indicate database migration in /api/core/state response

* Change API response according to review comment

* Adjust API response

* Update test

* Add test
2024-07-23 14:13:08 +02:00
Robert Resch 0d765a27c9
Add created_at/modified_at to entity registry (#122444) 2024-07-23 13:12:29 +02:00
Erik Montnemery 42716723e6
Register WS command recorder/info early (#122425) 2024-07-22 16:26:52 -05:00
Erik Montnemery d3df903d1e
Make device registry migration unconditional (#122414) 2024-07-22 21:37:47 +02:00
Erik Montnemery db6704271c
Avoid repeated calls to utc_from_timestamp(0).isoformat() when migrating (#122413) 2024-07-22 21:36:36 +02:00
Robert Resch 4c853803f1
Add created_at/modified_at to device registry (#122369) 2024-07-22 19:15:23 +02:00
Robert Resch 243a68fb1f
Frontend wants a timestamp for the created_at/modified_at attributes (#122377) 2024-07-22 14:10:16 +02:00
Denis Shulyaka 064d7261b4
Ensure script llm tool name does not start with a digit (#122349)
* Ensure script tool name does not start with a digit

* Fix test name
2024-07-22 11:11:09 +02:00
J. Nick Koston a8cbfe5159
Make TemplateStateBase.entity_id a cached_property (#122279) 2024-07-21 07:49:59 -05:00
Josef Zweck f006716173
Add `async_setup` method to `DataUpdateCoordinator` (#116677)
* init

* Update homeassistant/helpers/update_coordinator.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix typo, ruff

* consistency with rest, test

* pylint suppression

* ruff

* ruff

* switch to one test

* add last exc

* add tests for auth & Entry Errors

* move exceptions to correct test

* Update update_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* test setup call

* simplify

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-07-19 14:24:25 +02:00
Robert Resch 10c084c6e0
Add created_at/modified_at to label registry (#122078) 2024-07-17 16:36:14 +02:00
Erik Montnemery efb7bede40
Enable strict typing on script helper (#122075) 2024-07-17 13:51:59 +02:00
Robert Resch a0f91d27a3
Add created_at/modified_at to floor registry (#122071) 2024-07-17 13:18:26 +02:00
Erik Montnemery 385f5be7e8
Remove dead code from script helper (#122074) 2024-07-17 13:16:57 +02:00
Robert Resch 35f84f32d6
Add created_at/modified_at for area registry (#122014) 2024-07-17 09:54:06 +02:00
Joost Lekkerkerker f8ba4d41ba
Add support for adding model_id in device info (#121989) 2024-07-16 15:12:25 +02:00
J. Nick Koston cdf7ecebc0
Make BaseCoordinatorEntity.should_poll a cached_property since it never changes (#121826) 2024-07-12 00:39:22 -05:00
Michael Hansen 417abda649
Add HassGetCurrentDate and HassGetCurrentTime intents (#121707) 2024-07-11 00:17:04 +02:00
Sid 3142f52a79
Add Ruff refurb rules (#121701) 2024-07-10 21:47:40 +02:00
Alan 8ff4991f07
LLM to handle int attributes (#121037) 2024-07-06 11:41:18 +02:00
J. Nick Koston e71f6c5948
Small speedup to processing entity customize (#121271) 2024-07-05 08:57:08 +02:00
J. Nick Koston cdb2ec4231
Small speed up to entity state calculation (#121273) 2024-07-05 08:56:20 +02:00
epenet fe0bafd067
Add warnings for deprecated json helpers (#121161) 2024-07-04 20:48:08 +02:00
J. Nick Koston 48172b0426
Small speed up to writing entity state (#121043) 2024-07-03 12:16:41 -05:00
Marc Mueller 0e52d149e4
Update voluptuous to 0.15.2 (#120631)
* Update voluptuous to 0.15.1

* Fix typing issues

* Add type ignores for json result type

* Update voluptuous to 0.15.2

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-07-02 12:57:09 -07:00
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