Commit Graph

21504 Commits (74438783335c11f1f4a50681d86758ff7207f08d)

Author SHA1 Message Date
J. Nick Koston e0232510d7
Revert "Add websocket API to get list of recorded entities (#92640)" (#118644)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-06-03 21:21:45 +02:00
Paulus Schoutsen 84f9bb1d63
Automatically fill in slots based on LLM context (#118619)
* Automatically fill in slots from LLM context

* Add tests

* Apply suggestions from code review

Co-authored-by: Allen Porter <allen@thebends.org>

---------

Co-authored-by: Allen Porter <allen@thebends.org>
2024-06-03 21:21:41 +02:00
G Johansson 1708b60ecf Fix entity state dispatching for Tag entities (#118662) 2024-06-03 01:10:06 +00:00
puddly 3c012c497b Bump ZHA dependencies (#118658)
* Bump bellows to 0.39.0

* Do not create a backup if there is no active ZHA gateway object

* Bump universal-silabs-flasher as well
2024-06-03 01:10:05 +00:00
Jan Bouwhuis 3653a51288 Fix handling undecoded mqtt sensor payloads (#118633) 2024-06-03 01:10:04 +00:00
J. Nick Koston 9366a4e69b Include a traceback for non-strict event loop blocking detection (#118620) 2024-06-03 01:10:03 +00:00
tronikos 236b19c5b3 Use gemini-1.5-flash-latest in google_generative_ai_conversation.generate_content (#118594) 2024-06-03 01:10:02 +00:00
tronikos 1afbfd687f Strip Google AI text responses (#118593)
* Strip Google AI test responses

* strip each part
2024-06-03 01:10:01 +00:00
Paulus Schoutsen 20159d0277 Add base prompt for LLMs (#118592) 2024-06-03 01:10:00 +00:00
tronikos 4df3d43e45 Stop instructing LLM to not pass the domain as a list (#118590) 2024-06-03 01:10:00 +00:00
epenet b459559c8b Add ability to replace connections in DeviceRegistry (#118555)
* Add ability to replace connections in DeviceRegistry

* Add more tests

* Improve coverage

* Apply suggestion

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-31 19:34:38 +00:00
Maciej Bieniek d823e56659 In Brother integration use SnmpEngine from SNMP integration (#118554)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-31 19:34:37 +00:00
Josef Zweck 4998fe5e6d Migrate openai_conversation to `entry.runtime_data` (#118535)
* switch to entry.runtime_data

* check for missing config entry

* Update homeassistant/components/openai_conversation/__init__.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-31 19:34:34 +00:00
Brett Adams a59c890779 Fix off_grid_vehicle_charging_reserve_percent in Teselemetry (#118532) 2024-05-31 19:34:34 +00:00
J. Nick Koston ba769f4d9f Fix snmp doing blocking I/O in the event loop (#118521) 2024-05-31 19:34:31 +00:00
Denis Shulyaka c09bc726d1 Add OpenAI Conversation system prompt `user_name` and `llm_context` variables (#118512)
* OpenAI Conversation: Add variables to the system prompt

* User name and llm_context

* test for user name

* test for user id

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-31 19:34:31 +00:00
Josef Zweck c441f689bf 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-31 19:34:07 +00:00
Denis Shulyaka 395e1ae31e Add Google Generative AI Conversation system prompt `user_name` and `llm_context` variables (#118510)
* Google Generative AI Conversation: Add variables to the system prompt

* User name and llm_context

* test for template variables

* test for template variables

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-31 19:32:47 +00:00
Paulus Schoutsen 17cb25a5b6 Rename llm.ToolContext to llm.LLMContext (#118566) 2024-05-31 19:32:07 +00:00
tronikos 7dab255c15 Fix unnecessary single quotes escaping in Google AI (#118522) 2024-05-31 02:19:58 +00:00
tronikos cea7347ed9 Improve LLM prompt (#118520) 2024-05-31 02:19:56 +00:00
tronikos f4a876c590 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-31 02:19:55 +00:00
Paulus Schoutsen e95b63bc89 Intent script: allow setting description and platforms (#118500)
* Add description to intent_script

* Allow setting platforms
2024-05-31 02:19:51 +00:00
Jan Bouwhuis ea44b534e6 Fix group platform dependencies (#118499) 2024-05-31 02:19:50 +00:00
Tsvi Mostovicz d93d7159db 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-31 02:19:44 +00:00
Diogo Gomes e6e017dab7 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-31 02:19:43 +00:00
Marcel van der Veldt e906812fbd
Extend Matter sensor discovery schemas for Air Purifier / Air Quality devices (#118483)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-05-30 17:02:26 +02:00
Robert Resch 522152e7d2
Set enity_category to config for airgradient select entities (#118477) 2024-05-30 17:02:21 +02:00
Robert Resch 98d905562e
Bump deebot-client to 7.3.0 (#118462) 2024-05-30 17:02:05 +02:00
tronikos 48342837c0
Instruct LLM to not pass a list to the domain (#118451) 2024-05-30 17:02:00 +02:00
tronikos 3e0d9516a9
Improve LLM prompt (#118443)
* Improve LLM prompt

* test

* improvements

* improvements
2024-05-30 17:01:55 +02:00
Alexey Guseynov c6c36718b9
Add Total Volatile Organic Compounds (tVOC) matter discovery schema (#116963) 2024-05-30 17:01:49 +02:00
Marcel van der Veldt a580d834da
Fix light discovery for Matter dimmable plugin unit (#118404) 2024-05-30 00:12:27 +02:00
swcloudgenie ad3823764a
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-30 00:12:19 +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
epenet 0f8588a857
Rename calls fixture in mqtt tests (#118354)
Rename calls fixture in mqtt
2024-05-29 09:25:34 +02:00
epenet e488f9b87f
Rename calls fixture in calendar tests (#118353) 2024-05-29 09:24:36 +02:00
J. Nick Koston 0888233f06
Make Recorder dialect_name a cached_property (#117922) 2024-05-29 09:23:40 +02:00
Bygood91 f7d2d94fdc
Add Google assistant Gate device type (#118144) 2024-05-29 09:18:02 +02:00
Robert Resch e087abe802
Add ws endpoint to remove expiration date from refresh tokens (#117546)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-29 09:09:59 +02:00
epenet 7e62061b9a
Improve typing for `calls` fixture in tests (a-l) (#118349)
* Improve typing for `calls` fixture in tests (a-l)

* More

* More
2024-05-29 09:06:48 +02:00
Raman Gupta 89ae425ac2
Update zwave_js WS APIs for provisioning (#117400) 2024-05-29 02:47:09 -04:00
Maximilian Hildebrand 05d0174e07
Add august open action (#113795)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-28 20:35:53 -10:00
G Johansson ae6c394b53
Add smoke detector temperature to Yale Smart Alarm (#116306) 2024-05-29 08:34:00 +02:00
Erik Montnemery 7abffd7cc8
Don't report entities with invalid unique id when loading the entity registry (#118290) 2024-05-29 08:32:39 +02:00
Quentame 4d7b1288d1
Fix epic_games_store mystery game URL (#118314) 2024-05-29 08:32:29 +02:00
J. Nick Koston 76aa504e36
Fix last_reported_timestamp not being updated when last_reported is changed (#118341)
* Reduce number of calls to last_reported_timestamp

When a state is created, last_update is always the same
as last_reported, and we only update it later if it changes
so we can pre-set the cached property to avoid it being
run when the recorder accesses it later.

* fix cache not being overridden

* coverage
2024-05-28 19:03:19 -10:00
J. Nick Koston 79bc179ce8
Improve websocket message coalescing to handle thundering herds better (#118268)
* Increase websocket peak messages to match max expected entities

During startup the websocket would frequently disconnect if more than
4096 entities were added back to back. Some MQTT setups will have more
than 10000 entities. Match the websocket peak value to the max expected
entities

* coalesce more

* delay more if the backlog gets large

* wait to send if the queue is building rapidly

* tweak

* tweak for chrome since it works great in firefox but chrome cannot handle it

* Revert "tweak for chrome since it works great in firefox but chrome cannot handle it"

This reverts commit 439e2d76b1.

* adjust for chrome

* lower number

* remove code

* fixes

* fast path for bytes

* compact

* adjust test since we see the close right away now on overload

* simplify check

* reduce loop

* tweak

* handle ready right away
2024-05-28 23:14:06 -04:00
Paulus Schoutsen d22871f1fd
Reduce the intent response data sent to LLMs (#118346)
* Reduce the intent response data sent to LLMs

* No longer delete speech
2024-05-28 23:07:00 -04:00
Paulus Schoutsen c097a05ed4
Tweak Assist LLM API prompt (#118343) 2024-05-28 22:43:22 -04:00
Michael Hansen d223e1f2ac
Add Conversation command to timers (#118325)
* Add Assist command to timers

* Rename to conversation_command. Execute in timer code.

* Make agent_id optional

* Fix arg

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-28 20:33:31 -05:00
Paulus Schoutsen 615a1eda51
LLM Assist API to ignore intents if not needed for exposed entities or calling device (#118283)
* LLM Assist API to ignore timer intents if device doesn't support it

* Refactor to use API instances

* Extract ToolContext class

* Limit exposed intents based on exposed entities
2024-05-28 21:29:18 -04:00
Paulus Schoutsen 0cf574dc42
Update the recommended model for Google Gen AI (#118323) 2024-05-28 21:21:28 -04:00
Marcel van der Veldt 5f5288d8b9
Several fixes for the Matter climate platform (#118322)
* extend hvacmode mapping with extra modes

* Fix climate platform

* adjust tests

* fix reversed test

* cleanup

* dry and fan hvac mode test
2024-05-28 21:18:35 -04:00
Jesse Hills 035e21ddbb
[esphome] 100% voice assistant test coverage (#118334) 2024-05-28 21:14:47 -04:00
Michael Hansen 9e1676bee4
Filter timers more when pausing/unpausing (#118331) 2024-05-28 19:36:34 -04:00
J. Nick Koston 69353d2719
Speed up mqtt debug info on message callback (#118303) 2024-05-28 11:10:07 -10:00
dontinelli 5eb1d72691
Raise UpdateFailed on fyta API error (#118318)
* Raise UpdateFailed

* Update homeassistant/components/fyta/coordinator.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Remove logger

* simplify code

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-28 21:18:15 +02:00
Jesse Hills 7f530ee0e4
[esphome] Assist timers (#118275)
* [esphome] Assist timers

* Add intent to manifest dependencies

* Add test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-28 14:57:58 -04:00
Michael Hansen 06d6f99964
Respect WyomingSatelliteMuteSwitch state on start (#118320)
* Respect WyomingSatelliteMuteSwitch state on start

* Fix test

---------

Co-authored-by: Kostas Chatzikokolakis <kostas@chatzi.org>
2024-05-28 14:55:02 -04:00
Michael Hansen 75ab4d2398
Add temperature slot to light turn on intent (#118321) 2024-05-28 14:53:49 -04:00
epenet a59621bf9e
Add more type hints to pylint plugin (#118319) 2024-05-28 18:37:38 +02:00
epenet 0b2aac8f4c
Use registry fixtures in tests (z) (#118300) 2024-05-28 18:25:49 +02:00
Michael Hansen 106cb4cfb7
Bump intents and add tests for new error messages (#118317)
* Add new error keys

* Bump intents and test new error messages

* Fix response text
2024-05-28 12:24:24 -04:00
epenet 05fc7cfbde
Enforce namespace use for import conventions (#118215)
* Enforce namespace use for import conventions

* Include all registries

* Only apply to functions

* Use blacklist

* Rephrase comment

* Add async_entries_for_config_entry

* Typo

* Improve

* More core files

* Revert "More core files"

This reverts commit 9978b93706.

* Revert diagnostics amends

* Include category/floor/label registries

* Performance

* Adjust text
2024-05-28 18:15:53 +02:00
Kostas Chatzikokolakis 14132b5090
Don't set 'assist in progess' flag on wake_word-end (#113585) 2024-05-28 11:09:59 -05:00
Paulus Schoutsen f0d7f48930
Handle generic commands as area commands in the LLM Assist API (#118276)
* Handle generic commands as area commands in the LLM Assist API

* Add word area
2024-05-28 11:21:17 -04:00
Mike Degatano dbcef2e3c3
Add more supervisor info to system info panel (#115715)
* Add virtualization field fo system info

* Add ntp sync and host connectivity

* Prevent nonetype errors

* Add supervisor_connectivity and fix tests

* Add mock of network info to other fixtures

* Update more fixtures with network/info mock
2024-05-28 16:14:42 +02:00
epenet e58d060f82
Use registry fixtures in tests (s) (#118295) 2024-05-28 15:41:03 +02:00
epenet f07f183a3e
Use registry fixtures in tests (v-y) (#118299) 2024-05-28 14:26:14 +02:00
epenet 8d8696075b
Use registry fixtures in tests (r) (#118293) 2024-05-28 14:23:31 +02:00
epenet 2545b7d3bb
Use registry fixtures in tests (t-u) (#118297) 2024-05-28 14:23:01 +02:00
epenet 301c17cba7
Use registry fixtures in tests (o-p) (#118292) 2024-05-28 13:42:38 +02:00
epenet ead0e797c1
Use registry fixtures in tests (m-n) (#118291) 2024-05-28 13:40:45 +02:00
epenet 8837c50da7
Use registry fixtures in tests (a-h) (#118288) 2024-05-28 13:15:16 +02:00
Sebastian Lövdahl e9ab9b818f
Add reconfigure step for vallox (#115915)
* Add reconfigure step for vallox

* Reuse translation
2024-05-28 13:13:53 +02:00
epenet 01be006d40
Use registry fixtures in tests (tailscale) (#118301) 2024-05-28 13:12:51 +02:00
Marcel van der Veldt 21f5ac7715
Fix Matter device ID for non-bridged composed device (#118256) 2024-05-28 12:47:46 +02:00
Ludovic BOUÉ f44dfe8fef
Add Matter fan platform (#111212)
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
2024-05-28 12:24:58 +02:00
ollo69 7f934bafc2
Add diagnostics test to AndroidTV (#117129) 2024-05-28 10:56:32 +02:00
Erwin Douna fb95b91507
Add DSMR Reader tests (#115808)
* Add DSMR Reader sensor tests

* Change to paramatization

* Removing patch

* Emulate the test

* Go for 100% test coverage

* Adding defintions.py

* Add myself as code owner to keep improving
2024-05-28 10:42:21 +02:00