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 ecb3bf79f3
.
* 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
epenet
b7a344fd65
Standardize homeassistant imports in core and base platforms ( #136730 )
...
Standardize homeassistant imports in core
2025-01-28 13:11:48 -05:00
epenet
a05ac6255c
Standardize util imports ( #136723 )
2025-01-28 15:54:06 +01:00
Denis Shulyaka
85540cea3f
Add LLM ActionTool ( #136591 )
...
Add ActionTool
2025-01-27 14:21:27 -05:00
Michael Hansen
7497beefed
Add single target constraint to async_match_targets ( #136643 )
...
Add single target constraint
2025-01-27 14:06:21 -05:00
Paulus Schoutsen
005ae3ace6
Allow LLMs to get calendar events from exposed calendars ( #136304 )
2025-01-23 17:54:04 -05:00
epenet
3bbd7daa7f
Improve type hints in template helper ( #136253 )
2025-01-22 15:27:01 +00:00
epenet
b11b36b523
Add more util aliases to import conventions ( #136153 )
2025-01-21 15:58:23 +01:00
Ville Skyttä
40eb8b91cc
Adjust to recommended propcache.api import paths ( #136150 )
2025-01-21 10:58:22 +01:00
Sid
83b0d5a0b9
Enable Ruff B024 ( #136088 )
2025-01-20 19:14:50 +02:00
Marc Mueller
af02dbf0cb
Update pylint to 3.3.3 and astroid to 3.3.8 ( #136090 )
2025-01-20 06:52:18 -10:00
Artur Pragacz
877e44e3c9
Remove redundant device update code ( #134100 )
...
Remove redundant device update steps
2025-01-20 09:37:32 +01:00
Paulus Schoutsen
754de6f998
Add shared history for conversation agents ( #135903 )
...
* Add shared history for conversation agents
* Remove unused code
* Add support for native history items
* Store all assistant responses as assistant in history
* Add history support to DefaultAgent.async_handle_intents
* Make local fallback work
* Add default agent history
* Add history cleanup
* Add tests
* ChatHistory -> ChatSession
* Address comments
* Update snapshots
2025-01-18 22:33:03 -05:00
Marc Mueller
abc256fb3e
Add overload for async singleton call with HassKey ( #134059 )
2025-01-17 19:22:48 +01:00
Erik Montnemery
235fda55fe
Validate config entry when adding or updating entity registry entry ( #135067 )
2025-01-17 19:18:13 +01:00
Joost Lekkerkerker
ef8b8fbbaa
Enable RUF023 ( #135830 )
2025-01-17 12:28:27 +01:00
Joost Lekkerkerker
b4f4b06f29
Enable RUF021 ( #135832 )
2025-01-17 10:20:45 +01:00
Marc Mueller
46b17b539c
Use new syntax for TypeVar defaults ( #135780 )
2025-01-17 09:12:52 +01:00
Petro31
566f514a75
Allow is_state_attr to check attributes for None ( #132879 )
2025-01-17 08:41:10 +01:00
Konrad Vité
e6c696933f
Fix DiscoveryFlowHandler when discovery_function returns bool ( #133563 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-01-16 12:31:16 -10:00
Paulus Schoutsen
762bc7b8d1
Add broadcast intent ( #135337 )
2025-01-16 14:41:53 -06:00
Paulus Schoutsen
5cf56207fe
Add temperature and humidity entities to area registry ( #135423 )
...
* Add temperature and humidity entities to area registry
* Fix service test
* Add validation
* ABC
* More ABC
* More ABC 2
* Fix tests
* ABC 3
* ABC 4
2025-01-16 08:25:26 -05:00
epenet
e83ee00af8
Move UsbServiceInfo to service_info helpers ( #135663 )
...
* Move UsbServiceInfo to service_info helpers
* Adjust components
2025-01-15 15:10:25 +01:00
epenet
8c13daf6d9
Move SsdpServiceInfo to service_info helpers ( #135661 )
...
* Move SsdpServiceInfo to service_info helpers
* docstring
* Move string constants
* Adjust components
2025-01-15 15:00:27 +02:00
epenet
31c36beb2e
Move DhcpServiceInfo to service_info helpers ( #135658 )
...
* Move DhcpServiceInfo to service_info helpers
* Fix mypy/pylint
2025-01-15 13:09:18 +01:00
epenet
b046ca9abe
Move ZeroconfServiceInfo to service_info helpers ( #135653 )
...
* Move ZeroconfServiceInfo to service_info helpers
* Adjust deprecation date
* Fix mypy/pylint
* Fix DeprecatedConstant
* Add deprecation test
* Adjust
* Also deprecate ATTR_PROPERTIES_ID
2025-01-15 12:25:42 +01:00
Joost Lekkerkerker
8a35261fd8
Remove unused noqas ( #135583 )
2025-01-15 10:02:18 +01:00
Marc Mueller
239aa94b6f
Update Python version for mypy to 3.13 ( #135636 )
2025-01-15 01:43:13 +01:00
Franck Nijhof
60bdc13c94
Drop Python 3.12 support ( #135589 )
2025-01-14 16:23:15 +01:00
Joost Lekkerkerker
8db63adc11
Bump ruff to 0.9.1 ( #135197 )
2025-01-14 11:46:12 +01:00
Artur Pragacz
1de4d0efda
Fix deprecated enums ( #134824 )
2025-01-14 10:04:48 +01:00
Artur Pragacz
b009f11013
Fix referenced objects in script sequences ( #135499 )
2025-01-13 11:40:53 +01:00
epenet
5df7092f41
Improve formatting in core files ( #135256 )
...
* Adjust core files formatting
* Adjust translations script
2025-01-10 09:08:37 +01:00
Allen Porter
6e111d18ec
Allow unregistering LLM APIs ( #135162 )
2025-01-09 08:18:25 -08:00
Erik Montnemery
5888b83f22
Validate device id when adding or updating entity registry entry ( #134982 )
2025-01-07 16:10:51 +00:00
Franck Nijhof
00c052bb22
Revert "Remove deprecated supported features warning in ..." (multiple) ( #134933 )
2025-01-07 00:08:02 +01:00
J. Nick Koston
89c73f56b1
Migrate to using aiohttp-asyncmdnsresolver for aiohttp resolver ( #134830 )
2025-01-06 12:06:28 -10:00
Michael
acd95975e4
Make ChunkAsyncStreamIterator an aiohttp helper ( #134843 )
...
make ChunkAsyncStreamIterator a generic aiohttp helper
2025-01-06 04:37:07 +01:00
Craig Andrews
9e8df72c0d
Improve is docker env checks ( #132404 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Sander Hoentjen <sander@hoentjen.eu>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Robert Resch <robert@resch.dev>
2025-01-02 17:21:49 +01:00
Marc Mueller
2599faa622
Fix method subtyping [helpers] ( #134213 )
2024-12-29 17:16:38 +01:00
J. Nick Koston
7cfbc3eeae
Fix duplicate call to async_register_preload_platform ( #133909 )
2024-12-23 09:20:44 -10:00
Erik Montnemery
ecb3bf79f3
Revert "Add support for subentries to config entries" ( #133470 )
...
Revert "Add support for subentries to config entries (#117355 )"
This reverts commit ad15786115
.
2024-12-18 13:51:05 +01:00
Erik Montnemery
ad15786115
Add support for subentries to config entries ( #117355 )
...
* Add support for subentries to config entries
* Improve error handling and test coverage
* Include subentry_id in subentry containers
* Auto-generate subentry_id and add optional unique_id
* Tweak
* Update tests
* Fix stale docstring
* Address review comments
* Typing tweaks
* Add methods to ConfigEntries to add and remove subentry
* Improve ConfigSubentryData typed dict
* Update test snapshots
* Adjust tests
* Fix unique_id logic
* Allow multiple subentries with None unique_id
* Add number of subentries to config entry JSON representation
* Add subentry translation support
* Allow integrations to implement multiple subentry flows
* Update translations schema
* Adjust exception text
* Change subentry flow init step to user
* Prevent creating a subentry with colliding unique_id
* Update tests
* Address review comments
* Remove duplicaetd unique_id collision check
* Remove change from the future
* Improve test coverage
* Add default value for unique_id
2024-12-12 20:16:18 +01:00
Marc Mueller
5c6e4ad191
Use PEP 695 TypeVar syntax ( #133049 )
2024-12-12 16:01:57 +01:00
Marc Mueller
dc8b7cfede
Allow bytearray for mqtt payload type ( #132906 )
2024-12-11 11:51:16 +01:00
epenet
f2500e5a32
Remove deprecated supported features warning in MediaPlayer ( #132365 )
2024-12-09 23:03:55 +01:00
Allen Porter
35438f65e5
Update exception handling for python3.13 for getpass.getuser() ( #132449 )
...
* Update exception handling for python3.13 for getpass.getuser()
* Add comment
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Cleanup trailing space
---------
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-12-06 06:54:21 -08:00
Abílio Costa
208b14dd2b
Use translations on NumberEntity unit_of_measurement property ( #132095 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-12-03 17:08:09 +01:00
Marc Mueller
fe0f414e99
Update mypy-dev to 1.14.0a5 ( #132063 )
2024-12-02 14:40:13 +01:00
Jan Bouwhuis
3aae9b629f
Add exception translation for entity action not supported ( #131956 )
2024-12-01 16:53:06 +01:00
Robert Resch
fd14add67b
Remove deprecated device registry constants ( #131802 )
2024-11-28 11:20:44 +01:00
Jan Bouwhuis
d26c7a0536
Log warning if via_device reference not exists when creating or updating a device registry entry ( #131746 )
2024-11-28 08:27:24 +01:00
Paulus Schoutsen
ae34a6b375
Do not double expose scripts in LLM tools ( #131726 )
2024-11-27 18:04:08 +01:00
Abílio Costa
d8dd6a99b3
Use default translation on SensorEntity unit_of_measurement ( #131633 )
...
* Use translations on SensorEntity unit_of_measurement property
* Use default language for unit translation
* Update brother integration snapshot
* Update snapshots
2024-11-27 14:45:53 +01:00
Franck Nijhof
56b4733e4a
Clean up early assignment in script response ( #131691 )
2024-11-27 10:24:06 +01:00
Petro31
33222436d2
Nested stop actions will now return response_variables ( #126393 )
...
fix-nested-stop-variable-response
2024-11-27 09:18:02 +01:00
Paulus Schoutsen
7e03100af2
Allow an LLM to see script response values ( #131683 )
2024-11-26 23:51:21 -06:00
Jan-Philipp Benecke
1a71fbe427
Add intent to cancel all timers ( #130873 )
...
* Add intent to cancel all timers
* Add intent to llm test
2024-11-26 09:59:41 -06:00
Simon Lamon
ee74a35417
Support time entities in time conditions ( #124575 )
...
Co-authored-by: Mark Bergsma <mark@wikked.net>
2024-11-26 15:37:31 +01:00
epenet
c7485b94d5
Use breaks_in_ha_version in report_usage ( #131137 )
...
* Use breaks_in_ha_version in report_usage
* Revert behavior change
2024-11-23 18:58:24 +01:00
Josef Zweck
e2183a81aa
Make UpdateFailed translateable ( #131098 )
2024-11-22 09:37:35 +01:00
G Johansson
797eb606fe
Fix correct handling in ManualTriggerEntity ( #130135 )
2024-11-21 20:46:03 +01:00
epenet
9add3a6c9b
Add ability to pass integration domain to report_usage ( #130705 )
...
* Add ability to pass integration domain to report_usage
* Adjust
* Fix
* Add tests
* Update test_frame.py
* Update test_frame.py
* Update test_frame.py
* Update test_frame.py
* Update test_frame.py
* Update test_frame.py
* Finish tests
* Docstring
* Replace logger warning with report_usage
* Improve
* docstring
* Improve tests
* Adjust docstring for exclude_integrations
* Fix behavior and improve tests
2024-11-21 16:01:36 +01:00
epenet
deeb55ac50
Add ability to set HA breaking version in report_usage ( #130858 )
...
* Add ability to set breaking version in report_usage
* Adjust tests
* Adjust test
* Adjust tests
* Rename breaks_in_version => breaks_in_ha_version
2024-11-20 21:41:57 +01:00
epenet
600f83ddab
Finish migration from report to report_usage ( #130412 )
2024-11-15 12:35:50 +01:00
epenet
b57b22f6e3
Drop restore_state backwards compatibility ( #130411 )
2024-11-15 12:35:09 +01:00
epenet
b24931c775
Remove checks for DeviceEntryDisabler and DeviceEntryType enum ( #130367 )
2024-11-15 12:33:47 +01:00
epenet
7045b776b6
Use report_usage in helpers ( #130365 )
2024-11-12 09:25:13 +01:00
epenet
a3b0909e3f
Add new frame helper to better distinguish custom and core integrations ( #130025 )
...
* Add new frame helper to clarify options available
* Adjust
* Improve
* Use report_usage in core
* Add tests
* Use is/is not
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use enum.auto()
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-11-07 18:23:35 +01:00
epenet
03d5b18974
Remove options property from OptionFlow ( #129890 )
...
* Remove options property from OptionFlow
* Update test_config_entries.py
* Partial revert of "Remove deprecated property setters in option flows (#129773 )"
* Partial revert "Use new helper properties in crownstone options flow (#129774 )"
* Restore onewire init
* Restore onvif
* Restore roborock
* Use deepcopy in onewire
* Restore steam_online
* Restore initial options property in OptionsFlowWithConfigEntry
* re-add options property in SchemaOptionsFlowHandler
* Restore test
* Cleanup
2024-11-06 23:28:01 +01:00
epenet
79901cede9
Drop initialize_options helper from OptionsFlow ( #129870 )
2024-11-05 12:02:33 +01:00
epenet
d180ff417d
Cleanup deprecated OptionsFlowWithConfigEntry (part 3) ( #129756 )
2024-11-04 18:55:01 +01:00
Michael Hansen
c2ef119e50
Add HassRespond intent ( #129755 )
...
* Add HassHello intent
* Rename to HassRespond
* LLM's ignore HassRespond intent
2024-11-03 16:38:52 -06:00
J. Nick Koston
dfbb763031
Disable cleanup_closed on python 3.12.7+ and 3.13.1+ ( #129645 )
2024-11-02 22:15:56 -05:00
Robert Resch
380974eed4
Remove hassio from ALLOWED_USED_COMPONENTS and move some functions to helper ( #127228 )
...
* Remove hassio from ALLOWED_USED_COMPONENTS
* Move HassioServiceInfo to helpers.service_info
* Deprecate moved functions
* Add note about deprecation
* Fix tests
* Implement suggestion
* Typo
* Update pyproject.toml
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-10-30 12:43:41 +01:00