Commit Graph

21450 Commits (780407606449c2908c10ee6bb65adea01237f3a7)

Author SHA1 Message Date
epenet 83e77720e9
Improve type hints for mock_bluetooth/enable_bluetooth (#118484) 2024-05-30 22:16:45 -04:00
tronikos 2b7685b71d
Add Google Assistant SDK diagnostics (#118513) 2024-05-30 22:13:54 -04:00
Josef Zweck eae04bf2e9
Add typing for OpenAI client and fallout (#118514)
* typing for client and consequences

* Update homeassistant/components/openai_conversation/conversation.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-30 22:13:18 -04:00
tronikos 2bd142d3a6
Improve LLM prompt (#118520) 2024-05-30 22:03:57 -04:00
tronikos 272c51fb38
Fix unnecessary single quotes escaping in Google AI (#118522) 2024-05-30 19:56:06 -04:00
tronikos 0d6c7d0973
Fix LLMs asking which area when there is only one device (#118518)
* Ignore deprecated open and close cover intents for LLMs

* Fix LLMs asking which area when there is only one device

* remove unrelated changed

* remove unrelated changes
2024-05-30 17:14:11 -04:00
epenet a5dc4cb1c7
Fix incorrect `zeroconf` type hint in tests (#118465)
* Fix incorrect `mock_async_zeroconf` type hint

* Adjust thread

* One more

* Fix mock_zeroconf also

* Adjust

* Adjust
2024-05-30 21:57:09 +02:00
Matthias Alphart 1352c4e427
Increase test coverage for KNX Climate (#117903)
* Increase test coverage fro KNX Climate

* fix test type annotation
2024-05-30 21:42:11 +02:00
Diogo Gomes 822273a6a3
Add support for V2C Trydan 2.1.7 (#117147)
* Support for firmware 2.1.7

* add device ID as unique_id

* add device ID as unique_id

* add test device id as unique_id

* backward compatibility

* move outside try

* Sensor return type

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

* not needed

* make slave error enum state

* fix enum

* Update homeassistant/components/v2c/sensor.py

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

* Update homeassistant/components/v2c/strings.json

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

* Update homeassistant/components/v2c/strings.json

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

* simplify tests

* fix misspellings from upstream library

* add sensor tests

* just enough coverage for enum sensor

* Refactor V2C tests (#117264)

* Refactor V2C tests

* fix rebase issues

* ruff

* review

* fix https://github.com/home-assistant/core/issues/117296

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-30 20:42:48 +02:00
Ron Weikamp 43c69c71c2
Add time based integration trigger to Riemann sum integral helper sensor (#110685)
* Schedule max dt for Riemann Integral sensor

* Simplify validation. Dont integrate on change if either old or new state is not numeric.

* Add validation to integration methods. Rollback requirement for both states to be always numeric.

* Use 0 max_dt for disabling time based updates.

* Use docstring instead of pass keyword in abstract methods.

* Use time_period config validation for max_dt

* Use new_state for scheduling max_dt. Only schedule if new state is numeric.

* Use default 0 (None) for max_dt.

* Rename max_dt to max_age.

* Rollback accidental renaming of different file

* Remove unnecessary and nonsensical max value.

* Improve new config description

* Use DurationSelector in config flow

* Rename new config to max_sub_interval

* Simplify by checking once for the integration strategy

* Use positive time period validation of sub interval in platform schema

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

* Remove return keyword

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

* Simplify scheduling of interval exceeded callback

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

* Improve documentation

* Be more clear about when time based integration is disabled.

* Update homeassistant/components/integration/config_flow.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-30 20:40:23 +02:00
Jan Bouwhuis 796d940f2f
Fix group platform dependencies (#118499) 2024-05-30 19:14:54 +02:00
Paulus Schoutsen ae3741c364
Intent script: allow setting description and platforms (#118500)
* Add description to intent_script

* Allow setting platforms
2024-05-30 12:53:42 -04:00
Tsvi Mostovicz 12215c51b3
Fix Jewish calendar unique id's (#117985)
* Initial commit

* Fix updating of unique id

* Add testing to check the unique id is being updated correctly

* Reload the config entry and confirm the unique id has not been changed

* Move updating unique_id to __init__.py as suggested

* Change the config_entry variable's name back from config to config_entry

* Move the loop into the update_unique_ids method

* Move test from test_config_flow to test_init

* Try an early optimization to check if we need to update the unique ids

* Mention the correct version

* Implement suggestions

* Ensure all entities are migrated correctly

* Just to be sure keep the previous assertion as well
2024-05-30 18:27:15 +02:00
Ron Weikamp 2814ed5003
Add allow_negative configuration option to DurationSelector (#116134)
* Add configuration option positive to DurationSelector

* Rename to allow_negative in conjunction with a deprecation notice

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-30 17:42:34 +02:00
Marcel van der Veldt a95c074ab8
Extend Matter sensor discovery schemas for Air Purifier / Air Quality devices (#118483)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-05-30 16:59:45 +02:00
Oleg Kurapov 2cc38b426a
Add XML support to RESTful binary sensor (#110062)
* Add XML support to RESTful binary sensor

* Add test for binary sensor with XML input data

* Address mypy validation results by handling None returns

* Use proper incorrect XML instead of blank

* Change failure condition to match the behavior of the library method

* Change error handling for bad XML to expect ExpatError

* Parametrize bad XML test to catch both empty and invalid XML

* Move exception handling out of the shared method

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-30 16:29:50 +02:00
Robert Resch 7f49077ec6
Set enity_category to config for airgradient select entities (#118477) 2024-05-30 14:20:02 +02:00
Maciej Bieniek cf51179009
Add tests for Tractive integration (#118470)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-30 12:45:11 +02:00
Alexey Guseynov fc5d58effd
Add Total Volatile Organic Compounds (tVOC) matter discovery schema (#116963) 2024-05-30 12:20:02 +02:00
Robert Resch ac979e9105
Bump deebot-client to 7.3.0 (#118462) 2024-05-30 11:40:05 +02:00
epenet 06251d403a
Fix special case in pylint type hint plugin (#118454)
* Fix special case in pylint type hint plugin

* Simplify

* Simplify

* Simplify

* Apply

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

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-05-30 10:41:32 +02:00
epenet c6e0e93680
Cleanup mock_get_source_ip from tests (#118459) 2024-05-30 09:37:01 +02:00
epenet 9221eeb2f7
Add check for usefixtures decorator in pylint plugin (#118456) 2024-05-30 08:54:56 +02:00
epenet 1317837986
Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
epenet 242ee04642
Improve type hints in tests (i-p) (#118380) 2024-05-30 08:47:08 +02:00
epenet 092cdcfe91
Improve type hints in tests (a-h) (#118379) 2024-05-30 08:46:18 +02:00
tronikos 4893faa671
Instruct LLM to not pass a list to the domain (#118451) 2024-05-30 08:37:45 +02:00
tronikos 639f6c640c
Improve LLM prompt (#118443)
* Improve LLM prompt

* test

* improvements

* improvements
2024-05-29 21:44:33 -04:00
swcloudgenie a670169325
New official genie garage integration (#117020)
* new official genie garage integration

* move api constants into api module

* move scan interval constant to cover.py
2024-05-29 16:13:28 -04:00
Marcel van der Veldt 8cc15e82df
Fix light discovery for Matter dimmable plugin unit (#118404) 2024-05-29 21:09:50 +02:00
Joost Lekkerkerker c80718628e
Add select entities to AirGradient (#117136) 2024-05-29 20:12:51 +02:00
Marcel van der Veldt 7136be5047
Bump Python Matter Server library to 6.1.0(b0) (#118388) 2024-05-29 19:20:18 +02:00
Michael Hansen 3ffbbcfa5c
Allow delayed commands to not have a device id (#118390) 2024-05-29 12:39:41 -04:00
G Johansson 9e3e7f5b48
Entity for Tags (#115048)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik <erik@montnemery.com>
2024-05-29 17:45:19 +02:00
epenet 461ac1e0bc
Add ClientSessionGenerator type hints in tests (#118377) 2024-05-29 14:49:14 +02:00
epenet d10362e226
Add AiohttpClientMocker type hints in tests (#118373) 2024-05-29 14:38:46 +02:00
epenet 1fbf93fd36
Add SnapshotAssertion type hints in tests (#118371) 2024-05-29 14:11:58 +02:00
epenet 166c588cac
Add LogCaptureFixture type hints in tests (#118372) 2024-05-29 14:10:00 +02:00
tronikos aeee222df4
Default to gemini-1.5-flash-latest in Google Generative AI (#118367)
Default to flash
2024-05-29 08:04:47 -04:00
tronikos 4056c4c2cc
Ask LLM to pass area name and domain (#118357) 2024-05-29 08:03:43 -04:00
karwosts 6e5dcd8b8d
Support in blueprint schema for input sections (#110513)
* initial commit for sections

* updates

* add description

* fix test

* rename collapsed key

* New schema

* update snapshots

* Testing for sections

* Validate no duplicate input keys across sections

* rename all_inputs

* Update homeassistant/components/blueprint/models.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-29 13:13:01 +02:00
Adam Kapos 43f42dd512
Extend image_upload to return the original image (#116652) 2024-05-29 11:16:23 +02:00
Jan Bouwhuis 585892f067
Allow MQTT device based auto discovery (#109030)
* Add MQTT device based auto discovery

* Respect override of component options over shared ones

* Add state_topic, command_topic, qos and encoding as shared options

* Add shared option test

* Rename device.py to schemas.py

* Remove unused legacy `platform` attribute to avoid confusion

* Split validation device and origin info

* Require `origin` info on device based discovery

* Log origin info for only once for device discovery

* Fix tests and linters

* ruff

* speed up _replace_all_abbreviations

* Fix imports and merging errors - add slots attr

* Fix unrelated const changes

* More unrelated changes

* join string

* fix merge

* Undo move

* Adjust logger statement

* fix task storm to load platforms

* Revert "fix task storm to load platforms"

This reverts commit 8f12a5f251.

* bail if logging is disabled

* Correct mixup object_id and node_id

* Auto migrate entities to device discovery

* Add device discovery test for device_trigger

* Add migration support for non entity platforms

* Use helper to remove discovery payload

* Fix tests after update branch

* Add discovery migration test

* Refactor

* Repair after rebase

* Fix discovery is broken after migration

* Improve comments

* More comment improvements

* Split long lines

* Add comment to indicate payload dict can be empty

* typo

* Add walrus and update comment

* Add tag to migration test

* Join try blocks

* Refactor

* Cleanup not used attribute

* Refactor

* Move _replace_all_abbreviations out of try block

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-29 11:12:05 +02:00
Bouwe Westerdijk 83e62c5239
Discover new device at runtime in Plugwise (#117688)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-05-29 11:00:07 +02:00
G Johansson 6b7ff2bf44
Add default code to alarm_control_panel (#112540) 2024-05-29 10:46:53 +02:00
G Johansson 13ebc6fb0e
Add more tests to Yale Smart Alarm (#116501) 2024-05-29 10:34:20 +02:00
epenet bead6b0094
Rename service_calls fixture in template tests (#118358) 2024-05-29 10:27:52 +02:00
Stefan Agner cae22e5109
Adjust add-on installation error message (#118309) 2024-05-29 09:41:09 +02:00
epenet 98d24dd276
Improve typing for `calls` fixture in tests (m-z) (#118350)
* Improve typing for `calls` fixture in tests (m-z)

* More

* More
2024-05-29 09:30:41 +02:00
epenet 0c38aa56f5
Rename calls fixture in components tests (#118355) 2024-05-29 09:26:44 +02:00