Commit Graph

2832 Commits (61114d83285e815742c8ae2e47e5765f9d83d744)

Author SHA1 Message Date
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