21461 Commits

Author SHA1 Message Date
J. Nick Koston
4e3c4400a7
Refactor MQTT to replace get_mqtt_data with HassKey (#117899) 2024-05-21 23:21:51 -10:00
epenet
b898c86c89
Add MAC cleanup to SamsungTV (#117906)
* Add MAC cleanup to samsungtv

* Simplify

* Adjust

* leftover

* Appl

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update diagnostics tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-22 10:36:21 +02:00
MatthewFlamm
52bb02b376
Keep observation data valid for 60 min and retry with no data for nws (#117109)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-21 22:14:05 -10:00
epenet
cddb057eae
Adjust conftest type hints (#117900) 2024-05-22 09:34:17 +02:00
epenet
39b4e890a0
Add coordinator to SamsungTV (#117863)
* Introduce samsungtv coordinator

* Adjust

* Adjust media_player

* Remove remote

* Adjust

* Fix mypy

* Adjust

* Use coordinator.async_refresh
2024-05-22 09:20:05 +02:00
Robert Svensson
5abf77662a
Support carbon dioxide and formaldehyde sensors in deCONZ (#117877)
* Add formaldehyde sensor
* Add carbon dioxide sensor
* Bump pydeconz to v116
2024-05-22 07:33:55 +02:00
Denis Shulyaka
2f0215b034
LLM Tools support for OpenAI integration (#117645)
* initial commit

* Add tests

* Move tests to the correct file

* Fix exception type

* Undo change to default prompt

* Add intent dependency

* Move format_tool out of the class

* Fix tests

* coverage

* Adjust to new API

* Update strings

* Update tests

* Remove unrelated change

* Test referencing non-existing API

* Add test to verify no exception on tool conversion for Assist tools

* Bump voluptuous-openapi==0.0.4

* Add device_id to tool input

* Fix tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-21 22:45:04 -04:00
Denis Shulyaka
009c9e79ae
LLM Tools: Add device_id (#117884) 2024-05-21 21:24:46 -04:00
J. Nick Koston
f429bfa903
Fix mqtt timer churn (#117885)
Borrows the same design from homeassistant.helpers.storage to avoid
rescheduling the timer every time async_schedule is called if a timer
is already running.

Instead of the timer fires too early it gets rescheduled for the time
we wanted it. This avoids 1000s of timer add/cancel during startup
2024-05-21 21:05:33 -04:00
Matthias Alphart
70cf176d93
Add value_template option to KNX expose (#117732)
* Add value_template option to KNX expose

* template exception handling
2024-05-22 00:09:42 +02:00
Matthias Alphart
622d1e4c50
Add data point type option to knx.telegram trigger (#117463)
* Add data point type (dpt) option to `knx.telegram` trigger

* Rename from `dpt` to `type` to match services

* Add test for GroupValueRead telegrams

* Fix device trigger schema inheritance

* Typesafe dispatcher signal

* readability

* Avoid re-decoding with same transcoder
2024-05-22 00:03:54 +02:00
Matthias Alphart
b94735a445
Add async_turn_on/off methods for KNX climate entities (#117882)
Add async_turn_on/off methods for KNX climate entities
2024-05-21 23:54:43 +02:00
Sid
c2b3bf3fb9
Enable Ruff RET502 (#115139) 2024-05-21 22:19:33 +02:00
Paulus Schoutsen
f21226dd0e
Address late feedback Google LLM (#117873) 2024-05-21 20:11:18 +02:00
Michael Hansen
8079cc0464
Add description to intent handlers and use in LLM helper (#117864) 2024-05-21 12:54:34 -04:00
wittypluck
0c37a065ad
Add support for Glances v4 (#117664) 2024-05-21 16:21:36 +02:00
J. Nick Koston
e12d23bd48
Speed up async_get_loaded_integrations (#117851)
* Speed up async_get_loaded_integrations

Use a setcomp and difference to find the components to split
to avoid the loop. A setcomp is inlined in python3.12 so its
much faster

* Speed up async_get_loaded_integrations

Use a setcomp and difference to find the components to split
to avoid the loop. A setcomp is inlined in python3.12 so its
much faster

* simplify

* fix compat

* bootstrap

* fix tests
2024-05-21 09:08:49 -04:00
Thomas55555
bb758bcb26
Bump aioautomower to 2024.5.1 (#117815) 2024-05-21 09:43:36 +02:00
J. Nick Koston
508cc2e5a1
Remove @ from codeowners when downloading diagnostics (#117825)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-21 09:32:07 +02:00
Bernardus Jansen
d0b1ac6918
Tesla wall connector add sensors (#117769) 2024-05-21 09:30:24 +02:00
Allen Porter
fc931ac449
Stop the nest subscriber on Home Assistant stop (#117830) 2024-05-20 22:59:11 -07:00
J. Nick Koston
c9d1b127d8
Improve error message when template is rendered from wrong thread (#117822)
* Improve error message when template is rendered from wrong thread

* Improve error message when template is rendered from wrong thread
2024-05-20 23:26:48 -04:00
J. Nick Koston
58210b1968
Bump tesla-powerwall to 0.5.2 (#117823) 2024-05-20 16:51:39 -10:00
puddly
4dc670056c
Account for disabled ZHA discovery config entries when migrating SkyConnect integration (#117800)
* Properly handle disabled ZHA discovery config entries

* Update tests/components/homeassistant_sky_connect/test_util.py

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>

---------

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
2024-05-20 21:35:57 -04:00
J. Nick Koston
7714f807b4
Detect incorrect exception in forwarded platforms (#117754)
* Detect incorrect exception in forwarded platforms

If an integration raises ConfigEntryError/ConfigEntryAuthFailed/ConfigEntryAuthFailed
in a forwarded platform it would affect the state of the config entry and cause it to
process unloads and setup retries in while the other platforms continued to setup

* Detect incorrect exception in forwarded platforms

If an integration raises ConfigEntryError/ConfigEntryAuthFailed/ConfigEntryAuthFailed
in a forwarded platform it would affect the state of the config entry and cause it to
process unloads and setup retries in while the other platforms continued to setup

* Update homeassistant/config_entries.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* adjust

* fix

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-20 20:01:59 -04:00
Marc Mueller
1ad8151bd1
Use PEP 695 type alias in tests (#117797) 2024-05-20 19:03:04 +02:00
Michael Hansen
e8aa4b069a
Unpause media players that were paused outside voice (#117575)
* Unpause media players that were paused outside voice

* Use time.time()

* Update last paused as media players change state

* Add sleep to test

* Use context

* Implement suggestions
2024-05-20 11:02:36 -05:00
Marc Mueller
f50973c76c
Use PEP 695 misc (#117788) 2024-05-20 12:01:49 +02:00
J. Nick Koston
5a609c34bb
Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
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