Commit Graph

21182 Commits (0293315b23cf15e148bc45e8fc99f8773879e5d0)

Author SHA1 Message Date
Marc Mueller 8f0fb4db3e
Use PEP 695 for class annotations (4) (#117778) 2024-05-20 10:44:52 +02:00
J. Nick Koston 149120b749
Add setup time detail to diagnostics (#117766) 2024-05-20 09:52:28 +02:00
J. Nick Koston 13ba8e62a9
Fix race in config entry setup (#117756) 2024-05-20 09:47:47 +02:00
epenet 570d5f2b55
Add turn_on to SamsungTV remote (#117403)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-19 20:14:20 -10:00
Denis Shulyaka c3196a5667
LLM Tools support for Google Generative AI integration (#117644)
* initial commit

* Undo prompt chenges

* Move format_tool out of the class

* Only catch HomeAssistantError and vol.Invalid

* Add config flow option

* Fix type

* Add translation

* Allow changing API access from options flow

* Allow model picking

* Remove allowing HASS Access in main flow

* Move model to the top in options flow

* Make prompt conditional based on API access

* convert only once to dict

* Reduce debug logging

* Update title

* re-order models

* Address comments

* Move things

* Update labels

* Add tool call tests

* coverage

* Use LLM APIs

* Fixes

* Address comments

* Reinstate the title to not break entity name

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-19 22:11:25 -04:00
J. Nick Koston ac3321cef1
Fix setting MQTT socket buffer size with WebsocketWrapper (#117672) 2024-05-19 14:09:21 -10:00
Maciej Bieniek 826f6c6f7e
Refactor tests for Brother integration (#117377)
* Refactor tests - step 1

* Remove fixture

* Refactor test_init

* Refactor test_diagnostics

* Refactor test_config_flow

* Increase test coverage

* Cleaning

* Cleaning

* Check config entry state in test_async_setup_entry

* Simplify patching

* Use AsyncMock when patching

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-19 20:41:47 +02:00
Maciej Bieniek da42a8e1c6
Use SnmpEngine stored in hass.data by singleton in Brother integration (#117043) 2024-05-19 11:33:21 +02:00
Paulus Schoutsen d001e7daea
Add API class to LLM helper (#117707)
* Add API class to LLM helper

* Add more tests

* Rename intent to assist to broaden scope
2024-05-18 21:14:05 -04:00
epenet d81bb8cdcd
Allow manual delete of stale Renault vehicles (#116229) 2024-05-18 13:46:38 +02:00
Ville Skyttä a27cc24da2
Filter out HTML greater/less than entities from huawei_lte sensor values (#117209) 2024-05-18 13:45:42 +02:00
epenet 3a8bdfbfdf
Use remove_device helper in tasmota tests (#116617) 2024-05-18 13:43:21 +02:00
Joost Lekkerkerker 1d16e219e4
Refactor Aurora tests (#117323) 2024-05-18 13:40:30 +02:00
Brett Adams 1b0c91fa4d
Improve diagnostics in Teslemetry (#117613) 2024-05-18 13:27:23 +02:00
Joost Lekkerkerker b39028acf2
Improve Monzo tests (#117036) 2024-05-18 13:20:08 +02:00
epenet 4dad9c8859
Move plenticore coordinators to separate module (#117491) 2024-05-18 13:11:22 +02:00
Marc Mueller 10dfa91e54
Remove useless TypeVars (#117687) 2024-05-18 12:58:51 +02:00
Marc Mueller 3cd1717437
Improve YieldFixture typing (#117686) 2024-05-18 12:35:02 +02:00
Allen Porter caa35174cb
Add Google Gen AI Conversation Agent Entity (#116362)
* Add Google Gen AI Conversation Agent Entity

* Rename agent to entity

* Revert ollama changes

* Don't copy service tests to conversation_test.py

* Move logger and cleanup snapshots

* Move property after init

* Set logger to use package

* Cleanup hass from constructor

* Fix merges

* Revert ollama change
2024-05-17 11:00:11 -04:00
epenet fce4263493
Move p1_monitor coordinator to separate module (#117562) 2024-05-17 16:34:47 +02:00
Marc Mueller 25d1ca747b
Use PEP 695 for decorator typing (3) (#117640) 2024-05-17 16:27:32 +02:00
Joost Lekkerkerker 9cf8e49b01
Fix icons and strings in Balboa (#117618) 2024-05-17 16:17:36 +02:00
epenet bbcbf57117
Add snapshot tests to elmax (#117637)
* Add snapshot tests to elmax

* Rename test methods

* Re-generate
2024-05-17 15:55:38 +02:00
Joost Lekkerkerker 0b8a5ac9ad
Add snapshot tests to Balboa (#117620) 2024-05-17 15:38:39 +02:00
epenet 081bf1cc39
Move modern_forms coordinator to separate module (#117610) 2024-05-17 15:19:40 +02:00
Marc Mueller 87bb7ced79
Use PEP 695 for simple type aliases (#117633) 2024-05-17 14:42:21 +02:00
epenet addc4a84ff
Rename hassio coordinator module (#117611) 2024-05-17 12:10:21 +02:00
Robert Svensson bbfc2456ec
Improve syncing light states to deCONZ groups (#117588) 2024-05-17 08:44:09 +02:00
Robert Svensson 657b3ceedc
Rework deCONZ services to load once and never unload (#117592)
* Rework deCONZ services to load once and never unload

* Fix hassfest
2024-05-16 21:41:23 -04:00
MatthewFlamm 121aa158c9
Use config entry runtime_data in nws (#117593) 2024-05-16 23:14:44 +02:00
Joost Lekkerkerker 68b7302cdc
Add Poolsense platform tests (#117579) 2024-05-16 21:35:00 +02:00
MatthewFlamm 9aa7d3057b
Add diagnostics for nws (#117587)
* add diagnostics

* remove hassfezt exception
2024-05-16 21:26:22 +02:00
Joost Lekkerkerker cd8dac65b3
Refactor Poolsense config flow tests (#117573) 2024-05-16 17:51:57 +02:00
Maciej Bieniek 789073384b
Support reconfigure flow in Shelly integration (#117525)
* Support reconfigure flow

* Update strings

* Add tests

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-16 17:47:12 +02:00
epenet d670f1d81d
Move pure_energie coordinator to separate module (#117560) 2024-05-16 16:51:25 +02:00
Michael Hansen e168cb96e9
Add area filter and rounded time to timers (#117527)
* Add area filter

* Add rounded time to status

* Fix test

* Extend test

* Increase test coverage
2024-05-16 09:45:14 -05:00
epenet d019c25ae4
Move pvpc coordinator to separate module (#117559) 2024-05-16 16:06:50 +02:00
Joost Lekkerkerker 4cded378bf
Handle uncaught exceptions in Analytics insights (#117558) 2024-05-16 13:43:03 +02:00
epenet 59645aeb0f
Move risco coordinator to separate module (#117549) 2024-05-16 13:29:57 +02:00
epenet 388132cfc8
Move rainforest_eagle coordinator to separate module (#117556) 2024-05-16 12:57:20 +02:00
Simone Chemelli 32a9cb4b14
Add Shelly motion sensor switch (#115312)
* Add Shelly motion sensor switch

* update name

* make motion switch a restore entity

* add test

* apply review comment

* Update tests/components/shelly/test_switch.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update tests/components/shelly/test_switch.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update tests/components/shelly/test_switch.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update tests/components/shelly/test_switch.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* rename switch

* Update tests/components/shelly/test_switch.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update tests/components/shelly/test_switch.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update tests/components/shelly/test_switch.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* fix ruff

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-05-16 12:49:49 +02:00
Sid 6ce1d97e7a
Add Webmin filesystem sensors (#112660)
* Add Webmin filesystem sensors

* fix names

* update snapshots

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-16 09:03:35 +02:00
Michael Hansen daee3d8db0
Don't prioritize "name" slot if it's a wildcard in default conversation agent (#117518)
* Don't prioritize "name" slot if it's a wildcard

* Fix typing error
2024-05-15 22:23:24 -04:00
Denis Shulyaka f31873a846
Add LLM tools (#115464)
* Add llm helper

* break out Tool.specification as class members

* Format state output

* Fix intent tests

* Removed auto initialization of intents - let conversation platforms do that

* Handle DynamicServiceIntentHandler.extra_slots

* Add optional description to IntentTool init

* Add device_id and conversation_id parameters

* intent tests

* Add LLM tools tests

* coverage

* add agent_id parameter

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Fix tests

* Fix intent schema

* Allow a Python function to be registered as am LLM tool

* Add IntentHandler.effective_slot_schema

* Ensure IntentHandler.slot_schema to be vol.Schema

* Raise meaningful error on tool not found

* Move this change to a separate PR

* Update todo integration intent

* Remove Tool constructor

* Move IntentTool to intent helper

* Convert custom serializer into class method

* Remove tool_input from FunctionTool auto arguments to avoid recursion

* Remove conversion into Open API format

* Apply suggestions from code review

* Fix tests

* Use HassKey for helpers (see #117012)

* Add support for functions with typed lists, dicts, and sets as type hints

* Remove FunctionTool

* Added API to get registered intents

* Move IntentTool to the llm library

* Return only handlers in intents.async.get

* Removed llm tool registration from intent library

* Removed tool registration

* Add bind_hass back for now

* removed area and floor resolving

* fix test

* Apply suggestions from code review

* Improve coverage

* Fix intent_type type

* Temporary disable HassClimateGetTemperature intent

* Remove bind_hass

* Fix usage of slot schema

* Fix test

* Revert some test changes

* Don't mutate tool_input

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-15 19:16:47 -04:00
Paulus Schoutsen 4aba92ad04
Fix the type of slot schema of intent handlers (#117520)
Fix the slot schema of dynamic intenet handler
2024-05-15 16:45:15 -04:00
Jan-Philipp Benecke 5e194b8a82
Do not register mqtt mock config flow with handlers (#117521) 2024-05-15 16:17:27 -04:00
epenet 0a625baeed
Rename fritz coordinator module (#117440)
* Rename fritz coordinator module

* Update .coveragerc

* Adjust .coveragerc

* Adjust coverage

* Adjust coverage
2024-05-15 21:58:29 +02:00
IceBotYT ebb02a7081
Add light platform to Linear garage door (#111426)
* Add light platform

* Fix light test

* Suggestions by CFenner

* Fix tests

* More fixes

* Revert test changes

* Undo base entity

* Rebase

* Fix to use base entity

* Fix name

* More fixes

* Fix tests

* Add translation key

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-15 21:43:31 +02:00
Matthias Alphart ec4c8ae228
Allow templates for enabling actions (#117049)
* Allow templates for enabling automation actions

* Use `cv.template` instead of `cv.template_complex`

* Rename test function
2024-05-15 21:03:52 +02:00
Matthias Alphart 076f57ee07
Allow templates for enabling conditions (#117047)
* Allow templates for enabling automation conditions

* Use `cv.template` instead of `cv.template_complex`
2024-05-15 21:03:28 +02:00