Commit Graph

21571 Commits (59e178df3b86426fe4a0319e32c40af3efa6547d)

Author SHA1 Message Date
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
J. Nick Koston 3ba3e3135e
Fix flakey bootstrap test (#118285) 2024-05-28 08:11:14 +02:00
Tsvi Mostovicz ea91f7a5aa
Change strings to const in Jewish Calendar (#118274) 2024-05-28 07:49:39 +02:00
tronikos 4f7a91828e
Mock llm prompts in test_default_prompt for Google Generative AI (#118286) 2024-05-28 00:40:26 -04:00
tronikos 63227f14ed
Add diagnostics to Google Generative AI (#118262)
* Add diagnostics for Google Generative AI

* Remove quality scale from manifest

* include options in diagnostics
2024-05-28 00:02:32 -04:00
Ben Thomas f6f6bf8953
SharkIQ Fix for vacuums without room support (#118209)
* Fix SharkIQ vacuums without room support crashing the SharkIQ integration

* Fix ruff format

* Fix SharkIQ tests to account for robot identifier and second expected value
2024-05-27 23:57:21 -04:00
Ben Thomas 4d7802215c
Fix rooms not being matched correctly in sharkiq.clean_room (#118277)
* Fix rooms not being matched correctly in sharkiq.clean_room

* Update sharkiq tests to account for new room matching logic
2024-05-27 23:51:51 -04:00
tronikos 0c245f1976
Fix freezing on HA startup when there are multiple Google Generative AI config entries (#118282)
* Fix freezing on HA startup when there are multiple Google Generative AI config entries

* Add timeout to list_models
2024-05-27 23:49:16 -04:00
tronikos 722feb285b
Handle multiple function_call and text parts in Google Generative AI (#118270) 2024-05-27 19:57:03 -04:00
Jan Bouwhuis bfc3194661
Fix mqtt not publishing null payload payload to remove discovery (#118261) 2024-05-27 12:53:22 -10:00
G Johansson 6067ea2454
Cleanup tag integration (#118241)
* Cleanup tag integration

* Fix review comments
2024-05-27 21:53:06 +02:00
dontinelli e54fbcec77
Add diagnostics for fyta (#118234)
* Add diagnostics

* add test for diagnostics

* Redact access_token

* remove unnecessary redaction
2024-05-27 18:34:05 +02:00
Michael a24d97d79d
Convert Feedreader to use an update coordinator (#118007) 2024-05-27 14:48:41 +02:00
epenet 97f6b578c8
Enforce namespace import in core (#118235) 2024-05-27 14:03:00 +02:00
Maciej Bieniek 805f634634
Bump `nettigo_air_monitor` to version 3.1.0 (#118227)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-27 12:54:10 +02:00
epenet fa038bef92
Use area_registry fixture in component tests (#118236) 2024-05-27 12:40:08 +02:00
Brett Adams 46158f5c14
Allow older vehicles to sleep in Teslemetry (#117229)
* Allow older vehicles to sleep

* Remove updated_once

* move pre2021 to lib

* bump

* Bump again

* Bump to 0.5.11

* Fix VIN so it matches the check

* Fix snapshot

* Snapshots

* Fix self.updated_once

* Remove old pre2021 attribute

* fix snapshots

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-27 12:37:33 +02:00
dontinelli 2a8fc7f310
Add Fyta sensor tests (#117995)
* Add test for init

* update tests

* split common.py into const.py and __init__.py

* Update tests/components/fyta/__init__.py

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

* add autospec, tidy up

* adjust len-test

* add test_sensor.py, amend tests for coordinator.py

* Update tests/components/fyta/conftest.py

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

* move load_unload with expired token into own test

* Update tests/components/fyta/test_init.py

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

* ruff change

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-27 12:01:11 +02:00
Claes Hallström efcfbbf189
Add key expiry disabled binary sensor to Tailscale (#117667) 2024-05-27 11:37:00 +02:00
Duco Sebel 22cc7d34d5
Fix unique_id not being unique in HomeWizard (#117940) 2024-05-27 11:23:10 +02:00
J. Nick Koston 6b8223e339
Try to read multiple packets in MQTT (#118222) 2024-05-27 11:07:24 +02:00
Arie Catsman 83e4c2927c
Implement reconfigure step for enphase_envoy (#115781) 2024-05-27 11:06:55 +02:00
Richard Kroegel 10291b1ce8
Bump bimmer_connected to 0.15.3 (#118179)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-05-27 11:01:22 +02:00
Joost Lekkerkerker a2b1dd8a5f
Add config flow to Media Extractor (#115717) 2024-05-27 10:43:49 +02:00
J. Nick Koston 87989a88cd
Remove translation and icon component path functions (#118214)
These functions have been stripped down to always return
the same path so there was no longer a need to have a
function for this. This is left-over cleanup from
previous refactoring.
2024-05-27 10:35:52 +02:00
Joost Lekkerkerker 3d2ecd6a28
Refactor Twitch tests (#114330)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2024-05-27 10:09:12 +02:00
G Johansson 4d52d920ee
Create EventEntity for Folder Watcher (#116526) 2024-05-27 08:47:02 +02:00
Paulus Schoutsen ecb05989ca
Add exposed entities to the Assist LLM API prompt (#118203)
* Add exposed entities to the Assist LLM API prompt

* Check expose entities in Google test

* Copy Google default prompt test cases to LLM tests
2024-05-27 00:27:08 -04:00
J. Nick Koston 25f199c39c
Improve performance of verify_event_loop_thread (#118198) 2024-05-26 17:39:15 -10:00
Paulus Schoutsen 87fc27eeae
Teach Context about deepcopy (#118206)
Teach context about deepcopy
2024-05-26 23:14:02 -04:00
J. Nick Koston c15f7f304f
Remove unneeded dispatcher in mqtt discovery (#118205) 2024-05-26 17:07:24 -10:00
Paulus Schoutsen 9dc580e5de
Add (deep)copy support to read only dict (#118204) 2024-05-26 23:05:45 -04:00
Paulus Schoutsen 1602c8063c
Standardize LLM instructions prompt (#118195)
* Standardize instructions prompt

* Add time/date to default instructions
2024-05-26 20:24:26 -04:00
Brett Adams 841d5dfd4f
Fix flaky test in Teslemetry (#118196)
Cleanup tests
2024-05-26 17:31:11 -04:00
Michael Hansen 3766c72ddb
Forward timer events to Wyoming satellites (#118128)
* Add timer tests

* Forward timer events to satellites

* Use config entry for background tasks
2024-05-26 17:29:46 -04:00
J. Nick Koston 226d010ab2
Simplify mqtt connection state dispatcher (#118184) 2024-05-26 10:21:21 -10:00
Tsvi Mostovicz 11646cab5f
Move Jewish calendar constants to const file (#118180)
* Move Jewish calendar constants to const file

* Add a few missed constants

* Move CONF_LANGUAGE to it's correct path
2024-05-26 19:23:02 +02:00
tronikos 0972b29510
Add Google Generative AI reauth flow (#118096)
* Add reauth flow

* address comments
2024-05-26 11:44:48 -04:00
Angel Nunez Mencias b85cf36a68
Upgrade thethingsnetwork to v3 (#113375)
* thethingsnetwork upgrade to v3

* add en translations and requirements_all

* fix most of the findings

* hassfest

* use ttn_client v0.0.3

* reduce content of initial release

* remove features that trigger errors

* remove unneeded

* add initial testcases

* Exception warning

* add strict type checking

* add strict type checking

* full coverage

* rename to conftest

* review changes

* avoid using private attributes - use protected instead

* simplify config_flow

* remove unused options

* review changes

* upgrade client

* add types client library - no need to cast

* use add_suggested_values_to_schema

* add ruff fix

* review changes

* remove unneeded comment

* use typevar for TTN value

* use typevar for TTN value

* review

* ruff error not detected in local

* test review

* re-order fixture

* fix test

* reviews

* fix case

* split testcases

* review feedback

* Update homeassistant/components/thethingsnetwork/__init__.py

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

* Update homeassistant/components/thethingsnetwork/__init__.py

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

* Update tests/components/thethingsnetwork/test_config_flow.py

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

* Remove deprecated var

* Update tests/components/thethingsnetwork/test_config_flow.py

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

* Remove unused import

* fix ruff warning

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-26 16:30:33 +02:00
Robert Svensson a7938091bf
Use fixtures to setup UniFi config entries (#118126) 2024-05-26 16:30:22 +02:00
Mike Degatano 05c24e92d1
Add repair for detached addon issues (#118064)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-05-26 13:37:50 +02:00
J. Nick Koston 5d37217d96
Avoid expensive inspection of callbacks to setup mqtt subscriptions (#118161) 2024-05-26 01:22:44 -10:00
Paulus Schoutsen 4a3808c08e
Don't crash when firing event for timer for unregistered device (#118132) 2024-05-26 13:08:00 +02:00
J. Nick Koston 6697cf07a6
Fix parallel script execution in queued mode (#118153) 2024-05-26 13:05:31 +02:00
Brett Adams f12f82caac
Add update platform to Teslemetry (#118145)
* Add update platform

* Add tests

* updates

* update test

* Fix support features comment

* Add assertion
2024-05-26 13:04:02 +02:00
J. Nick Koston 7bbb33b415
Improve script disallowed recursion logging (#118151) 2024-05-26 12:58:34 +02:00
G-Two 189cf88537
Bump subarulink to 0.7.11 (#117743) 2024-05-26 12:56:43 +02:00
Michael 66119c9d47
Clean up PIhole unneccesary async_block_till_done call (#118166)
leanup unneccesary async_bock_till_done calls
2024-05-26 12:40:22 +02:00
Michael 1b191230e4
Clean up AVM Fritz!Box Tools unneccesary async_block_till_done call (#118165)
cleanup unneccesary async_bock_till_done calls
2024-05-26 12:40:07 +02:00
Brett Adams 28a6f9eae7
Add number platform to Teslemetry (#117470)
* Add number platform

* Cast numbers

* rework numbers

* Add number platform

* Update docstrings

* fix json

* Remove speed limit

* Fix snapshot

* remove speed limit icon

* Remove speed limit strings

* rework min max

* Fix coverage

* Fix snapshot

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Type callable

* Fix types

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-26 11:02:35 +02:00
Brett Adams 711f7e1ac3
Add media player platform to Teslemetry (#117394)
* Add media player

* Add tests

* Better service assertions

* Update strings.json

* Update snapshot

* Docstrings

* Fix json

* Update diag

* Review feedback

* Update snapshot

* use key for title
2024-05-26 10:36:35 +02:00
Brett Adams af8542ebe1
Add button platform to Teslemetry (#117227)
* Add buttons

* Add buttons

* Fix docstrings

* Rebase entry.runtime_data

* Revert testing change

* Fix tests

* format json

* Type callable

* Remove refresh

* Update icons.json

* Update strings.json

* Update homeassistant/components/teslemetry/button.py

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

* import Awaitable

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-26 09:04:07 +02:00
Shay Levy 6a0e7cfea5
Clean up WebOS TV unneccesary async_block_till_done calls (#118142) 2024-05-26 00:37:44 +03:00
J. Nick Koston 9be829ba1f
Make mqtt internal subscription a normal function (#118092)
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-05-25 11:34:24 -10:00
Shay Levy ecd48cc447
Clean up Shelly unneccesary async_block_till_done calls (#118141) 2024-05-26 00:28:48 +03:00
Jan Bouwhuis 521ed0a220
Fix mqtt callback exception logging (#118138)
* Fix mqtt callback exception logging

* Improve code

* Add test
2024-05-25 22:46:33 +02:00
Denis Shulyaka cee3be5f7a
Break long strings in LLM tools (#118114)
* Break long code strings

* Address comments

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-25 14:24:51 -04:00
Allen Porter 89e2c57da6
Add conversation agent debug tracing (#118124)
* Add debug tracing for conversation agents

* Minor cleanup
2024-05-25 14:16:51 -04:00
Matthias Alphart 344bb568f4
Add diagnostics support for Fronius (#117845)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-05-25 14:01:24 +02:00
tronikos 0182bfcc81
Google Generative AI: 100% test coverage for conversation (#118112)
100% coverage for conversation
2024-05-25 07:52:20 -04:00
MatthewFlamm 8fbe39f2a7
Improve nws tests by centralizing and removing unneeded `patch`ing (#118052) 2024-05-25 13:50:15 +02:00
Brett Adams ec76f34ba5
Add device tracker platform to Teslemetry (#117341) 2024-05-25 12:29:27 +01:00
Jan Bouwhuis 6fc6d109c9
Freeze and fix plaato CI tests (#118103) 2024-05-25 12:34:44 +02:00
Shay Levy e8226a8056
Store Switcher runtime data in config entry (#118054) 2024-05-25 12:17:33 +02:00
J. Nick Koston ad638dbcc5
Speed up removing MQTT subscriptions (#118088) 2024-05-25 10:28:14 +02:00
Paulus Schoutsen 81f3387d06
Flip prompts to put user prompt on top (#118085) 2024-05-25 00:33:24 -04:00
Paulus Schoutsen 69f237fa9e
Update Google safety defaults to match Google (#118084) 2024-05-25 00:02:53 -04:00
Paulus Schoutsen 676fe5a9a2
Add recommended model options to OpenAI (#118083)
* Add recommended options to OpenAI

* Use string join
2024-05-25 00:01:48 -04:00
Paulus Schoutsen c59d4f9bba
Add no-API LLM prompt back to Google (#118082)
* Add no-API LLM prompt back

* Use string join
2024-05-25 00:00:04 -04:00
Paulus Schoutsen 86a24cc3b9
Fix default Google AI prompt on initial setup (#118078) 2024-05-24 23:55:11 -04:00
Denis Shulyaka da74ac06d7
Add user name and location to the LLM assist prompt (#118071)
Add user name and location to the llm assist prompt
2024-05-24 22:23:05 -04:00
tronikos 620487fe75
Add Google Generative AI safety settings (#117679)
* Add safety settings

* snapshot-update

* DROPDOWN

* fix test

* rename const

* Update const.py

* Update strings.json
2024-05-24 21:48:39 -04:00
tronikos 5ca27f5d0c
Google Generative AI: add timeout to ensure we don't block HA startup (#118066)
* timeout

* fix

* tests
2024-05-24 21:31:02 -04:00
Jan Bouwhuis c9a79f6293
Fix lingering mqtt test (#118072) 2024-05-24 14:34:18 -10:00
Jan Bouwhuis fa1ef8b0cf
Split mqtt subscribe and unsubscribe calls to smaller chunks (#118035) 2024-05-24 13:33:28 -10:00
Jan Bouwhuis 01f3a5a97c
Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload (#117813)
* Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload

* Do not change preset mode behavior

* Add device tracker ignoring empty state

* Ignore empty state for lock

* Resolve merge errors
2024-05-25 01:29:43 +02:00
Jan Bouwhuis c616fc036e
Move recorder chunk utils to shared collection utils (#118065) 2024-05-24 12:49:39 -10:00
Aaron Bach 881237189d
Add activity type to appropriate RainMachine switches (#117875) 2024-05-24 22:40:13 +02:00
Christian Neumeier ee38099a91
Add tests to Zeversolar integration (#117928) 2024-05-24 22:18:29 +02:00
Paulus Schoutsen 7554ca9460
Allow llm API to render dynamic template prompt (#118055)
* Allow llm API to render dynamic template prompt

* Make rendering api prompt async so it can become a RAG

* Fix test
2024-05-24 16:04:48 -04:00
Paulus Schoutsen ffc3560dad
Remove unneeded asserts (#118056)
* Remove unneeded asserts

* No need to guard changing a timer that is owned by a disconnected device
2024-05-24 14:56:57 -04:00
Michael Hansen 5be15c94bc
Require registered device id for all timer intents (#117946)
* Require device id when registering timer handlers

* Require device id for timer intents

* Raise errors for unregistered device ids

* Add callback

* Add types for callback to __all__

* Clean up

* More clean up
2024-05-24 12:55:52 -05:00
Michael Hansen 77e385db52
Fix intent helper test (#118053)
Fix test
2024-05-24 12:59:19 -04:00
J. Nick Koston a8fba691ee
Add types to event tracker data (#118010)
* Add types to event tracker data

* fixes

* do not test event internals in other tests

* fixes

* Update homeassistant/helpers/event.py

* cleanup

* cleanup
2024-05-24 10:09:39 -04:00
epenet 44f715bd02
Use issue_registry fixture in component tests (#118041) 2024-05-24 15:54:20 +02:00
Robert Resch cb62f4242e
Remove strict connection (#117933) 2024-05-24 15:50:22 +02:00
epenet 0b4f1cff98
Use issue_registry fixture in core tests (#118042) 2024-05-24 15:26:32 +02:00
Marc Mueller dd22ee3dac
Improve annotation styling (#118032) 2024-05-24 15:05:53 +02:00
J. Nick Koston 2308ff2cbf
Add json cache to lovelace config (#117843) 2024-05-24 14:07:43 +02:00
Yuval Aboulafia 2c09f72c33
Add config flow to Jewish Calendar (#84464)
* Initial commit

* add basic tests (will probably fail)

* Set basic UID for now

* Various improvements

* use new naming convention?

* bit by bit, still not working tho

* Add tz selection

* Remove failing tests

* update unique_id

* add the tests again

* revert to previous binary_sensor test

* remove translations

* apply suggestions

* remove const.py

* Address review

* revert changes

* Initial fixes for tests

* Initial commit

* add basic tests (will probably fail)

* Set basic UID for now

* Various improvements

* use new naming convention?

* bit by bit, still not working tho

* Add tz selection

* Remove failing tests

* update unique_id

* add the tests again

* revert to previous binary_sensor test

* remove translations

* apply suggestions

* remove const.py

* Address review

* revert changes

* Fix bad merges in rebase

* Get tests to run again

* Fixes due to fails in ruff/pylint

* Fix binary sensor tests

* Fix config flow tests

* Fix sensor tests

* Apply review

* Adjust candle lights

* Apply suggestion

* revert unrelated change

* Address some of the comments

* We should only allow a single jewish calendar config entry

* Make data schema easier to read

* Add test and confirm only single entry is allowed

* Move OPTIONS_SCHEMA to top of file

* Add options test

* Simplify import tests

* Test import end2end

* Use a single async_forward_entry_setups statement

* Revert schema updates for YAML schema

* Remove unneeded brackets

* Remove CONF_NAME from config_flow

* Assign hass.data[DOMAIN][config_entry.entry_id] to a local variable before creating the sensors

* Data doesn't have a name remove slugifying of it

* Test that the entry has been created correctly

* Simplify setup_entry

* Use suggested values helper and flatten location dictionary

* Remove the string for name exists as this error doesn't exist

* Remove name from config entry

* Remove _attr_has_entity_name - will be added in a subsequent PR

* Don't override entity id's - we'll fixup the naming later

* Make location optional - will by default revert to the user's home location

* Update homeassistant/components/jewish_calendar/strings.json

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

* No need for local lat/long variable

* Return name attribute, will deal with it in another PR

* Revert unique_id changes, will deal with this in a subsequent PR

* Add time zone data description

* Don't break the YAML config until the user has removed it.

* Cleanup initial config flow test

---------

Co-authored-by: Tsvi Mostovicz <ttmost@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-24 14:04:17 +02:00
Fabrice d4acd86819
Make co/co2 threshold configurable via entity_config (#112978)
* make co/co2 threshold configurable via entity_config

* Split threshold into co/co2_threshold configuration
2024-05-24 13:28:19 +02:00
Philip Rosenberg-Watt e7d23d8b49
Add APRS object tracking (#113080)
* Add APRS object tracking

Closes issue #111731

* Fix unit test

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-24 13:13:02 +02:00
Jan Bouwhuis f12aee28a8
Improve error logging on invalid MQTT entity state (#118006)
* Improve error logging on invalid MQTT entity state

* Explain not hanlding TpeError and ValueError

* Move length check closer to source

* use _LOGGER.exception
2024-05-24 13:11:52 +02:00
Em 7d44321f0f
Remove duplicate tests in generic_thermostat (#105622)
Tests using `setup_comp_4` and `setup_comp_6` have been replaced by a parameterized tests in #105643. Tests using `setup_comp_5` are therefore still duplicates and are removed.
2024-05-24 12:24:05 +02:00
Brett Adams b99476284b
Add Cover platform to Teslemetry (#117340)
* Add cover

* Test coverage

* Json lint

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests

* Fix features

* Update snapshot from fixture

* Apply suggestions from code review

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-24 12:09:23 +02:00
epenet d4df86da06
Move TibberDataCoordinator to separate module (#118027) 2024-05-24 11:05:54 +02:00
Thomas55555 13385912d1
Refactor Husqvarna Automower (#117938) 2024-05-24 10:54:19 +02:00
Pete Sage 1ad2e4951d
Fix Sonos album artwork performance (#116391) 2024-05-24 10:42:45 +02:00
mkmer 5c263b039e
Catch client connection error in Honeywell (#117502)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-24 10:40:30 +02:00
epenet bb0b01e4a9
Add error message to snapshot_platform helper (#117974) 2024-05-24 10:38:23 +02:00
epenet 39f618d5e5
Add snapshot tests to nuki (#117973) 2024-05-24 10:36:59 +02:00
Marc Mueller 905adb2431
Update codespell ignore list (#118018) 2024-05-24 10:24:34 +02:00
Erik Montnemery f896c7505b
Improve async_get_issue_tracker for custom integrations (#118016) 2024-05-24 09:55:05 +02:00
Evgeny 24d31924a0
Migrate OpenWeaterMap to new library (support API 3.0) (#116870)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-23 21:51:10 -10:00
epenet 5bca9d142c
Use snapshot in renault diagnostics tests (#118021) 2024-05-24 09:42:33 +02:00
epenet 19aaa8ccee
Move plaato coordinator to separate module (#118019) 2024-05-24 09:42:12 +02:00
Franck Nijhof 9224997411
Add sequence action for automations & scripts (#117690)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-24 09:34:49 +02:00
epenet edd14929e3
Add snapshot tests to plaato (#118017) 2024-05-24 09:23:09 +02:00
Brett Adams 96d9342f13
Add models to energy sites in Teslemetry (#117419)
* Add models to energy sites and test devices

* Fix device testing

* Revert VIN

* Fix snapshot

* Fix snapshot

* fix snap

* Sort list
2024-05-24 09:18:22 +02:00
Shay Levy cb59eb183d
Switcher - use single_config_entry and register_discovery_flow in con… (#118000) 2024-05-24 09:15:17 +02:00
Brett Adams ad90ecef3f
Add binary sensor platform to Teslemetry (#117230)
* Add binary sensor platform

* Add tests

* Cleanup

* Add refresh test

* Fix runtime_data after rebase

* Remove streaming strings

* test error

* updated_once

* fix updated_once

* assert_entities_alt

* Update homeassistant/components/teslemetry/binary_sensor.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-24 08:55:27 +02:00
epenet 8da799e420
Move omnilogic coordinator to separate module (#118014) 2024-05-24 08:48:05 +02:00
Marc Mueller 301c484e05
Fix vallow test fixtures (#118003) 2024-05-24 08:31:21 +02:00
Thomas55555 528d67ee06
Remove unused snapshots [a-f] (#117999) 2024-05-24 08:28:04 +02:00
Brett Adams 3c7857f0f0
Add lock platform to Teslemetry (#117344)
* Add lock platform

* Tests and fixes

* Fix json

* Review Feedback

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* wording

* Fix rebase

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-24 08:26:29 +02:00
Marc Mueller dc47792ff2
Update codespell to 2.3.0 (#118001) 2024-05-24 08:22:29 +02:00
J. Nick Koston 93daac9b3d
Update pySwitchbot to 0.46.0 to fix lock key retrieval (#118005)
* Update pySwitchbot to 0.46.0 to fix lock key retrieval

needs https://github.com/Danielhiversen/pySwitchbot/pull/236

* bump

* fixes
2024-05-23 23:59:44 -04:00
Paulus Schoutsen d1af40f1eb
Google gen updates (#117893)
* Add a recommended model for Google Gen AI

* Add recommended settings to Google Gen AI

* Revert no API msg

* Use correct default settings

* Make sure options are cleared when using recommended

* Update snapshots

* address comments
2024-05-23 17:16:48 -04:00
Shay Levy c0bcf00bf8
Remove Switcher YAML import support (#117994) 2024-05-23 21:12:19 +02:00
epenet 4ee1460eec
Move moehlenhoff_alpha2 coordinator to separate module (#117970) 2024-05-23 21:06:00 +02:00
epenet 34deac1a61
Add snapshot tests to omnilogic (#117986) 2024-05-23 21:04:31 +02:00
Shay Levy 36d77414c6
Enable Switcher assume buttons for all devices (#117993) 2024-05-23 20:29:49 +02:00
Allen Porter 978fe2d7b0
Bump to google-nest-sdm to 4.0.4 (#117982) 2024-05-23 20:27:48 +02:00
J. Nick Koston c5cc9801a6
Cache serialize of manifest for loaded integrations (#117965)
* Cache serialize of manifest for loaded integrations

The manifest/list and manifest/get websocket apis
are called frequently when moving around in the UI.
Since the manifest does not change we can make
the the serialized version a cached property

* reduce

* reduce
2024-05-23 10:52:05 -04:00
epenet 162f5ccbde
Add snapshot platform tests to rainmachine (#117978)
* Add snapshot tests to rainmachine

* Add sensor and switch tests
2024-05-23 16:29:39 +02:00
epenet 0c243d699c
Use SnapshotAssertion in rainmachine diagnostic tests (#117979)
* Use SnapshotAssertion in rainmachine diagnostic tests

* Force entry_id

* Adjust

* Fix incorrect fixtures

* Adjust
2024-05-23 16:22:31 +02:00
Brett Adams 880b315890
Add switch platform to Teslemetry (#117482)
* Add switch platform

* Add tests

* Add test

* Fixes

* ruff

* Rename to storm watch

* Remove valet

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* ruff

* Review feedback

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-23 14:28:18 +02:00
epenet bc51a4c524
Add snapshot tests to moehlenhoff_alpha2 (#117967)
* Add tests to moehlenhoff_alpha2

* Adjust coverage

* Adjust coverage

* Adjust coverage

* Adjust patch

* Adjust
2024-05-23 11:54:20 +02:00
dontinelli 6682244abf
Improve fyta tests (#117661)
* Add test for init

* update tests

* split common.py into const.py and __init__.py

* Update tests/components/fyta/__init__.py

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

* add autospec, tidy up

* adjust len-test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-23 10:51:30 +02:00
Joost Lekkerkerker e8f544d216
Bump airgradient to 0.4.1 (#117963) 2024-05-23 10:25:54 +02:00
kaareseras cd14d9b0e3
Add Azure data explorer (#68992)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-23 09:14:09 +02:00
Galorhallen 767d971c5f
Better handling of EADDRINUSE for Govee light (#117943) 2024-05-23 08:45:49 +02:00
Jan-Philipp Benecke 88257c9c42
Allow to reconfigure integrations with `single_config_entry` set (#117939) 2024-05-23 08:41:12 +02:00
J. Nick Koston e663d4f602
Refactor state_reported listener setup to avoid merge in async_fire_internal (#117953)
* Refactor state_reported listener setup to avoid merge in async_fire_internal

Instead of merging the listeners in async_fire_internal, setup the listener for
state_changed at the same time so async_fire_internal can avoid having to copy
another list

* Refactor state_reported listener setup to avoid merge in async_fire_internal

Instead of merging the listeners in async_fire_internal, setup the listener for
state_changed at the same time so async_fire_internal can avoid having to copy
another list

* tweak

* tweak

* tweak

* tweak

* tweak
2024-05-22 23:14:50 -04:00
Paulus Schoutsen 1f7245ecf2
Update LLM no tools message (#117935) 2024-05-22 21:17:03 -04:00
Jan Bouwhuis 050fc73056
Refactor shared mqtt schema's to new module (#117944)
* Refactor mqtt schema's to new module

* Remove unrelated change
2024-05-23 01:12:25 +02:00
Mischa Siekmann ad69a23fda
Send MEDIA_ANNOUNCE flag to ESPHome media_player (#116993) 2024-05-23 09:47:34 +12:00
Peter eb76386c68
Prevent time pattern reschedule if cancelled during job execution (#117879)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-22 10:36:03 -10:00
Allen Porter 7a6b107248
Move nest diagnostic tests to use snapshots (#117929) 2024-05-22 14:11:07 -04:00
puddly 55c8ef1c7b
Simplify SkyConnect setup flow (#117868)
* Delay firmware probing until after the user picks the firmware type

* Remove confirmation step

* Fix unit tests

* Simplify unit test patching logic

Further simplify unit tests

* Bump Zigbee firmware up to the first choice

* Reuse `async_step_pick_firmware` during options flow

* Proactively validate all ZHA entries, not just the first
There can only be one (for now) so this changes nothing functionally

* Add unit test for bad firmware when configuring Thread
2024-05-22 14:09:30 -04:00
Michael Hansen f99ec87338
Fail if targeting all devices in the house in service intent handler (#117930)
* Fail if targeting all devices in the house

* Update homeassistant/helpers/intent.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-22 13:53:31 -04:00
Thomas55555 eeeb5b2725
Add switch for stay out zones in Husqvarna Automower (#117809)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-22 18:51:21 +02:00
tronikos e4130480c3
Google Generative AI: Handle response with empty parts in generate_content (#117908)
Handle response with empty parts in generate_content
2024-05-22 07:47:16 -07:00
G Johansson d1bdf73bc5
Add clear night to smhi (#115998) 2024-05-22 16:03:48 +02:00
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
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
epenet 2c6071820e
Move vizio coordinator to separate module (#117498) 2024-05-15 21:00:21 +02:00
Marlon 3604a34823
Post review comments on APsystems (#117504)
* Cleanup for apsystems and fix for strings

* Migrate to typed ConfigEntry Data for apsystems

* Improve strings for apsystems

* Improve config flow tests for apsystems by cleaning up fixtures

* Do not use Dataclass for Config Entry Typing

* Improve translations for apsystems by using sentence case and removing an apostrophe

* Rename test fixture and remove unnecessary comment in tests from apsystems

* Remove default override with default in coordinator from apsystems
2024-05-15 19:56:12 +02:00
Brett Adams 4125b6e15f
Add select platform to Teslemetry (#117422)
* Add select platform

* Add tests

* Tests WIP

* Add tests

* Update homeassistant/components/teslemetry/select.py

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

* Update homeassistant/components/teslemetry/select.py

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

* use references

* Fix typo

* Update homeassistant/components/teslemetry/select.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update homeassistant/components/teslemetry/select.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Make less confusing for @joostlek

* Update homeassistant/components/teslemetry/select.py

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

* Update homeassistant/components/teslemetry/select.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-15 18:17:28 +02:00
Åke Strandberg c4c96be880
Add alarm and connectivity binary_sensors to myuplink (#111643)
* Add alarm and connectivity binary_sensors

* Get is_on for correct system

* Make coverage 100% in binary_sensor

* Address review comments

* Revert dict comprehension for now
2024-05-15 17:13:56 +02:00
Dennis Lee 4d34350f66
Add Jellyfin audio_codec optionflow (#113036)
* Fix #92419; Add Jellyfin audio_codec optionflow

* Use CONF_AUDIO_CODEC constant, clean up code based on suggestions

* Fixed typos

* Parameterize Tests

* Use parameterized test for jellyfin test media resolve

* Apply suggestions from code review

* Update homeassistant/components/jellyfin/config_flow.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-15 16:11:11 +02:00
Marcel van der Veldt 5af8041c57
Fix ghost events for Hue remotes (#113047)
* Use report values for events

* adjust tests
2024-05-15 15:48:15 +02:00
epenet 4e600b7b19
Move venstar coordinator to separate module (#117500) 2024-05-15 15:18:26 +02:00
amura11 2a9d29c5f5
Fix Fully Kiosk set config service (#112840)
* Fixed a bug that prevented setting Fully Kiosk config values using a template

* Added test to cover change

* Fixed issue identified by Ruff

* Update services.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-15 15:01:55 +02:00
Erik Montnemery 6ecc0ec3a1
Fix API creation for passwordless pi_hole (#117494) 2024-05-15 13:39:07 +02:00
starkillerOG e286621f93
Reolink fix not unregistering webhook during ReAuth (#117490) 2024-05-15 12:04:12 +02:00
epenet 6c892b227b
Rename mikrotik coordinator module (#117488) 2024-05-15 12:02:33 +02:00