Commit Graph

1727 Commits (512ac7d572871992facd3adccec78ead68156852)

Author SHA1 Message Date
Paulus Schoutsen ae34a6b375
Do not double expose scripts in LLM tools (#131726) 2024-11-27 18:04:08 +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
Sid 9e98e446a2
Bump ruff to 0.8.0 (#131273) 2024-11-22 16:53:26 +01:00
Michael Arthur d8549409f7
Area units and conversion between metric and US (#123563)
* area conversions

* start work on tests

* add number device class

* update unit conversions to utilise distance constants

* add area unit

* update test unit system

* update device condition and trigger

* update statistic unit converters

* further tests work WIP

* update test unit system

* add missing string translations

* fix websocket tests

* add deprecated notice

* add more missing strings and missing initialisation of unit system

* adjust icon and remove strings from scrape and random

* Fix acre to meters conversion

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

* Tidy up valid units

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

* fix ordering of area

* update order alphabetically

* fix broken test

* update test_init

* Update homeassistant/const.py

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

* remove deprecated unit and fix alphabetical order

* change deprecation and add tests, change to millimeter conversion for inches

* fix order

* re-order defs alphabetically

* add measurement as well

* update icons

* fix up Deprecation of area square meters

* Update core integrations to UnitOfArea

* update test recorder tests

* unit system tests in alphabetical

* update snapshot

* rebuild

* revert alphabetization of functions

* other revert of alphabetical order

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-11-21 16:10:44 +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
Abílio Costa 4776865584
Add unit translations for github integration (#130538)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-11-20 18:43:17 +01:00
epenet b57b22f6e3
Drop restore_state backwards compatibility (#130411) 2024-11-15 12:35:09 +01:00
G Johansson d0ad834d93
Move manual trigger entity tests (#130134) 2024-11-10 12:14: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 ef767c2b9f
Improve tests for frame helper (#130046)
* Improve tests for frame helper

* Improve comments

* Add ids

* Apply suggestions from code review
2024-11-07 17:35:58 +01:00
epenet 79901cede9
Drop initialize_options helper from OptionsFlow (#129870) 2024-11-05 12:02:33 +01: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
Erik Montnemery 4b56701152
Move core config class to core_config.py (#129163) 2024-10-26 07:00:31 +02:00
Artur Pragacz 624834de9c
Fix service target devices by label (#127229)
* Fix service target devices by label

* More explicit test
2024-10-25 21:30:04 +02:00
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
G Johansson a10e406131
Fix flaky update coordinator test (#128943) 2024-10-21 11:52:28 -10:00
epenet be4641b8f3
Push real binary sensor states to state machine in tests (#128894) 2024-10-21 16:19:25 +02: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
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 9ff35d5a5a
Minor improvement of entity platform tests (#128158)
* Minor improvement of entity platform tests

* Fix snapshot
2024-10-11 14:14:29 +02:00
Erik Montnemery 74ba8877d4
Improve entity registry test coverage (#128073) 2024-10-10 21:16:39 +02:00
Erik Montnemery 5b7bd6a52f
Minor improvement of device registry tests (#128095) 2024-10-10 17:28:57 +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
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 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
Erik Montnemery 771575cfc5
Make statistics validation create issue registry issues (#122595)
* Make statistics validation create issue registry issues

* Disable creating issue about outdated MariaDB version in tests

* Use call_soon_threadsafe instead of run_callback_threadsafe

* Update tests

* Fix flapping test

* Disable creating issue about outdated SQLite version in tests

* Implement agreed changes

* Add translation strings for issue titles

* Update test
2024-09-25 11:11:11 +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
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 5d2f8319b1
Update string formatting to use f-string on tests (#125986)
* Update string formatting to use f-string on tests

* Update test_package.py

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

* Update statement given feedback

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-19 10:32:38 +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
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