3016 Commits

Author SHA1 Message Date
Franck Nijhof
eb1caeb770
Add template list functions: intersect, difference, symmetric_difference, union (#141420) 2025-03-26 07:51:25 +01:00
Artur Pragacz
93561543ff
Improve code quality of condition validation (#141292)
Streamline condition validation
2025-03-24 17:21:32 +01:00
Michael
e96e95c32d
Add sensor platform to backup integration (#138663)
* add sensor platform to backup integration

* adjust namings, remove system integration flag

* add first simple test

* apply review comments

* fix test

* add sensor tests

* adjustements to use backup helper

* remove obsolet async_get_manager from init

* unsubscribe from events on entry unload

* add configuration_url

* fix doc string

* fix sensor tests

* mark async_unsubscribe as callback

* set integration_type service

* extend sensor test

* set integration_type on correct integration :)

* fix after online conflict resolution

* add sensor update tests

* simplify the sensor update tests

* avoid io during tests

* Add comment

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-03-24 12:54:16 +01:00
Artur Pragacz
798ee60ae5
Make variables action not restricted to local scopes (#141114)
Make variables action in scripts not restricted to local scopes
2025-03-23 14:07:52 +01:00
Allen Porter
4e2dfba45f
Omit state from the Assist LLM prompts (#141034)
* Omit state from the Assist LLM prompts

* Add back the stateful prompt
2025-03-22 15:41:51 -04:00
Allen Porter
a83bf4f514
Add a GetHomeState tool to return the current state of the home (#140971)
* Add a GetHomeState tool to return the current state of the home

* Fix check for exposing entities

* Add "all" to get home state description
2025-03-20 19:37:54 -07:00
Franck Nijhof
d3c40939f6
Reorder template extensions (#140985) 2025-03-20 11:34:02 +01:00
Franck Nijhof
c6d3928ed1
Add template function: combine (#140948)
* Add template function: combine

* Add test to take away concern raised
2025-03-20 10:29:40 +01:00
Erik Montnemery
6b9c1e17e0
Fix docstring in selector helper (#140929) 2025-03-19 16:37:07 +01:00
Stephan van Rooij
76aef5be9f
Add PKCE implementation in oauth2 helper (#139509)
* Update config_entry_oauth2_flow.py

* Specify type on request_data

* Added LocalOAuth2ImplementationWithPkce

* LocalOAuth2ImplementationWithPkce works more like specs

* fix: Adding tests for pkce flow and feedback applied

* fix last test for pkce

* Clean test_abort_if_oauth_with_pkce_rejected

* Improve assertion of code verifier and code challenge

* Break long docstrings

* Shorten docstring

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-03-17 14:16:52 +01:00
Jan-Philipp Benecke
7b9ea63f17
Split out yaml loading into own package (#140683)
* Split out yaml loading into library

* Code review

* Code review

* Fix check config script
2025-03-15 22:26:18 -04:00
Joost Lekkerkerker
dcc63a6f2e
Bump ruff to 0.10.0 (#140541)
* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Update pyproject.toml

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Fix

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2025-03-14 12:32:50 +00:00
Franck Nijhof
e8069e1c07
Add template functions: md5, sha1, sha256, sha512 (#140192) 2025-03-09 16:15:27 +02:00
Allen Porter
6675b497bd
Improve LLM tool descriptions for brightness and volume percentage (#138685)
* Improve tool descriptions for brightness and volume percentage

* Address lint errors

* Update intent.py to revert of a light

* Create explicit types to make intent slots more future proof

* Remove comments about slot type

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2025-03-08 22:28:35 -05:00
Artur Pragacz
f0c5e00cc1
Fix conversation trigger with variables (#140066) 2025-03-08 22:23:24 -05:00
Franck Nijhof
9aa8a786a5
Add template function: flatten (#140157) 2025-03-08 11:14:27 -10:00
Franck Nijhof
e54febdc1e
Add template function: typeof (#140081) 2025-03-08 09:16:21 -10:00
Franck Nijhof
d4f205c366
Add template function: shuffle (#140077) 2025-03-07 20:36:17 -05:00
Erik Montnemery
c51e644203
Prioritize integration_domain passed to helper.frame.report_usage (#139819)
* Prioritize integration_domain passed to helper.frame.report_usage

* Update tests

* Update tests

* Improve docstring

* Rename according to suggestion
2025-03-06 13:16:50 +01:00
epenet
83dd1af6d2
Drop report method from frame helper (#139920)
* Drop report method from frame helper

* Adjust test_prevent_flooding

* Adjust test_report_missing_integration_frame

* Adjust test_report_error_if_integration

* Remove test_report
2025-03-06 11:25:22 +01:00
Erik Montnemery
cc5c8bf5e3
Make helpers.frame.report_usage work when called from any thread (#139836)
* Make helpers.frame.report_usage work when called from any thread

* Address review comments, update tests

* Add test

* Update test

* Update recorder test

* Update tests
2025-03-05 19:37:34 +01:00
karwosts
fa40d02a07
Add model_id filter to device selector (#135646)
* Add model_id filter to device selector

* Rerun CI
2025-03-02 21:15:37 +01:00
Michael Hansen
49c27ae7bc
Check area temperature sensors in get temperature intent (#139221)
* Check area temperature sensors in get temperature intent

* Fix candidate check

* Add new code back in

* Remove cruft from climate
2025-02-28 13:02:30 -05:00
Michael Hansen
fca19a3ec1
Move climate intent to homeassistant integration (#139371)
* Move climate intent to homeassistant integration

* Move get temperature intent to intent integration

* Clean up old test
2025-02-28 10:25:38 -05:00
Petro31
a296c5e9ad
Add floor_entities function and filter (#136509)
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
2025-02-28 11:44:01 +00:00
Artur Pragacz
b964bc58be
Fix variable scopes in scripts (#138883)
Co-authored-by: Erik <erik@montnemery.com>
2025-02-26 16:19:19 +01:00
Erik Montnemery
bf190a8a73
Add backup helper (#139199)
* Add backup helper

* Add hassio to stage 1

* Apply same changes to newly merged `webdav` and `azure_storage` to fix inflight conflict

* Address comments, add tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2025-02-25 10:19:41 +01:00
Martin Hjelmare
79dbc70470
Fix return value for DataUpdateCoordinator._async setup (#139181)
Fix return value for coodinator async setup
2025-02-24 18:09:51 +01:00
Joost Lekkerkerker
a0c2781355
Fix docstring parameter in entity platform (#139070)
Fix docstring
2025-02-22 20:56:05 +01:00
Erik Montnemery
ff4f4111d0
Minor adjustment of recorder helper (#138941) 2025-02-20 16:28:39 +00:00
Erik Montnemery
fb57284561
Remove helper.recorder.async_wait_recorder (#138935) 2025-02-20 15:02:22 +00:00
Artur Pragacz
7117708937
Improve reading clarity of steps code in scripts helper (#134395)
* Reorganize steps code in scripts helper

* Address feedback

* Revert to getattr
2025-02-19 19:37:36 +01:00
Artur Pragacz
6c3a9cb1a8
Improve reading clarity of steps code in scripts helper part 1 (#138628) 2025-02-19 11:18:28 -06:00
J. Nick Koston
d97194303a
Improve performance of calculating state (#138832)
```
print(timeit.timeit("x.update(y)", setup=x={a:b}
2025-02-19 09:43:41 +01:00
Erik Montnemery
4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f32a2e25d141ff467e5958826ed9fc3a.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Marc Mueller
9467709068
Use generics for deprecation helpers (#138171) 2025-02-09 23:38:58 +01:00
Paulus Schoutsen
df307aeb6d
Stream OpenAI messages into the chat log (#137400) 2025-02-09 00:01:24 -05:00
Artur Pragacz
6d6961ae6e
Clean up colliding deleted devices when updating non-deleted devices (#135592)
* Fix Schrödinger's devices

* Address feedback

* Add comment with broader context
2025-02-07 14:44:44 +01:00
Marc Mueller
a4fe0cbe7a
Update mypy-dev to 1.16.0a2 (#137542) 2025-02-06 13:43:53 +01:00
J. Nick Koston
d1b22312ac
Bump aiohttp-asyncmdnsresolver to 0.1.0 (#137492)
changelog: https://github.com/aio-libs/aiohttp-asyncmdnsresolver/compare/v0.0.3...v0.1.0

Switches to the new AsyncDualMDNSResolver class to which
tries via mDNS and DNS for .local domains since we have
so many different user DNS configurations to support

fixes #137479
fixes #136922
2025-02-05 22:04:52 -05:00
Paulus Schoutsen
ac42c9386c
Simplify llm calendar tool (#137402)
* Simplify calendar tool

* Clean up exposed entities
2025-02-05 11:42:41 +01:00
J. Nick Koston
3fc13db7e0
Fix memory leak when unloading DataUpdateCoordinator (#137338)
* check wiz

* Fix memory leak when unloading DataUpdateCoordinator

fixes #137237

* handle namespace conflict

* handle namespace conflict

* address review comments
2025-02-05 09:29:23 +01:00
epenet
c3b40e681d
Fix data update coordinator garbage collection (#137299) 2025-02-04 11:20:06 +01:00
Paulus Schoutsen
9679fc7878
Chat session rev2 (#137209)
* Chat Session rev 2

* Rename session to chat_log

* Simplify typing

* Typing

* Address comments

* Fix anthropic and ollama
2025-02-03 00:05:20 -05:00
Paulus Schoutsen
dd9bd8ef73
Make get_chat_session a callback context manager (#137146) 2025-02-01 23:37:24 -05:00
Paulus Schoutsen
2f6640707b
Extract conversation ID generation to helper (#137062)
* Extract conversation ID generation to helper

* Allow nested get_chat_log calls
2025-02-01 20:54:00 -05:00
Allen Porter
bf6f790d09
Remove entity state from mcp-server prompt (#137126)
* Create a stateless assist API for MCP server

* Update stateless API

* Fix areas in exposed entity fields

* Add tests that verify areas are returned

* Revert the getstate intent

* Revert whitespace change

* Revert whitespace change

* Revert method name changes to avoid breaking openai and google tests
2025-02-01 14:26:52 -08:00
tronikos
6c93d6a2d0
Include the redirect URL in the Google Drive instructions (#136906)
* Include the redirect URL in the Google Drive instructions

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-01-30 22:59:03 -08:00
Paulus Schoutsen
427c437a68
Add start_conversation service to Assist Satellite (#134921)
* Add start_conversation service to Assist Satellite

* Fix tests

* Implement start_conversation in voip

* Update homeassistant/components/assist_satellite/entity.py

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2025-01-29 21:32:10 -05:00
Tomer
3118831557
Ease understanding of integration failures (#134475)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
Co-authored-by: David Bonnes <zxdavb@bonnes.me>
2025-01-29 17:43:25 +01:00