Compare commits

..

264 Commits

Author SHA1 Message Date
Erik 8419e6429a Fix 2025-02-19 19:24:24 +01:00
Erik bbe804cef3 Add WS command homeassistant/expose_entity/list_exposed 2025-02-19 19:24:23 +01:00
Erik Montnemery 81c909e8ce Revert "Add assistant filter to expose entities list command" (#138867)
Revert "Add assistant filter to expose entities list command (#138817)"

This reverts commit a6bb5dbe2a.
2025-02-19 18:13:36 +01:00
Pete Sage 85f44fa008 Update play_media parameter description in Media Player (#138855) 2025-02-19 16:43:13 +00:00
Markus Adrario fb3b23aef3 Homee switch platform (#137457) 2025-02-19 15:55:16 +00:00
Erik Montnemery b70c5710a9 Correct invalid automatic backup settings when loading from store (#138716)
* Correct invalid automatic backup settings when loading from store

* Improve docstring

* Improve tests
2025-02-19 16:24:30 +01:00
Sid 600bfed704 Refactor eheimdigital setup_device_entities (#138837) 2025-02-19 07:54:25 -06:00
Erik Montnemery af0a862aab Clean up translations for mocked integrations inbetween tests (#138732)
* Clean up translations for mocked integrations inbetween tests

* Adjust code, add test

* Fix docstring

* Improve cleanup, add test

* Fix test
2025-02-19 13:49:31 +01:00
starkillerOG 1733f5d3fb Fix playback for encrypted Reolink files (#138852) 2025-02-19 13:42:53 +01:00
Robert Resch 97c558b694 Add WIND_DIRECTION to SensorDeviceClass and NumberDeviceClass (#138714)
* Add WIND_DIRECTION to SensorDeviceClass

* Add WIND_DIRECTION to NumberDeviceClass

* Fix tests
2025-02-19 12:24:22 +01:00
proohit d655c51ef9 Adds Tado Child Lock support (#135837) 2025-02-19 11:24:04 +00:00
Joakim Sørensen 618bdba4d3 Add check_connection parameter to cloud login methods and handle AlreadyConnectedError (#138699) 2025-02-19 11:19:03 +01:00
LG-ThinQ-Integration 38efe94def Modify string water_heater's off state (#137627)
* Modify string water_heater's off state

* Modify washer's delay name

---------

Co-authored-by: yunseon.park <yunseon.park@lge.com>
2025-02-19 11:00:25 +01:00
Matthias Alphart 0c28b69269 Update xknx to 3.6.0 (#138838) 2025-02-19 10:38:52 +01:00
Jonas Fors Lellky 36c7546e26 Remove unused code in the climate entity of the flexit_bacnet integration (#138840)
Removes unused code in the climate entity

This was unintentionally left in the code when adding a coordinator
2025-02-19 10:26:16 +01:00
Michael Arthur 8d39f298c0 Electric Kiwi: Parallel updates (#138839)
* parallel updates

* Update homeassistant/components/electric_kiwi/select.py
2025-02-19 10:16:06 +01:00
Christopher Fenner 68085ed4f9 Add sensors for pellets boiler in ViCare integration (#138563)
* add buffer sensors

* remove duplicate sensor

* add labels

* Bump PyViCare to 2.43.0

* add fuel need sensor
2025-02-19 09:44:12 +01:00
J. Nick Koston d97194303a Improve performance of calculating state (#138832)
```
print(timeit.timeit("x.update(y)", setup=x={a:b}
2025-02-19 09:43:41 +01:00
Jonas Fors Lellky b6cb2bfe5b Add test for flexit_bacnet hvac mode (#138748)
Add test for hvac mode
2025-02-19 09:15:07 +01:00
Michael Arthur c5222708ed add icon to select (#138834) 2025-02-19 09:05:29 +01:00
Michael Arthur 6cf31e0807 Electric Kiwi: Add quality scale (#138680)
* add quality scale file

* Apply suggestions from code review

Co-authored-by: Josef Zweck <josef@zweck.dev>

* add suggestions and add extra missing icon

* update a few based on documentation

* exempt installation parameters

* set a few more documentation items to done

* Update homeassistant/components/electric_kiwi/quality_scale.yaml

Co-authored-by: Josef Zweck <josef@zweck.dev>

* update reason for no installation parameters

* set docs installation parameters to done

* revert back to exempt

* add bronze scale

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-02-19 08:43:45 +01:00
HA-Roberto ff83a14570 Add button for bond light temp toggle feature (#135379)
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-02-19 00:48:29 -06:00
J. Nick Koston 46599a4ac4 Bump habluetooth to 3.22.0 (#138812) 2025-02-18 23:50:11 -06:00
Jan Bouwhuis 689421eddf Move blocking code to executor job in MQTT CI test helper (#138815) 2025-02-19 06:14:07 +01:00
J. Nick Koston ee5e25aca6 Bump aioesphomeapi to 29.1.1 (#138827) 2025-02-18 21:14:38 -06:00
Michael Hansen a6bb5dbe2a Add assistant filter to expose entities list command (#138817) 2025-02-18 20:39:44 -05:00
skobow f8ffbf0506 Set clean_start=True on connect to MQTT broker (#136026)
* Addresses #135443: Set  on connect.

* Make clean start implementation compatible with v2 API

* Add tests

* Do not pass default value for `clean_start` on_connect

* Revert "Do not pass default value for `clean_start` on_connect"

This reverts commit 75806736cf511a6d6b6496454843de34f05f7758.

* Use partial top pass kwargs to mqtt client connect

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: jbouwh <jan@jbsoft.nl>
2025-02-18 23:11:21 +01:00
Andrew Sayre 6613b46071 Add HEOS group volume down/up actions (#138801)
Add group volume down/up actions
2025-02-18 15:53:59 -06:00
Christopher Fenner 1579e90d58 Fix typos in strings.json files (#138601)
* fix codespell issues

* update nextcloud snapshots

* update weheat snapshots

* update waqi snapshots
2025-02-18 22:36:28 +01:00
Franck Nijhof b71d5737a5 Update Home Assistant base image to 2025.02.1 (#138746)
* Update Home Assistant base image to 2025.02.1

* Require Python 3.13.2 now
2025-02-18 22:34:08 +01:00
J. Diego Rodríguez Royo 8e887f550e Add connectivity binary sensor to Home Connect (#138795)
Add connectivity binary sensor
2025-02-18 22:08:40 +01:00
J. Diego Rodríguez Royo 1af8b69dd6 Set Home Connect beverages counters as diagnostics (#138798)
Set beverages counters as diagnostics
2025-02-18 22:03:35 +01:00
J. Diego Rodríguez Royo 6ef401251c Add Home Connect entities that weren't added before (#138796)
Added entities that weren't added before
2025-02-18 22:01:13 +01:00
J. Diego Rodríguez Royo 141bcae793 Add Home Connect to .strict-typing (#138799)
* Add Home Connect to .strict-typing

* Fix mypy errors
2025-02-18 21:50:19 +01:00
J. Nick Koston 8ae52cdc4c Fix shelly not being able to be setup from user flow when already discovered (#138807)
raise_on_progress=False was missing in the user flow which
made it impossible to configure a shelly by IP when there
was an active discovery because the flow would abort
2025-02-18 22:05:05 +02:00
Robert Resch 13fe2a9929 Reorder Dockerfile to improve caching (#138789) 2025-02-18 20:31:41 +01:00
Robert Resch df50863872 Bump uv to 0.6.1 (#138790) 2025-02-18 20:28:41 +01:00
SLaks 82ac3e3fdf Ecobee: Report Humidifier Action (#138756)
Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-02-18 20:11:37 +01:00
Maciej Bieniek c48797804d Add _shelly._tcp to Shelly zeroconf configuration (#138782)
Add _shelly._tcp to zeroconf
2025-02-18 19:57:10 +01:00
Matrix e6217efcd6 Add switch flex button support. (#137524) 2025-02-18 19:23:27 +01:00
Parker Brown 8dd1e9d101 Add threshold sensor to Aranet (#137291)
* Add threshold level sensor description to Aranet component

* Use Color enum for status options

* Add threshold level sensor tests for Aranet components

* Rename `threshold_level` key to `status`

* Update test to expect 7 sensors instead of 6

* Map sensor status to more human-friendly strings

* Rename `threshold_level` key to `concentration_status`

* Update docstring for  function

* Simplify `get_friendly_status()`

* Rename `concentration_status` to `concentration_level`

* Rename `concentration_status` to `concentration_level` in sensor tests

* Refactor concentration level handling and tests

* Normalize concentration level status values to lowercase

* Add error to translations

* Don't scale status string

* Apply suggestions from code review

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

* Rename `concentration_level` to `threshold_indication`

* Update threshold indication translations

* `threshold_indication` → `threshold`

* Capitalize sensor name

Co-Authored-By: Shay Levy <levyshay1@gmail.com>

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2025-02-18 20:16:50 +02:00
Renat Sibgatulin 096468baa4 airq: add more verbose debug logging (#138192) 2025-02-18 19:03:47 +01:00
Andrew Sayre 3659fa4c4e Add HEOS entity service to set group volume level (#136885) 2025-02-18 11:56:50 -06:00
peteS-UK d1f0e0a70f Add support for announce to Squeezebox media player (#129460)
* initial

* Add support for announce: true to media player

* Move play_announcement to _player

* update snapshot

* conftest update

* remove conftest update

* Update conftest.py

* Test Updates

* Updates post moving functions to library

* test fixes

* Review updates

* Snapshot update

* rebase updates

* Merge updates

* Review updates

* Review updates
2025-02-18 11:22:19 -06:00
Norbert Rittel a45fb57595 Fix grammar in evohome.reset_system action, consistently add "mode" (#138777)
* Fix grammar in evohome.reset_system action, consistently add "mode"

- fix the grammar with "Sets … and resets …"
- add "mode" to all mode names for consistency

* Revert, removing one excessive "mode"
2025-02-18 08:43:51 -06:00
Pete Sage e9fcef1b57 Fix TV input source option for Sonos Arc Ultra (#138778)
initial commit
2025-02-18 08:43:00 -06:00
Petar Petrov a003f89a5e Fix Z-WaveJS inclusion in the background (#138717)
* Fix Z-WaveJS inclusion in the background

* improve async handling

* just return the `requested_grant` to the driver

* handle controller busy state
2025-02-18 15:17:13 +01:00
Erik Montnemery 22c634e626 Don't allow setting backup retention to 0 days or copies (#138771)
* Don't allow setting backup retention to 0 days or copies

* Add tests
2025-02-18 15:16:44 +01:00
Niv Steingarten 46c604fcbe Bump pyrympro from 0.0.8 to 0.0.9 (#138753) 2025-02-18 14:23:25 +01:00
Norbert Rittel 94d3b3919d Make spelling of "BSB-Lan" consistent (#138766) 2025-02-18 13:58:29 +02:00
Norbert Rittel 350b935fa7 Fixing casing mistakes in user-facing strings of renault (#138729)
- use sentence-casing for strings
- use uppercase for "ID"
2025-02-18 12:06:10 +01:00
J. Nick Koston e660096801 Bump zeroconf to 0.145.1 (#138763) 2025-02-18 10:38:48 +00:00
starkillerOG f5e1fa6a21 Allow playback of h265 encoded Reolink video (#138667) 2025-02-18 11:17:13 +01:00
Brett Adams 800cdee409 Update Diagnostics in Teslemetry (#138759)
* Testing

* Diag
2025-02-18 09:44:29 +01:00
Jan Bouwhuis 33df208296 Fix temp files of mqtt CI tests not cleaned up properly (#138741)
* Fix temp files of mqtt CI tests not cleaned up properly

* Do not cleanup tempfiles, patch gettempdir only
2025-02-18 08:38:43 +01:00
J. Nick Koston 0dc1151a25 Bump aioesphomeapi to 29.1.0 (#138742) 2025-02-17 17:08:38 -06:00
Christopher Fenner 25865b4849 Bump PyViCare to 2.43.1 (#138737)
bump PyViCare to 2.43.1
2025-02-18 00:28:49 +02:00
Norbert Rittel 5658f9ca40 Fix wrong description of teslemetry.set_scheduled_charging action (#138723)
The action allows the user to set a time at which to start charging, but the action's description uses the wrong word "completed".
2025-02-17 23:28:45 +02:00
Jonas Fors Lellky f9047d0223 Mark action-exceptions as exempt for flexit_bacnet (#138739)
* Mark action-exceptions as exempt for flexit_bacnet

* Update homeassistant/components/flexit_bacnet/quality_scale.yaml

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-02-17 21:15:37 +01:00
Jonas Fors Lellky bbfb9fbdae Mark reauthentication-flow as exempt for flexit_bacnet (#138740) 2025-02-17 21:10:18 +01:00
Norbert Rittel 772e7147bd Fix user-facing strings of the NWS integration (#138727)
- fix sentence-casing of "API key" to match common string
- remove excessive trailing period from action name
- reword action description to match HA style
- make "Forecast type" description UI-friendly (a selector is available)
2025-02-17 21:51:30 +02:00
Xitee 9ac60f1c7f Fix small typo in qbittorrent strings.json (#138734) 2025-02-17 20:37:33 +01:00
Sid 3b6e3fe457 Fix race condition on eheimdigital coordinator setup (#138580) 2025-02-17 20:10:56 +01:00
Andrew Sayre da9fbf21df Update HEOS repair issues quality scale item (#138724) 2025-02-17 20:04:39 +01:00
Norbert Rittel d7e796e9f9 Fix typos in qBittorrent exceptions strings (#138728) 2025-02-17 17:37:46 +00:00
Erik Montnemery e0795e6d07 Improve config entry state transitions when unloading and removing entries (#138522)
* Improve config entry state transitions when unloading and removing entries

* Update integrations which check for a single loaded entry

* Update tests checking state after unload fails

* Update homeassistant/config_entries.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-17 18:16:57 +01:00
Joost Lekkerkerker ff16e587e8 Bump airgradient to 0.9.2 (#138725)
* Bump airgradient to 0.9.2

* Bump airgradient to 0.9.2
2025-02-17 18:45:26 +02:00
LG-ThinQ-Integration 04b826daa1 Add sensors for washer and system boiler in LG ThinQ (#137514)
Co-authored-by: yunseon.park <yunseon.park@lge.com>
2025-02-17 16:30:41 +00:00
Abílio Costa 25296e1b8f Move ZHA debug logs handling out of event loop (#138568) 2025-02-17 11:12:55 -05:00
Daniel O'Connor 67fcbc4c28 Add LV-RH131S-WM Air Purifier (#138626)
* Add LV-RH131S-WM Air Purifier

Fix 138486

* Update homeassistant/components/vesync/const.py
2025-02-17 16:29:28 +01:00
Andrew Sayre 34a33e0465 Create HEOS devices after integration setup (#138721)
* Create entities for new players

* Fix docstring typo
2025-02-17 09:28:55 -06:00
Jonas Fors Lellky 82f2e72327 Add translations for exceptions (#138669)
* Add translations for exceptions

* Review comment

* Add translation for exception in the coordinator

* Use same translation string for switch exceptions
2025-02-17 16:18:46 +01:00
Abílio Costa 9422c4de65 Fix snapshots timezone in Cloud tests (#138393)
* Fix snapshots timezone in Cloud tests

* Add explanation comment
2025-02-17 16:01:03 +01:00
Erik Montnemery 4cdc3de94a Correct backup filename on delete or download of cloud backup (#138704)
* Correct backup filename on delete or download of cloud backup

* Improve tests

* Address review comments
2025-02-17 08:38:28 -06:00
Marc Mueller 51aea58c7a Update mypy-dev to 1.16.0a3 (#138655) 2025-02-17 14:46:33 +01:00
epenet 7e388f69b0 Add common entity module to pylint plugin (#138706)
* Add common entity module to pylint plugin

* Fix pylint errors
2025-02-17 14:45:32 +01:00
epenet d8d054e7dd Improve type hints in base entities (#138708) 2025-02-17 14:45:00 +01:00
Norbert Rittel 4a385ed26c Use correct camel-case for OpenThread, reword error message (#138651)
* Use correct camel-case for OpenThread, reword error message

* Treat "Border Agent ID" as a name by capitalizing it
2025-02-17 13:38:42 +01:00
Michael df6cb0b824 Add repair-issue that backup location setup is missing in Synology DSM (#138233)
* add missing backup location setup repair-issue

* add tests

* tweak translation strings

* add test for other fixable issues

* remove senseless abort reason no_file_station
2025-02-17 13:03:31 +01:00
ashionky a7f63e3847 Optimize Refoss state_class of Sensor (#138266)
TOTAL_INCREASING
2025-02-17 13:02:52 +01:00
Robert Resch b4fac38d8a Bump uv to 0.6.0 (#138707) 2025-02-17 12:42:02 +01:00
Matrix 168e45b0f9 Bump yolink api 0.4.8 (#138703) 2025-02-17 12:24:56 +01:00
Norbert Rittel 1fe644d056 Fix casing in Sensibo action descriptions (#138701)
- treat "Pure Boost" as a feature name
- fix sentence-casing
- capitalize first word
2025-02-17 11:05:39 +01:00
Alberto Geniola cd13eff8ae Elmax - fix issue 136877 (#138419)
* Fix IPv6 zero-conf discovery not handling hostname correctly.

* Aligned tests.

* Remove redundant !s notation.

* Add IPv6 discovery tests

* Parametrize input_uri to avoid duplicated code

* Update tests/components/elmax/conftest.py

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-02-17 10:01:27 +01:00
Norbert Rittel e77193fa2e Improve 17track action descriptions by using those from the online docs (#138698)
* Improve 17Track action descriptions using those from the online docs

Also change them to third-person singular to match the descriptive style that Home Assistant prefers.

* Add missing period on 2nd description
2025-02-17 09:08:40 +01:00
Dan Raper 66d16336ea Add preconditioning number entity to Ohme (#138346)
* Add preconditioning number entity

* Updated test snapshots for ohme

* Update test snapshots
2025-02-17 09:07:18 +01:00
Norbert Rittel ed3ca76696 Update foscam action descriptions to match HA style (#138664)
Update foscam action description to match HA style
2025-02-17 09:03:28 +01:00
Jonas Fors Lellky f2126a357a Comply with parallel updates quality rule (#138672) 2025-02-17 08:58:21 +01:00
Andrew Sayre 89956adf2e Allow removal of stale HEOS devices (#138677)
Allow device removal
2025-02-17 08:47:11 +01:00
Paulus Schoutsen c357b3ae65 Move some setups during onboarding to background (#138558)
* Move some setups during onboarding to background

* Update homeassistant/components/onboarding/views.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-16 23:06:28 -05:00
cdnninja 6b90e7b2c2 Bump pyvesync for vesync (#138681)
* bump pyvesync

* fix tests

* Test fix
2025-02-16 21:33:48 -06:00
fwestenberg 56b51227bb Bump stookwijzer==1.5.4 (#138678) 2025-02-16 19:19:03 -06:00
Markus Lanthaler 93f1597e6d Add latest Nighthawk WiFi 7 routers to V2 models (#138675) 2025-02-16 22:03:57 +01:00
peteS-UK bdeb24cb61 Add OptionsFlow to Squeezebox to allow setting Browse Limit and Volume Step (#129578)
* Initial

* prettier strings

* Updates

* remove error strings

* prettier again

* Update strings.json

vscode prettier fails check

* update test to remove invalid value

* Remove config_entry __init__

* remove param

* Review updates

* ruff fixes

* Review changes

* Shorten options flow ui string

* Review changes

* Remove errant mock attib

---------

Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2025-02-16 15:02:29 -06:00
Shai Ungar 09df6c8706 Rename "returned" state to "alert" (#138676)
Rename "returned" state to "alert" in icons, services, and strings files
2025-02-16 22:33:32 +02:00
Martin Hjelmare 0b7ec96448 Improve remember the milk storage (#138618) 2025-02-16 21:17:26 +01:00
Michael ccd0e27e84 Allow renaming of backup files in Synology DSM (#138652)
* get backup base file name from meta file

* use BackupNotFound
2025-02-16 20:00:17 +01:00
Keilin Bickar e0b50ee1e2 Bump sense_energy to 0.13.5 (#138659) 2025-02-16 10:04:45 -08:00
Jonas Fors Lellky 7063636db6 Add quality scale bronze for flexit_bacnet (#138309)
* Add quality scale bronze for flexit_bacnet

* Add new line at end of file

* Remove flexit_bacnet from list of integrations without quality scale

* Add missing translation strings

* Fix review comments

* Remove flexit_bacnet from list of integrations without quality scale

* Review comment

Co-authored-by: Josef Zweck <josef@zweck.dev>

* Review comment

Co-authored-by: Josef Zweck <josef@zweck.dev>

* Add the complete list of quality scale rules

* Fix lint error

* Use correct formatting for todos

* Fix lint error

* Set all rules above bronze to todo

* Update status for rules that are done

* Update homeassistant/components/flexit_bacnet/quality_scale.yaml

* Update homeassistant/components/flexit_bacnet/quality_scale.yaml

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-02-16 17:06:09 +01:00
Michael f67fb9985e Allow wifi switches for mesh repeaters in AVM Fritz!Box Tools (#135456)
* create wifi switches for mesh slaves, but disable them by default

* check if mesh isbased on wifi uplink

* fix
2025-02-16 15:12:16 +01:00
Jonas Fors Lellky 2d5e920de0 Flexit bacnet/quality preparations (#138514)
Add data_description for config flow
2025-02-16 14:55:05 +01:00
Norbert Rittel 9e15a33c42 Fix sentence-casing and capitalization of "Zigbee" in smlight (#138647) 2025-02-16 15:46:08 +02:00
Norbert Rittel e767863ea4 Replace opentherm_gw action key name with friendly name for UI (#138634) 2025-02-16 13:17:47 +01:00
Luca Bensi 7f3270e982 Bump pysmarty2 to 0.10.2 (#138625) 2025-02-16 14:09:15 +02:00
Josef Zweck 95b1cf465b Use gibibytes for onedrive (#138637)
* Use gibibytes for onedrive

* also to strings
2025-02-16 14:08:01 +02:00
Norbert Rittel 3ce8e1683a Fix sentence-casing in ZHA integration, capitalize names (#138636)
* Fix sentence-casing in ZHA integration, capitalize names

* Reorder title and description keys

* Remove wrong trailing commas

* Restore accidental deletion

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2025-02-16 12:17:21 +01:00
Teynar 21032ea7cd Add missing unit for Withings snore sensor (#138517) 2025-02-16 10:21:34 +01:00
J. Diego Rodríguez Royo c75707ec79 Use correct inputs for relative time and duration options (#138619) 2025-02-16 00:29:38 +01:00
Norbert Rittel 9573f7828b Update action description in ecovacs integration to match HA style (#138548) 2025-02-15 21:52:41 +01:00
IceBotYT d435f7be09 Update integrations screenshot in README (#138555) 2025-02-15 21:50:52 +01:00
Norbert Rittel a3eb73cfcc Replace alarm action descriptions with wording from online docs (#138608) 2025-02-15 21:46:00 +01:00
Josef Zweck fdaa640c8e Add issues for data cap to onedrive (#138411)
* Add issues for data cap to onedrive

* brackets

* Fix double space

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>

---------

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2025-02-15 21:44:59 +01:00
Bouwe Westerdijk 6059446ae3 Bump plugwise to v1.7.2 (#138613) 2025-02-15 21:39:06 +01:00
CodingSquirrel 827865a1b9 Bump pyeconet to 0.1.28 (#138610) 2025-02-15 21:36:54 +01:00
Nathan Spencer 0a78f2725d Add switch to toggle filter cycle 2 on balboa spas (#138605) 2025-02-15 20:20:33 +01:00
Erik Montnemery 78337a6846 Disable zwave_js testing resetting the controller (#138595)
* Improve zwave_js test of resetting the controller

* Disable the test
2025-02-15 20:16:07 +01:00
J. Diego Rodríguez Royo 78c4d815ce Fix home connect coffe-milk ratio option (#138593)
* Fix home connect milk ratio option

* Use enumeration instead of number selector for coffee-milk ratio
2025-02-15 20:10:27 +01:00
Duco Sebel 482df7408a Provide part of uuid when requesting token for HomeWizard v2 API (#138586) 2025-02-15 16:29:09 +01:00
Markus Jacobsen 05696b5528 Add Event entity states to diagnostics for Bang & Olufsen (#135859)
Add diagnostics for event buttons
2025-02-15 09:28:10 -06:00
Brett Adams c89d8edb3c Remove dynamic rate limits from Tesla Fleet (#138576)
* remove

* TEsts
2025-02-15 16:27:29 +01:00
Christopher Fenner 08f6e9cd12 Bump PyViCare to 2.43.0 (#138564)
* Bump PyViCare to 2.42.1

* Bump PyViCare to 2.43.0
2025-02-15 16:24:43 +01:00
Nathan Spencer cbb0dee911 Bump pybalboa to 1.1.3 (#138557) 2025-02-15 16:22:04 +01:00
Brett Adams 798d2326ed Bump tesla-fleet-api to v0.9.10 (#138575)
bump
2025-02-15 16:20:51 +01:00
Khole 91ba9b2239 Bump pyhive-integration to 1.0.2 (#138569) 2025-02-15 14:13:16 +01:00
J. Diego Rodríguez Royo 7a23348b1d Fix and improve Home Connect strings (#138583)
* Fix `hot_water_temperature` strings for tea options

* Improve `deprecated_program_switch` issue description

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* Improve option descriptions strings

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>

---------

Co-authored-by: Norbert Rittel <norbert@rittel.de>
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2025-02-15 11:29:40 +01:00
Michael Hansen 30a6a6ad4b Use language util to match intent language (#138560) 2025-02-14 20:51:53 -05:00
J. Nick Koston 4a4c2ff552 Bump zeroconf to 0.144.3 (#138553) 2025-02-14 16:17:35 -08:00
Michael Hansen e16343ed72 Prevent voice wizard from crashing for wyoming/voip (#138547)
* Prevent voice wizard from crashing for wyoming/voip

* Use stub configuration in websocket API
2025-02-14 15:41:45 -06:00
J. Nick Koston 28dd44504e Bump aioesphomeapi to 29.0.2 (#138549)
changelog: https://github.com/esphome/aioesphomeapi/compare/v29.0.0...v29.0.2
2025-02-14 22:42:36 +02:00
Nathan Spencer b916fbe1fc Add time entity to balboa (#138248) 2025-02-14 20:50:51 +01:00
Xitee 58797a14e7 Add 6 new sensors to qBittorrent integration (#138446)
Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-02-14 20:48:19 +01:00
Joris Pelgröm c090fbfbad Add binary sensor platform to LetPot integration (#138554) 2025-02-14 20:21:30 +01:00
J. Diego Rodríguez Royo 2bfe96dded Add Home Connect action with recognized programs and options (#130662)
* Added recognized options to Home Connect actions

* Fix ruff

* Fix strings.json

* Fix dishwasher typo

* Improved test_bsh_key_transformations

* Add missing return types

* Added descriptions

* Remove custom options

* Fixes

* Merge the 4 services (select, start, set options for active or selected program)

And deprecate the original ones

* Delete stale snapshots

* Clean up logic after service validation

* Make deprecated actions issues fixable

And delete issue on entry unload

* Fixes and improvements

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improvements

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix name and descriptions

* Add `affects_to` to strings and service.yaml

* Add missing periods at strings

* Fix

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* Add tests to check if the flow removes the deprecated action issue

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Norbert Rittel <norbert@rittel.de>
2025-02-14 20:21:01 +01:00
IceBotYT d99044572a Improved auth failure handling in Nice G.O. (#136607) 2025-02-14 20:03:21 +01:00
Manu 11aa08cf74 Set quality scale to platinum 🏆️ for Habitica integration (#136076) 2025-02-14 19:56:32 +01:00
Norbert Rittel 5dc1689e7c Update action descriptions of weather integration (#138540) 2025-02-14 17:06:17 +00:00
J. Nick Koston 28ea55aac0 Bump aiohttp-asyncmdnsresolver to 0.1.1 (#138534) 2025-02-14 15:27:16 +00:00
Manu 7bd2c1d710 Refactor and add tests to image platform of Habitica (#135897) 2025-02-14 15:20:19 +00:00
Josh Gustafson 23d43b23ee Bump arcam-fmj to 1.8.0 (#138422)
* arcam_fmj: bump arcam-fmj to 1.8.0

* Revert castings

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2025-02-14 16:03:47 +01:00
Bram Kragten 7dd678ccdf Update frontend to 20250214.0 (#138521) 2025-02-14 14:12:49 +01:00
Joris Pelgröm 371490a470 Add sensor platform to LetPot integration (#138491)
* Add sensor platform to LetPot integration

* Handle support in description supported_fn, use common string

* Update homeassistant/components/letpot/switch.py

* Update homeassistant/components/letpot/sensor.py

* Update homeassistant/components/letpot/sensor.py

* Update homeassistant/components/letpot/strings.json

* Fix translation key in snapshot

* snapshot no quotes

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-02-14 13:57:27 +01:00
Norbert Rittel 48f58c7d49 Fix action descriptions in Xiaomi Miio integration (#138476)
* Fix action description in Xiaomi Miio integration

Correct several missing descriptions, wrong references to completely different actions, resulting duplicates and copy & paste errors.

Make the grammar more consistent across all strings.

Make one occurrence of "xiaomi miio" consistent by capitalizing.

* Apply suggestions from @CFenner review

Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>

* Change "on a light" to "of a light", remove wrong comma

* Change "turn off" to "turning off" according to OED

---------

Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2025-02-14 13:52:22 +01:00
RJPoelstra fae68c8ad5 Add icon translation to MotionMount integration (#138520)
* Add icon translation for error sensor

* Mark icon-translations as done
2025-02-14 13:47:36 +01:00
Michael fa4ebeb680 Bump py-synologydsm-api to 2.6.3 (#138516)
bump py-synologydsm-api to 2.6.3
2025-02-14 13:11:32 +01:00
Erik Montnemery efd7ddeb89 Improve tests of removing and unloading config entries (#138432)
* Improve tests of removing and unloading config entries

* Fix unnecessary coroutine
2025-02-14 13:06:07 +01:00
RJPoelstra f407dbd35c Disable less used entities by default in MotionMount integration (#138509)
* Mark sensors as disabled by default as most users won't need them

* Mark entity-disabled-by-default as done

* Enable disabled entities during tests
2025-02-14 12:46:41 +01:00
Manu 4d3a4015ed Update quality scale to platinum 🏆️ for Bring! integration (#138202)
* Update documentation status in bring quality_scale.yaml

* Update quality scale

* options flow exempt
2025-02-14 11:39:04 +01:00
RJPoelstra 9f9aeb4cce Add entity category to non primary entities for motionmount integration (#138436)
Add entity category to non primary entities
2025-02-14 11:10:08 +01:00
Norbert Rittel b9148d6368 Improve descriptions of snooz.transition_xx actions (#138403)
The current action descriptions of the snooz integration are easy to misunderstand and result in wrong translations.

This commit replaces them with the wording from the online docs, slightly adapted for the UI that already displays the units and ranges.
2025-02-14 10:37:56 +01:00
Shai Ungar d82dd9e7e6 Bump pyseventeentrack to 1.0.2 (#138506)
Bump pyseventeentrack version
2025-02-14 10:25:04 +01:00
Erik Montnemery 51beb21fe4 Bump hass-nabucasa from 0.91.0 to 0.92.0 (#138510) 2025-02-14 10:19:00 +01:00
Phill (pssc) 83f8a4454d squeezebox bump pysqueezebox to 0.12.0 (#138205)
* bump pysqueezebox to 0.12.0

* python3 -m script.gen_requirements_all
2025-02-14 10:14:44 +01:00
Christopher Fenner 6a4f5188b1 Bump PyViCare to 2.42.1 (#138494) 2025-02-14 02:30:53 +02:00
TheJulianJES 099adebcb6 Bump ZHA to 0.0.49 to fix Tuya TRV issues (#138492)
Bump ZHA to 0.0.49
2025-02-14 02:04:39 +02:00
Shay Levy 00e98954e4 Bump aiowebostv to 0.6.2 (#138488) 2025-02-14 01:52:33 +02:00
Michael 621bcccef7 Remove scan interval option from Synology DSM (#138490)
remove scan interval option
2025-02-13 22:51:14 +01:00
Jan Bouwhuis d6b7762dd6 Upgrade paho-mqtt API to v2 (#137613)
* Upgrade paho-mqtt API to v2

* Refactor on_connect callback

* Add tests

* Fix Tasmota tests
2025-02-13 22:13:19 +01:00
J. Nick Koston bbbad90ca2 Fix race configuring zeroconf (#138425) 2025-02-13 14:17:06 -06:00
tronikos ab2e075b41 Bump opower to 0.9.0 (#138433)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2025-02-13 21:35:58 +02:00
Norbert Rittel 2ea648f8ae Replace config.yaml with correct configuration.yaml in folder_watcher (#138434) 2025-02-13 20:55:04 +02:00
Pete Sage bf27eeb861 Add sonos_websocket to Sonos loggers (#138470) 2025-02-13 18:46:50 +00:00
Maghiel Dijksman d4c5479e50 Fix Tuya unsupported cameras (#136960) 2025-02-13 16:14:56 +00:00
RJPoelstra a03c588002 Mark entity-device-class as done for motionmount integration (#138459)
All entities where a device class is available have a device class
2025-02-13 16:54:29 +01:00
David Rapan 82074a8940 Starlink migration to StarlinkConfigEntry (#137896)
* refactor: Utilize custom StarlinkConfigEntry

* fix: ruff-format

* fix: Init tests

* fix: StarlinkConfigEntry in coordinator after recent PRs

* fix: CONF_IP_ADDRESS constant

* fix: After merge clean up

* fix: Naming conventions

* feat: Add runtime_data into init test

* refactor: Remove runtime_data assert in unload entry test
2025-02-13 16:36:07 +01:00
Artur Pragacz 7021175e0d Simplify stage 1 in bootstrap (#137668)
* Simplify stage 1 in bootstrap

* Add timeouts to STAGE 0

* Fix test

* Clarify pre import language

* Remove timeout for frontend and recorder

* Address review

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2025-02-13 13:07:24 +01:00
Norbert Rittel e9138a427d Replace wrong description reference of isy994.send_node_command (#138385) 2025-02-13 06:00:38 -06:00
Indu Prakash 6a26d59142 Add night light brightness level setting to VeSync (#137544) 2025-02-13 11:45:09 +00:00
Joakim Sørensen a8f4ab73ae Bump hass-nabucasa from 0.90.0 to 0.91.0 (#138441) 2025-02-13 11:40:55 +00:00
Norbert Rittel 0a9d134f49 Make descriptions of data fields in notify actions UI-friendly (#138431)
Also fixes a duplicated period at the end of the second string.
2025-02-13 10:28:55 +01:00
Arie Catsman 07c304125a Add error handling to enphase_envoy select platform action (#136698)
* Add error handling to enphase_envoy select platform action

* Add translation key parameter to exception_handler decorator
2025-02-13 09:37:52 +01:00
IceBotYT 6bc4f04a07 Handle no_readings in La Crosse View (#138354)
* Handle no_readings in La Crosse View

* Fixes
2025-02-13 09:24:28 +01:00
Joris Pelgröm 737baaef2b Improve test coverage for letpot (#138420) 2025-02-13 09:22:05 +01:00
IceBotYT 1ac16f6dbf Set suggested display precision in La Crosse View (#138355)
* Set suggested display precision in La Crosse View

* Switch to entity descriptions
2025-02-13 08:37:46 +01:00
puddly 81cac25bd0 OTBR firmware API for Home Assistant Hardware (#138330)
* Implement `async_register_firmware_info_provider` for OTBR

* Keep track of the current device for OTBR

Keep track of the current device, part 2

* Fix unit tests

* Revert keeping track of the current device

* Fix existing unit tests

* Increase test coverage

* Remove unused code from tests

* Reload OTBR when the addon reloads

* Only reload if the current entry is running

* Runtime test

* Add a unit test for the reloading

* Clarify the purpose of `ConfigEntryState.SETUP_IN_PROGRESS`

* Simplify typing
2025-02-12 15:48:09 -05:00
Steven B. c0068e0891 Bump python-kasa to 0.10.2 (#138381) 2025-02-12 21:42:07 +01:00
Josef Zweck 641b487196 Improve test coverage for onedrive (#138410)
* Improve test coverage for onedrive

* set done in quality scale
2025-02-12 20:44:39 +01:00
Erik Montnemery 03b3097c34 Update cloud backup agent to use calculate_b64md5 from lib (#138391)
* Update cloud backup agent to use calculate_b64md5 from lib

* Catch error, add test

* Address review comments

* Update tests/components/cloud/test_backup.py

Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>

---------

Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
2025-02-12 19:11:20 +01:00
jdanders 400dbc8d1b Add missing thermostat state EMERGENCY_HEAT to econet (#137623)
* Add missing thermostat state EMERGENCY_HEAT to econet

* econet: fix overloaded reverse dictionary

* Update homeassistant/components/econet/climate.py

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2025-02-12 18:56:42 +01:00
Steven B. d9108cc003 Fix tplink iot strip sensor refresh (#138375) 2025-02-12 11:46:11 -06:00
Josef Zweck ff5ddce7b0 Add sensor platform to OneDrive for drive usage (#138232) 2025-02-12 18:37:30 +01:00
Andre W. 620141cfb1 Fix version extraction for APsystems (#138023)
Co-authored-by: Marlon <mawol@protonmail.com>
2025-02-12 17:24:39 +00:00
J. Nick Koston 8bf870f296 Bump zeroconf to 0.144.1 (#138353)
* Bump zeroconf to 0.143.1

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.143.0...0.143.1

fixes #138324
fixes https://github.com/home-assistant/core/issues/137731
fixes https://github.com/home-assistant/core/issues/138298

* one more
2025-02-12 15:57:26 +01:00
Erik Montnemery 281c2bfb7b Bump hass-nabucasa from 0.89.0 to 0.90.0 (#138387)
* Bump hass-nabucasa from 0.89.0 to 0.90.0

* Use new shiny enum
2025-02-12 15:29:42 +01:00
Dan Raper 910711ecba Bump ohmepy to 1.3.0 (#138380)
* Bump ohmepy to 1.3.0

* CI fix for enum change
2025-02-12 14:54:21 +01:00
epenet 4807682fc5 Remove unused arguments in forked_daapd initialisation (#138289) 2025-02-12 14:18:10 +01:00
fwestenberg 327bb34be1 Bump stookwijzer to 1.5.2 (#138384)
Bump stookwijzer==1.5.2
2025-02-12 15:15:32 +02:00
Robert Resch 6084bee2d5 Bump deebot-client to 12.1.0 (#138382) 2025-02-12 15:14:52 +02:00
Abílio Costa bc11444fb2 Add missing loggers to Cloud (#138374) 2025-02-12 13:14:31 +01:00
epenet e12b100a37 Use runtime_data in fireservicerota (#138361) 2025-02-12 12:49:26 +01:00
Robert Resch ef9d5dd568 Bump cryptography to 44.0.1 (#138371) 2025-02-12 12:46:53 +01:00
epenet 2bb582f8e6 Use runtime_data in geo_json_events (#138366)
* Use runtime_data in geo_json_events

* Update __init__.py
2025-02-12 12:42:22 +01:00
jdanders f1471f143c Fix broken issue creation in econet (#137773)
* econet: Fix broken issue creation

* econet: fix broken issue creation with create_issue
2025-02-12 12:41:52 +01:00
Norbert Rittel 64fa9b78f8 Fix typos in user-facing strings of Bayesian integration (#138364) 2025-02-12 12:39:43 +01:00
Markus Adrario 88b444fa5b Add Homee sensor tests (#137200) 2025-02-12 11:35:36 +00:00
Norbert Rittel 487a4ac5c4 Improve field names and descriptions of easyEnergy actions (#138319)
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
2025-02-12 11:28:15 +00:00
TimL a3cde3d8ab Fix authentication error when adding new devices to SMLIGHT (#138373)
* Fix authentication issue

Fixes #138216

* Fix incorrect mocks in unsupported device tests

* set _device_name in auth flow also

* Update get_info Mock to handle authentication

* Update tests
2025-02-12 12:22:58 +01:00
Erik Montnemery 6ef1178a35 Use setup_backup_integration test helper in backup tests (#138362) 2025-02-12 09:49:01 +01:00
epenet 2033dbdd90 Use entry.async_on_unload in fireservicerota (#138360) 2025-02-12 09:22:35 +01:00
Erik Montnemery a6c51440e5 Use test helper for creating a mocked backup agent in backup tests (#138312)
* Use test helper for creating a mocked backup agent in backup tests

* Adjust according to discussion
2025-02-12 08:55:16 +01:00
Pete Sage 1393f417ed Expose media_player async_browse_media as service (#116452)
* initial commit

* make fields optional

* x

* ruff issues

* ruff issues

* ruff issues

* ruff issues

* update example

* update description

* use constants

* Update homeassistant/components/media_player/strings.json

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

* update service call metadata

* update description

* patch the demo

* Update homeassistant/components/media_player/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* revert unrelated change

* update test metadata

* update test metadata

* change patch target to be more specific

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-12 01:06:13 +01:00
Allen Porter da1e3c29ed Update anthropic to use the streaming API (#138256) 2025-02-12 01:05:23 +01:00
Robert Resch 117a71cb67 Bump sentry-sdk to 1.45.1 (#138349) 2025-02-12 01:04:05 +01:00
Abílio Costa 48b8ec01e3 Add logs to Cloud component support package (#138230)
* Add logs to Cloud component support package

* Add section for logs

* Replace list with deque

* Copy the deque to avoid mutation during iteration
2025-02-11 23:05:19 +01:00
rrooggiieerr 0ffbe076be Fix timer.cancel action fires timer.cancelled event even on canceled timers (#134507)
* Fixes https://github.com/home-assistant/core/issues/116105

* Fixes unit test in accordance to documentation

Timer needs to be active before it can be canceled

* Allow canceling of paused timers

* Add test for canceling/finishing already canceled/finished timers

* Add test for finishing a paused timer, this should not be possible

* Revert finish related tests

* Merge branch 'timer.cancelled_fix' of
git@github.com:rrooggiieerr/homeassistant-core.git into
timer.cancelled_fix

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2025-02-11 22:08:18 +01:00
Allen Porter 8d5f927b42 Fix next authentication token error handling (#138299) 2025-02-11 21:47:36 +01:00
Erik Montnemery 6abf7b525a Improve test coverage of config subentries and fix related issues (#138321)
Improve test coverage of config subentries
2025-02-11 21:46:56 +01:00
Arie Catsman 6115def083 Bump pyenphase to 1.25.1 (#138327)
* Bump pyenphase to 1.25.1

* Add new opt_schedules to nephase_envoy test fixtures
2025-02-11 21:35:03 +01:00
rrooggiieerr 17089e822e Allow timer.finish on paused timers (#134552)
* Add test for finishing already finished timer

* Add test for finishing a paused timer

* Allow canceled timer to be finished
2025-02-11 21:26:13 +01:00
Norbert Rittel 7a556ac3ec Remove "true" / "false" and key name from yeelight.set_music_mode action (#138334) 2025-02-11 20:48:50 +01:00
Norbert Rittel 857e35b7fd Remove remaining occurrences of "true" / "false" in telegram_bot (#138329)
Make the field description UI-friendly.
2025-02-11 20:22:22 +01:00
epenet 2cea2258a2 Improve type hints in forked_daapd coordinator (#138287) 2025-02-11 18:27:27 +00:00
Norbert Rittel 444b9a9579 Improve user-facing strings of denonavr for better translations (#138322)
- fix sentence-casing for "network receiver" as this should be translated
- change "Ethernet" to upper-case
- replace "True/false for enable/disable" with UI-friendly description
2025-02-11 19:26:59 +01:00
Erik Montnemery fe3d6f93d7 Fix data_entry_flow.UnknownStep error message (#138288) 2025-02-11 18:56:18 +01:00
Joost Lekkerkerker 3489b20e86 Refactor SmartThings sensor platform (#138313) 2025-02-11 18:14:13 +01:00
epenet 8e7f35aa7d Use runtime_data in flo (#138307) 2025-02-11 17:42:58 +01:00
epenet 14e1b55b5a Do not test internals in flo tests (#138306)
* Do not test internals in flo tests

* fix
2025-02-11 17:26:58 +01:00
balazs92117 a85bb98743 Dsmr eon hungary (#138162)
Add EON hungary
2025-02-11 17:25:57 +01:00
RJPoelstra ab1e1c06b6 Set PARALLEL_UPDATES for MotionMount integration (#138264)
Set PARALLEL_UPDATES
2025-02-11 17:22:51 +01:00
Michael Hansen 6226542e4d Keep responding state on wake word start (#138244)
* Keep responding state on wake word start

* Add comment
2025-02-11 10:21:41 -06:00
epenet 7f376ff004 Use runtime_data in flux_led (#138279) 2025-02-11 17:09:06 +01:00
epenet 62b563eb60 Use runtime_data in flexit_bacnet (#138280) 2025-02-11 17:08:39 +01:00
epenet df4c718bac Use runtime_data in fjaraskupan (#138281) 2025-02-11 17:00:44 +01:00
Steven Hartland 1a4738b1d4 Fix scaffolding integration generation (#138247)
* fix(scaffold): integration generation

Fix script.scaffold integration generation which was failing due to
hassfest quality check.

Add the required `quality_scale` to the generated integration
manifest.json.

Use the new `--skip-plugins` flag to skip the hassfest quality check
when generating integrations, as the quality scale rules are marked as
todo, and only run against the generated integration.

Correct typo in help for hassfest command `--plugins` flag.

Update Integration.core method to use absolute path to ensure it returns
the true if the integration is a core integration, which was causing
other checks to fail, as the integration was not being marked as core.

Always output subprocess output as it contains the error message when a
command fails, without this the user would not know why the command
failed.

Fixes: #128639

* Adjust comment language

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-11 16:24:04 +01:00
Erik Montnemery 8b3421deb7 Add test helper for creating a mocked backup agent (#138294)
* Add test helper for creating a mocked backup agent

* Address review comments
2025-02-11 16:21:24 +01:00
Erik Montnemery 10180cd464 Fix BackupManager.async_delete_backup (#138286) 2025-02-11 14:53:07 +01:00
Piotr Buliński 2784a28ef7 Flexit BACnet: Cooker hood mode support (#138229) 2025-02-11 14:39:42 +01:00
Erik Montnemery 31ea2e1714 Improve error reporting in onboarding backup API (#138203) 2025-02-11 13:48:13 +01:00
Erik Montnemery 77486b9306 Improve config_entries tests (#138274)
* Improve config_entries tests

* Drop unnecessary use of OrderedDict
2025-02-11 13:17:54 +01:00
Erik Montnemery 428cc1a951 Update signature of platforms' async_setup_entry in tests (#138271) 2025-02-11 13:17:39 +01:00
Norbert Rittel 89f157592d Simplify the description of insteon.load_all_link_database action (#138275)
This also replaces "true" with "enabled" to better it match the toggle in the UI.
2025-02-11 13:15:11 +02:00
Allen Porter 3578f4ebbf Refresh nest access token before before building subscriber Credentials (#138259) 2025-02-11 11:51:30 +01:00
Christopher Fenner 0d605f9f74 Improve device naming for ViCare integration (#138240)
Update entity.py
2025-02-11 11:42:21 +01:00
Manu e71f8c444b Add user profile info to Habitica sensor and device URL (#137152)
Add user profile attributes to Habitica sensor and device URL
2025-02-11 11:41:11 +01:00
Norbert Rittel d46e29d7a9 Make field descriptions in knx actions UI-friendly (#138268)
- drop `true` / `false` to match the toggle in the UI
- replace `address` key with its friendly name in the UI
2025-02-11 11:36:18 +01:00
Norbert Rittel 24293c5bfe Remove "true" / "false" from field descriptions in osoenergy (#138267)
Make two fields descriptions UI-friendly as there is now a toggle to turn the options on or off.
2025-02-11 11:35:13 +01:00
Norbert Rittel a4decabf3b Remove question marks and "true/false" from action fields in zwave_js (#138263)
- change three field names from a question to just a name
- remove "true" / "false" to reflect that these are toggles in the UI
2025-02-11 09:54:49 +01:00
Erik Montnemery ec0cef0611 Unify error reporting in onboarding backup API (#138200) 2025-02-11 09:47:09 +01:00
Paulus Schoutsen 35416189f2 Remove some unused tests from Google Generative AI (#138249)
* Remove some unused tests from Google Generative AI

* Remove unused snapshots
2025-02-10 18:25:34 -08:00
Diogo Gomes 6102c2b451 Bump pyipma to 3.0.9 (#138238) 2025-02-10 21:03:31 -05:00
Jamin 97a8f24f8e Allow specifying SIP username for outgoing calls (#137059)
* Allow specifying SIP username for outgoing calls

Allow configuring a SIP username to be sent in outgoing call requests to
identify the home assistant source endpoint.

* Remove advanced options section

* Add test for removing user

* Allow unsetting SIP user

Make previous SIP user value a suggested value rather than default to
allow unsetting by submitting an empty value in the form.

* Remove unnecessary checks

Remove user check from main flow and remove none or empty check.
2025-02-10 19:24:59 -05:00
Erik Montnemery ba583cc669 Add test for trying to add an entity to an unknown config subentry (#138211) 2025-02-10 19:21:43 -05:00
J. Nick Koston b8ec8ab3cc Bump aiodiscover to 2.6.0 (#138239) 2025-02-10 16:25:39 -06:00
Michael Hansen 6bc6111771 Add Wyoming satellite announce (#138221)
* Add Wyoming satellite announce

* Initialize when necessary
2025-02-10 14:36:20 -06:00
Erik Montnemery f83c8de8d3 Update signature of platforms' async_setup_entry (#138201) 2025-02-10 21:08:03 +01:00
Manu dc07f72fc2 Bump habiticalib to v0.3.7 (#137993)
* bump habiticalib to 0.3.6

* bump to v0.3.7
2025-02-10 20:37:54 +01:00
Martin Hjelmare a62619894a Rework ondilo ico coordinator (#138204)
Rework ondilo ico coordinators
2025-02-10 20:36:10 +01:00
Norbert Rittel 20f6bd309e Change light.turn_on and light.turn_off descriptions to match HA style (#138213)
Change light.turn_on and turn_off descriptions to match HA style

Also remove one excessive comma from the light.toggle action description.
2025-02-10 20:34:38 +01:00
Norbert Rittel 12173a9d62 Replace (wrong) xiaomi vacuum action key names with friendly names (#138214)
Replace (wrong) xiaomi action key names with friendly names
2025-02-10 20:34:12 +01:00
Shay Levy 68eb0d81c8 Fix LG webOS TV fails to setup when device is off (#137870) 2025-02-10 20:32:41 +01:00
Manu 5529fbdc94 Allow ignored IronOS devices to be set up from the user flow (#138223) 2025-02-10 21:18:31 +02:00
Andrew Sayre 7aab1de72d Bump pyheos to v1.0.2 (#138224)
Bump pyheos
2025-02-10 21:18:12 +02:00
Bram Kragten c06ad5d799 Update frontend to 20250210.0 (#138227) 2025-02-10 20:11:39 +01:00
dependabot[bot] 21d5c5199c Bump github/codeql-action from 3.28.8 to 3.28.9 (#138184)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.8 to 3.28.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3.28.8...v3.28.9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 20:08:16 +01:00
Markus Adrario 9ca93ebf12 bump pyHomee to 1.2.7 (#138212) 2025-02-10 20:04:57 +01:00
Josef Zweck e3fa739446 Add caching to onedrive (#137950)
* Add caching to onedrive

* Move cache invalidation
2025-02-10 19:52:28 +01:00
Jan Bouwhuis 663860e9c2 Improve description in Intergas entry setup form (#138225)
Improve description in  Intergas entrry setup form
2025-02-10 19:47:41 +01:00
Nathan Spencer 5c0ea9e845 Convert coinbase account amounts as floats to properly add them together (#137588)
Convert coinbase account amounts as floats to properly add
2025-02-10 18:11:40 +02:00
Erik Montnemery e1817d466e Keep one backup per backup agent when executing retention policy (#138189)
* Keep one backup per backup agent when executing retention policy

* Add tests

* Use defaultdict instead of dict.setdefault

* Update hassio tests
2025-02-10 18:09:57 +02:00
Jan-Philipp Benecke 53d011f345 Improve inexogy logging when failed to update (#138210) 2025-02-10 17:59:18 +02:00
Erik Montnemery 4b34d1bbb5 Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Nathan Spencer 854af1449b Bump pybalboa to 1.1.2 (#138139)
* Bump pybalboa to 1.1.1

* Bump pybalboa to 1.1.2
2025-02-10 13:50:35 +01:00
epenet 9e04f618b8 Adjust 'Install all test requirements' task to include base requirements (#137642) 2025-02-10 12:11:33 +00:00
Marc Mueller e1d3549ce3 Improve blueprint importer typing (#138194) 2025-02-10 12:53:44 +01:00
Josef Zweck b89f9a5961 Bump onedrive-personal-sdk to 0.0.10 (#138186) 2025-02-10 13:41:28 +02:00
3333 changed files with 36462 additions and 9922 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 99 KiB

+2 -2
View File
@@ -24,11 +24,11 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Initialize CodeQL
uses: github/codeql-action/init@v3.28.8
uses: github/codeql-action/init@v3.28.9
with:
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.28.8
uses: github/codeql-action/analyze@v3.28.9
with:
category: "/language:python"
+1
View File
@@ -234,6 +234,7 @@ homeassistant.components.here_travel_time.*
homeassistant.components.history.*
homeassistant.components.history_stats.*
homeassistant.components.holiday.*
homeassistant.components.home_connect.*
homeassistant.components.homeassistant.*
homeassistant.components.homeassistant_alerts.*
homeassistant.components.homeassistant_green.*
+1 -1
View File
@@ -148,7 +148,7 @@
{
"label": "Install all Test Requirements",
"type": "shell",
"command": "uv pip install -r requirements_test_all.txt",
"command": "uv pip install -r requirements.txt -r requirements_test_all.txt",
"group": {
"kind": "build",
"isDefault": true
Generated
+19 -19
View File
@@ -12,8 +12,26 @@ ENV \
ARG QEMU_CPU
# Home Assistant S6-Overlay
COPY rootfs /
# Needs to be redefined inside the FROM statement to be set for RUN commands
ARG BUILD_ARCH
# Get go2rtc binary
RUN \
case "${BUILD_ARCH}" in \
"aarch64") go2rtc_suffix='arm64' ;; \
"armhf") go2rtc_suffix='armv6' ;; \
"armv7") go2rtc_suffix='arm' ;; \
*) go2rtc_suffix=${BUILD_ARCH} ;; \
esac \
&& curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_${go2rtc_suffix} --output /bin/go2rtc \
&& chmod +x /bin/go2rtc \
# Verify go2rtc can be executed
&& go2rtc --version
# Install uv
RUN pip3 install uv==0.5.27
RUN pip3 install uv==0.6.1
WORKDIR /usr/src
@@ -42,22 +60,4 @@ RUN \
&& python3 -m compileall \
homeassistant/homeassistant
# Home Assistant S6-Overlay
COPY rootfs /
# Needs to be redefined inside the FROM statement to be set for RUN commands
ARG BUILD_ARCH
# Get go2rtc binary
RUN \
case "${BUILD_ARCH}" in \
"aarch64") go2rtc_suffix='arm64' ;; \
"armhf") go2rtc_suffix='armv6' ;; \
"armv7") go2rtc_suffix='arm' ;; \
*) go2rtc_suffix=${BUILD_ARCH} ;; \
esac \
&& curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_${go2rtc_suffix} --output /bin/go2rtc \
&& chmod +x /bin/go2rtc \
# Verify go2rtc can be executed
&& go2rtc --version
WORKDIR /config
+5 -5
View File
@@ -1,10 +1,10 @@
image: ghcr.io/home-assistant/{arch}-homeassistant
build_from:
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2024.12.0
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2024.12.0
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2024.12.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2024.12.0
i386: ghcr.io/home-assistant/i386-homeassistant-base:2024.12.0
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2025.02.1
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2025.02.1
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2025.02.1
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2025.02.1
i386: ghcr.io/home-assistant/i386-homeassistant-base:2025.02.1
codenotary:
signer: notary@home-assistant.io
base_image: notary@home-assistant.io
+60 -76
View File
@@ -134,14 +134,12 @@ DATA_REGISTRIES_LOADED: HassKey[None] = HassKey("bootstrap_registries_loaded")
LOG_SLOW_STARTUP_INTERVAL = 60
SLOW_STARTUP_CHECK_INTERVAL = 1
STAGE_0_SUBSTAGE_TIMEOUT = 60
STAGE_1_TIMEOUT = 120
STAGE_2_TIMEOUT = 300
WRAP_UP_TIMEOUT = 300
COOLDOWN_TIME = 60
DEBUGGER_INTEGRATIONS = {"debugpy"}
# Core integrations are unconditionally loaded
CORE_INTEGRATIONS = {"homeassistant", "persistent_notification"}
@@ -152,6 +150,10 @@ LOGGING_AND_HTTP_DEPS_INTEGRATIONS = {
"isal",
# Set log levels
"logger",
# Ensure network config is available
# before hassio or any other integration is
# loaded that might create an aiohttp client session
"network",
# Error logging
"system_log",
"sentry",
@@ -172,12 +174,27 @@ FRONTEND_INTEGRATIONS = {
# add it here.
"backup",
}
RECORDER_INTEGRATIONS = {
# Setup after frontend
# To record data
"recorder",
}
DISCOVERY_INTEGRATIONS = ("bluetooth", "dhcp", "ssdp", "usb", "zeroconf")
# Stage 0 is divided into substages. Each substage has a name, a set of integrations and a timeout.
# The substage containing recorder should have no timeout, as it could cancel a database migration.
# Recorder freezes "recorder" timeout during a migration, but it does not freeze other timeouts.
# The substages preceding it should also have no timeout, until we ensure that the recorder
# is not accidentally promoted as a dependency of any of the integrations in them.
# If we add timeouts to the frontend substages, we should make sure they don't apply in recovery mode.
STAGE_0_INTEGRATIONS = (
# Load logging and http deps as soon as possible
("logging, http deps", LOGGING_AND_HTTP_DEPS_INTEGRATIONS, None),
# Setup frontend
("frontend", FRONTEND_INTEGRATIONS, None),
# Setup recorder
("recorder", {"recorder"}, None),
# Start up debuggers. Start these first in case they want to wait.
("debugger", {"debugpy"}, STAGE_0_SUBSTAGE_TIMEOUT),
# Zeroconf is used for mdns resolution in aiohttp client helper.
("zeroconf", {"zeroconf"}, STAGE_0_SUBSTAGE_TIMEOUT),
)
DISCOVERY_INTEGRATIONS = ("bluetooth", "dhcp", "ssdp", "usb")
# Stage 1 integrations are not to be preimported in bootstrap.
STAGE_1_INTEGRATIONS = {
# We need to make sure discovery integrations
# update their deps before stage 2 integrations
@@ -189,9 +206,8 @@ STAGE_1_INTEGRATIONS = {
"mqtt_eventstream",
# To provide account link implementations
"cloud",
# Ensure supervisor is available
"hassio",
}
DEFAULT_INTEGRATIONS = {
# These integrations are set up unless recovery mode is activated.
#
@@ -232,22 +248,12 @@ DEFAULT_INTEGRATIONS_SUPERVISOR = {
# These integrations are set up if using the Supervisor
"hassio",
}
CRITICAL_INTEGRATIONS = {
# Recovery mode is activated if these integrations fail to set up
"frontend",
}
SETUP_ORDER = (
# Load logging and http deps as soon as possible
("logging, http deps", LOGGING_AND_HTTP_DEPS_INTEGRATIONS),
# Setup frontend
("frontend", FRONTEND_INTEGRATIONS),
# Setup recorder
("recorder", RECORDER_INTEGRATIONS),
# Start up debuggers. Start these first in case they want to wait.
("debugger", DEBUGGER_INTEGRATIONS),
)
#
# Storage keys we are likely to load during startup
# in order of when we expect to load them.
@@ -694,7 +700,6 @@ async def async_mount_local_lib_path(config_dir: str) -> str:
return deps_dir
@core.callback
def _get_domains(hass: core.HomeAssistant, config: dict[str, Any]) -> set[str]:
"""Get domains of components to set up."""
# Filter out the repeating and common config section [homeassistant]
@@ -890,69 +895,48 @@ async def _async_set_up_integrations(
domains_to_setup, integration_cache = await _async_resolve_domains_to_setup(
hass, config
)
stage_2_domains = domains_to_setup.copy()
# Initialize recorder
if "recorder" in domains_to_setup:
recorder.async_initialize_recorder(hass)
pre_stage_domains = [
(name, domains_to_setup & domain_group) for name, domain_group in SETUP_ORDER
stage_0_and_1_domains: list[tuple[str, set[str], int | None]] = [
*(
(name, domain_group & domains_to_setup, timeout)
for name, domain_group, timeout in STAGE_0_INTEGRATIONS
),
("stage 1", STAGE_1_INTEGRATIONS & domains_to_setup, STAGE_1_TIMEOUT),
]
# calculate what components to setup in what stage
stage_1_domains: set[str] = set()
_LOGGER.info("Setting up stage 0 and 1")
for name, domain_group, timeout in stage_0_and_1_domains:
if not domain_group:
continue
# Find all dependencies of any dependency of any stage 1 integration that
# we plan on loading and promote them to stage 1. This is done only to not
# get misleading log messages
deps_promotion: set[str] = STAGE_1_INTEGRATIONS
while deps_promotion:
old_deps_promotion = deps_promotion
deps_promotion = set()
_LOGGER.info("Setting up %s: %s", name, domain_group)
to_be_loaded = domain_group.copy()
to_be_loaded.update(
dep
for domain in domain_group
if (integration := integration_cache.get(domain)) is not None
for dep in integration.all_dependencies
)
async_set_domains_to_be_loaded(hass, to_be_loaded)
stage_2_domains -= to_be_loaded
for domain in old_deps_promotion:
if domain not in domains_to_setup or domain in stage_1_domains:
continue
stage_1_domains.add(domain)
if (dep_itg := integration_cache.get(domain)) is None:
continue
deps_promotion.update(dep_itg.all_dependencies)
stage_2_domains = domains_to_setup - stage_1_domains
for name, domain_group in pre_stage_domains:
if domain_group:
stage_2_domains -= domain_group
_LOGGER.info("Setting up %s: %s", name, domain_group)
to_be_loaded = domain_group.copy()
to_be_loaded.update(
dep
for domain in domain_group
if (integration := integration_cache.get(domain)) is not None
for dep in integration.all_dependencies
)
async_set_domains_to_be_loaded(hass, to_be_loaded)
if timeout is None:
await _async_setup_multi_components(hass, domain_group, config)
# Enables after dependencies when setting up stage 1 domains
async_set_domains_to_be_loaded(hass, stage_1_domains)
# Start setup
if stage_1_domains:
_LOGGER.info("Setting up stage 1: %s", stage_1_domains)
try:
async with hass.timeout.async_timeout(
STAGE_1_TIMEOUT, cool_down=COOLDOWN_TIME
):
await _async_setup_multi_components(hass, stage_1_domains, config)
except TimeoutError:
_LOGGER.warning(
"Setup timed out for stage 1 waiting on %s - moving forward",
hass._active_tasks, # noqa: SLF001
)
else:
try:
async with hass.timeout.async_timeout(timeout, cool_down=COOLDOWN_TIME):
await _async_setup_multi_components(hass, domain_group, config)
except TimeoutError:
_LOGGER.warning(
"Setup timed out for %s waiting on %s - moving forward",
name,
hass._active_tasks, # noqa: SLF001
)
# Add after dependencies when setting up stage 2 domains
async_set_domains_to_be_loaded(hass, stage_2_domains)
@@ -11,7 +11,7 @@ from homeassistant.components.alarm_control_panel import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AbodeSystem
from .const import DOMAIN
@@ -19,7 +19,9 @@ from .entity import AbodeDevice
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode alarm control panel device."""
data: AbodeSystem = hass.data[DOMAIN]
@@ -12,7 +12,7 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util.enum import try_parse_enum
from . import AbodeSystem
@@ -21,7 +21,9 @@ from .entity import AbodeDevice
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode binary sensor devices."""
data: AbodeSystem = hass.data[DOMAIN]
+4 -2
View File
@@ -15,7 +15,7 @@ from homeassistant.components.camera import Camera
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import Event, HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util import Throttle
from . import AbodeSystem
@@ -26,7 +26,9 @@ MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode camera devices."""
data: AbodeSystem = hass.data[DOMAIN]
+4 -2
View File
@@ -7,7 +7,7 @@ from jaraco.abode.devices.cover import Cover
from homeassistant.components.cover import CoverEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AbodeSystem
from .const import DOMAIN
@@ -15,7 +15,9 @@ from .entity import AbodeDevice
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode cover devices."""
data: AbodeSystem = hass.data[DOMAIN]
+4 -2
View File
@@ -18,7 +18,7 @@ from homeassistant.components.light import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AbodeSystem
from .const import DOMAIN
@@ -26,7 +26,9 @@ from .entity import AbodeDevice
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode light devices."""
data: AbodeSystem = hass.data[DOMAIN]
+4 -2
View File
@@ -7,7 +7,7 @@ from jaraco.abode.devices.lock import Lock
from homeassistant.components.lock import LockEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AbodeSystem
from .const import DOMAIN
@@ -15,7 +15,9 @@ from .entity import AbodeDevice
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode lock devices."""
data: AbodeSystem = hass.data[DOMAIN]
+4 -2
View File
@@ -16,7 +16,7 @@ from homeassistant.components.sensor import (
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import LIGHT_LUX, PERCENTAGE, UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AbodeSystem
from .const import DOMAIN
@@ -61,7 +61,9 @@ SENSOR_TYPES: tuple[AbodeSensorDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode sensor devices."""
data: AbodeSystem = hass.data[DOMAIN]
+4 -2
View File
@@ -10,7 +10,7 @@ from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AbodeSystem
from .const import DOMAIN
@@ -20,7 +20,9 @@ DEVICE_TYPES = ["switch", "valve"]
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Abode switch devices."""
data: AbodeSystem = hass.data[DOMAIN]
@@ -11,7 +11,7 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntityDescription,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AcaiaConfigEntry
from .entity import AcaiaEntity
@@ -40,7 +40,7 @@ BINARY_SENSORS: tuple[AcaiaBinarySensorEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AcaiaConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up binary sensors."""
+2 -2
View File
@@ -8,7 +8,7 @@ from aioacaia.acaiascale import AcaiaScale
from homeassistant.components.button import ButtonEntity, ButtonEntityDescription
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AcaiaConfigEntry
from .entity import AcaiaEntity
@@ -45,7 +45,7 @@ BUTTONS: tuple[AcaiaButtonEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AcaiaConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up button entities and services."""
+2 -2
View File
@@ -16,7 +16,7 @@ from homeassistant.components.sensor import (
)
from homeassistant.const import PERCENTAGE, UnitOfMass, UnitOfVolumeFlowRate
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AcaiaConfigEntry
from .entity import AcaiaEntity
@@ -77,7 +77,7 @@ RESTORE_SENSORS: tuple[AcaiaSensorEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AcaiaConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up sensors."""
@@ -25,7 +25,7 @@ from homeassistant.const import (
UnitOfVolumetricFlux,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import (
@@ -375,7 +375,7 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AccuWeatherConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add AccuWeather entities from a config_entry."""
observation_coordinator: AccuWeatherObservationDataUpdateCoordinator = (
@@ -30,7 +30,7 @@ from homeassistant.const import (
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util.dt import utc_from_timestamp
from .const import (
@@ -54,7 +54,7 @@ PARALLEL_UPDATES = 1
async def async_setup_entry(
hass: HomeAssistant,
entry: AccuWeatherConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add a AccuWeather weather entity from a config_entry."""
async_add_entities([AccuWeatherEntity(entry.runtime_data)])
+2 -2
View File
@@ -11,7 +11,7 @@ from homeassistant.components.cover import (
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AcmedaConfigEntry
from .const import ACMEDA_HUB_UPDATE
@@ -22,7 +22,7 @@ from .helpers import async_add_acmeda_entities
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AcmedaConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Acmeda Rollers from a config entry."""
hub = config_entry.runtime_data
+2 -2
View File
@@ -9,7 +9,7 @@ from aiopulse import Roller
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import DOMAIN, LOGGER
@@ -23,7 +23,7 @@ def async_add_acmeda_entities(
entity_class: type,
config_entry: AcmedaConfigEntry,
current: set[int],
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add any new entities."""
hub = config_entry.runtime_data
+2 -2
View File
@@ -6,7 +6,7 @@ from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
from homeassistant.const import PERCENTAGE
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AcmedaConfigEntry
from .const import ACMEDA_HUB_UPDATE
@@ -17,7 +17,7 @@ from .helpers import async_add_acmeda_entities
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AcmedaConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Acmeda Rollers from a config entry."""
hub = config_entry.runtime_data
+2 -2
View File
@@ -25,7 +25,7 @@ from homeassistant.const import (
from homeassistant.core import HomeAssistant
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import ACCOUNT_ID, CONNECTION_TYPE, DOMAIN, LOCAL
@@ -33,7 +33,7 @@ from .const import ACCOUNT_ID, CONNECTION_TYPE, DOMAIN, LOCAL
async def async_setup_entry(
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Adax thermostat with config flow."""
if entry.data.get(CONNECTION_TYPE) == LOCAL:
+2 -7
View File
@@ -7,7 +7,7 @@ from dataclasses import dataclass
from adguardhome import AdGuardHome, AdGuardHomeConnectionError
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_HOST,
CONF_NAME,
@@ -123,12 +123,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: AdGuardConfigEntry) -> b
async def async_unload_entry(hass: HomeAssistant, entry: AdGuardConfigEntry) -> bool:
"""Unload AdGuard Home config entry."""
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
loaded_entries = [
entry
for entry in hass.config_entries.async_entries(DOMAIN)
if entry.state == ConfigEntryState.LOADED
]
if len(loaded_entries) == 1:
if not hass.config_entries.async_loaded_entries(DOMAIN):
# This is the last loaded instance of AdGuard, deregister any services
hass.services.async_remove(DOMAIN, SERVICE_ADD_URL)
hass.services.async_remove(DOMAIN, SERVICE_REMOVE_URL)
+2 -2
View File
@@ -12,7 +12,7 @@ from adguardhome import AdGuardHome
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.const import PERCENTAGE, UnitOfTime
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdGuardConfigEntry, AdGuardData
from .const import DOMAIN
@@ -85,7 +85,7 @@ SENSORS: tuple[AdGuardHomeEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AdGuardConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdGuard Home sensor based on a config entry."""
data = entry.runtime_data
+2 -2
View File
@@ -11,7 +11,7 @@ from adguardhome import AdGuardHome, AdGuardHomeError
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdGuardConfigEntry, AdGuardData
from .const import DOMAIN, LOGGER
@@ -79,7 +79,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AdGuardConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdGuard Home switch based on a config entry."""
data = entry.runtime_data
@@ -8,7 +8,7 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .entity import AdvantageAirAcEntity, AdvantageAirZoneEntity
@@ -20,7 +20,7 @@ PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir Binary Sensor platform."""
@@ -19,7 +19,7 @@ from homeassistant.components.climate import (
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_WHOLE, UnitOfTemperature
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ServiceValidationError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .const import (
@@ -76,7 +76,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir climate platform."""
@@ -9,7 +9,7 @@ from homeassistant.components.cover import (
CoverEntityFeature,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .const import ADVANTAGE_AIR_STATE_CLOSE, ADVANTAGE_AIR_STATE_OPEN
@@ -22,7 +22,7 @@ PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir cover platform."""
@@ -5,7 +5,7 @@ from typing import Any
from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .const import ADVANTAGE_AIR_STATE_ON, DOMAIN as ADVANTAGE_AIR_DOMAIN
@@ -16,7 +16,7 @@ from .models import AdvantageAirData
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir light platform."""
@@ -2,7 +2,7 @@
from homeassistant.components.select import SelectEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .entity import AdvantageAirAcEntity
@@ -14,7 +14,7 @@ ADVANTAGE_AIR_INACTIVE = "Inactive"
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir select platform."""
@@ -15,7 +15,7 @@ from homeassistant.components.sensor import (
from homeassistant.const import PERCENTAGE, EntityCategory, UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .const import ADVANTAGE_AIR_STATE_OPEN
@@ -32,7 +32,7 @@ PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir sensor platform."""
@@ -4,7 +4,7 @@ from typing import Any
from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .const import (
@@ -19,7 +19,7 @@ from .models import AdvantageAirData
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir switch platform."""
@@ -3,7 +3,7 @@
from homeassistant.components.update import UpdateEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AdvantageAirDataConfigEntry
from .const import DOMAIN as ADVANTAGE_AIR_DOMAIN
@@ -14,7 +14,7 @@ from .models import AdvantageAirData
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AdvantageAirDataConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AdvantageAir update platform."""
+2 -2
View File
@@ -9,7 +9,7 @@ from aemet_opendata.helpers import dict_nested_value
from homeassistant.components.image import Image, ImageEntity, ImageEntityDescription
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AemetConfigEntry, WeatherUpdateCoordinator
from .entity import AemetEntity
@@ -25,7 +25,7 @@ AEMET_IMAGES: Final[tuple[ImageEntityDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AemetConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AEMET OpenData image entities based on a config entry."""
domain_data = config_entry.runtime_data
+2 -2
View File
@@ -52,7 +52,7 @@ from homeassistant.const import (
UnitOfVolumetricFlux,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util import dt as dt_util
from .const import (
@@ -358,7 +358,7 @@ WEATHER_SENSORS: Final[tuple[AemetSensorEntityDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AemetConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AEMET OpenData sensor entities based on a config entry."""
domain_data = config_entry.runtime_data
+2 -2
View File
@@ -25,7 +25,7 @@ from homeassistant.const import (
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import CONDITIONS_MAP
from .coordinator import AemetConfigEntry, WeatherUpdateCoordinator
@@ -35,7 +35,7 @@ from .entity import AemetEntity
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AemetConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AEMET OpenData weather entity based on a config entry."""
domain_data = config_entry.runtime_data
+2 -2
View File
@@ -14,7 +14,7 @@ from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util import Throttle
from . import AfterShipConfigEntry
@@ -42,7 +42,7 @@ PLATFORM_SCHEMA: Final = cv.removed(DOMAIN, raise_if_present=False)
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AfterShipConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AfterShip sensor entities based on a config entry."""
aftership = config_entry.runtime_data
@@ -9,7 +9,7 @@ from homeassistant.components.alarm_control_panel import (
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AgentDVRConfigEntry
from .const import DOMAIN as AGENT_DOMAIN
@@ -24,7 +24,7 @@ CONST_ALARM_CONTROL_PANEL_NAME = "Alarm Panel"
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AgentDVRConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Agent DVR Alarm Control Panels."""
async_add_entities([AgentBaseStation(config_entry.runtime_data)])
+2 -2
View File
@@ -10,7 +10,7 @@ from homeassistant.components.mjpeg import MjpegCamera, filter_urllib3_logging
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import (
AddEntitiesCallback,
AddConfigEntryEntitiesCallback,
async_get_current_platform,
)
@@ -39,7 +39,7 @@ CAMERA_SERVICES = {
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AgentDVRConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Agent cameras."""
filter_urllib3_logging()
@@ -13,7 +13,7 @@ from homeassistant.components.button import (
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AirGradientConfigEntry
from .const import DOMAIN
@@ -47,7 +47,7 @@ LED_BAR_TEST = AirGradientButtonEntityDescription(
async def async_setup_entry(
hass: HomeAssistant,
entry: AirGradientConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirGradient button entities based on a config entry."""
coordinator = entry.runtime_data
@@ -6,6 +6,6 @@
"documentation": "https://www.home-assistant.io/integrations/airgradient",
"integration_type": "device",
"iot_class": "local_polling",
"requirements": ["airgradient==0.9.1"],
"requirements": ["airgradient==0.9.2"],
"zeroconf": ["_airgradient._tcp.local."]
}
@@ -14,7 +14,7 @@ from homeassistant.components.number import (
from homeassistant.const import PERCENTAGE, EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AirGradientConfigEntry
from .const import DOMAIN
@@ -60,7 +60,7 @@ LED_BAR_BRIGHTNESS = AirGradientNumberEntityDescription(
async def async_setup_entry(
hass: HomeAssistant,
entry: AirGradientConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirGradient number entities based on a config entry."""
@@ -14,7 +14,7 @@ from homeassistant.components.select import (
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AirGradientConfigEntry
from .const import DOMAIN, PM_STANDARD, PM_STANDARD_REVERSE
@@ -142,7 +142,7 @@ CONTROL_ENTITIES: tuple[AirGradientSelectEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirGradientConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirGradient select entities based on a config entry."""
@@ -27,7 +27,7 @@ from homeassistant.const import (
UnitOfTime,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from . import AirGradientConfigEntry
@@ -225,7 +225,7 @@ CONFIG_DISPLAY_SENSOR_TYPES: tuple[AirGradientConfigSensorEntityDescription, ...
async def async_setup_entry(
hass: HomeAssistant,
entry: AirGradientConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirGradient sensor entities based on a config entry."""
@@ -15,7 +15,7 @@ from homeassistant.components.switch import (
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AirGradientConfigEntry
from .const import DOMAIN
@@ -45,7 +45,7 @@ POST_DATA_TO_AIRGRADIENT = AirGradientSwitchEntityDescription(
async def async_setup_entry(
hass: HomeAssistant,
entry: AirGradientConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirGradient switch entities based on a config entry."""
coordinator = entry.runtime_data
@@ -6,7 +6,7 @@ from propcache.api import cached_property
from homeassistant.components.update import UpdateDeviceClass, UpdateEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AirGradientConfigEntry, AirGradientCoordinator
from .entity import AirGradientEntity
@@ -18,7 +18,7 @@ SCAN_INTERVAL = timedelta(hours=1)
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AirGradientConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Airgradient update platform."""
+2 -2
View File
@@ -21,7 +21,7 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import (
@@ -175,7 +175,7 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirlyConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Airly sensor entities based on a config entry."""
name = entry.data[CONF_NAME]
+2 -2
View File
@@ -21,7 +21,7 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@@ -130,7 +130,7 @@ SENSOR_TYPES: tuple[AirNowEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AirNowConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirNow sensor entities based on a config entry."""
coordinator = config_entry.runtime_data
@@ -83,6 +83,7 @@ class AirQConfigFlow(ConfigFlow, domain=DOMAIN):
await self.async_set_unique_id(device_info["id"])
self._abort_if_unique_id_configured()
_LOGGER.debug("Creating an entry for %s", device_info["name"])
return self.async_create_entry(title=device_info["name"], data=user_input)
return self.async_show_form(
+14 -2
View File
@@ -5,7 +5,7 @@ from __future__ import annotations
from datetime import timedelta
import logging
from aioairq import AirQ
from aioairq.core import AirQ, identify_warming_up_sensors
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD
@@ -55,6 +55,9 @@ class AirQCoordinator(DataUpdateCoordinator):
async def _async_update_data(self) -> dict:
"""Fetch the data from the device."""
if "name" not in self.device_info:
_LOGGER.debug(
"'name' not found in AirQCoordinator.device_info, fetching from the device"
)
info = await self.airq.fetch_device_info()
self.device_info.update(
DeviceInfo(
@@ -64,7 +67,16 @@ class AirQCoordinator(DataUpdateCoordinator):
hw_version=info["hw_version"],
)
)
return await self.airq.get_latest_data( # type: ignore[no-any-return]
_LOGGER.debug(
"Updated AirQCoordinator.device_info for 'name' %s",
self.device_info.get("name"),
)
data: dict = await self.airq.get_latest_data(
return_average=self.return_average,
clip_negative_values=self.clip_negative,
)
if warming_up_sensors := identify_warming_up_sensors(data):
_LOGGER.debug(
"Following sensors are still warming up: %s", warming_up_sensors
)
return data
+2 -2
View File
@@ -24,7 +24,7 @@ from homeassistant.const import (
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from . import AirQConfigEntry, AirQCoordinator
@@ -399,7 +399,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
async def async_setup_entry(
hass: HomeAssistant,
entry: AirQConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up sensor entities based on a config entry."""
+2 -2
View File
@@ -22,7 +22,7 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@@ -114,7 +114,7 @@ SENSORS: dict[str, SensorEntityDescription] = {
async def async_setup_entry(
hass: HomeAssistant,
entry: AirthingsConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Airthings sensor."""
@@ -25,7 +25,7 @@ from homeassistant.const import (
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.helpers.device_registry import CONNECTION_BLUETOOTH, DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.entity_registry import (
RegistryEntry,
async_entries_for_device,
@@ -153,7 +153,7 @@ def async_migrate(hass: HomeAssistant, address: str, sensor_name: str) -> None:
async def async_setup_entry(
hass: HomeAssistant,
entry: AirthingsBLEConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Airthings BLE sensors."""
is_metric = hass.config.units is METRIC_SYSTEM
@@ -19,7 +19,7 @@ from homeassistant.components.climate import (
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from . import AirTouch4ConfigEntry
@@ -64,7 +64,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AirTouch4ConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Airtouch 4."""
coordinator = config_entry.runtime_data
@@ -37,7 +37,7 @@ from homeassistant.components.climate import (
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import Airtouch5ConfigEntry
from .const import DOMAIN, FAN_INTELLIGENT_AUTO, FAN_TURBO
@@ -93,7 +93,7 @@ FAN_MODE_TO_SET_AC_FAN_SPEED = {
async def async_setup_entry(
hass: HomeAssistant,
config_entry: Airtouch5ConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Airtouch 5 Climate entities."""
client = config_entry.runtime_data
+2 -2
View File
@@ -20,7 +20,7 @@ from homeassistant.components.cover import (
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import Airtouch5ConfigEntry
from .const import DOMAIN
@@ -32,7 +32,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant,
config_entry: Airtouch5ConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Airtouch 5 Cover entities."""
client = config_entry.runtime_data
+2 -2
View File
@@ -23,7 +23,7 @@ from homeassistant.const import (
CONF_STATE,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from . import AirVisualConfigEntry
@@ -108,7 +108,7 @@ POLLUTANT_UNITS = {
async def async_setup_entry(
hass: HomeAssistant,
entry: AirVisualConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirVisual sensors based on a config entry."""
coordinator = entry.runtime_data
@@ -20,7 +20,7 @@ from homeassistant.const import (
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AirVisualProConfigEntry
from .entity import AirVisualProEntity
@@ -130,7 +130,7 @@ def async_get_aqi_locale(settings: dict[str, Any]) -> str:
async def async_setup_entry(
hass: HomeAssistant,
entry: AirVisualProConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up AirVisual sensors based on a config entry."""
async_add_entities(
@@ -23,7 +23,7 @@ from homeassistant.components.binary_sensor import (
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneConfigEntry, AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneSystemEntity, AirzoneZoneEntity
@@ -76,7 +76,7 @@ ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone binary sensors from a config_entry."""
coordinator = entry.runtime_data
+2 -2
View File
@@ -48,7 +48,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_TEMPERATURE
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import API_TEMPERATURE_STEP, TEMP_UNIT_LIB_TO_HASS
from .coordinator import AirzoneConfigEntry, AirzoneUpdateCoordinator
@@ -100,7 +100,7 @@ HVAC_MODE_HASS_TO_LIB: Final[dict[HVACMode, OperationMode]] = {
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone climate from a config_entry."""
coordinator = entry.runtime_data
+2 -2
View File
@@ -25,7 +25,7 @@ from homeassistant.components.select import SelectEntity, SelectEntityDescriptio
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneConfigEntry, AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneZoneEntity
@@ -117,7 +117,7 @@ ZONE_SELECT_TYPES: Final[tuple[AirzoneSelectDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone select from a config_entry."""
coordinator = entry.runtime_data
+2 -2
View File
@@ -28,7 +28,7 @@ from homeassistant.const import (
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import TEMP_UNIT_LIB_TO_HASS
from .coordinator import AirzoneConfigEntry, AirzoneUpdateCoordinator
@@ -79,7 +79,7 @@ ZONE_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone sensors from a config_entry."""
coordinator = entry.runtime_data
+2 -2
View File
@@ -14,7 +14,7 @@ from homeassistant.components.switch import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneConfigEntry, AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneZoneEntity
@@ -39,7 +39,7 @@ ZONE_SWITCH_TYPES: Final[tuple[AirzoneSwitchDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone switch from a config_entry."""
coordinator = entry.runtime_data
@@ -28,7 +28,7 @@ from homeassistant.components.water_heater import (
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_TEMPERATURE, STATE_OFF
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import TEMP_UNIT_LIB_TO_HASS
from .coordinator import AirzoneConfigEntry, AirzoneUpdateCoordinator
@@ -58,7 +58,7 @@ OPERATION_MODE_TO_DHW_PARAMS: Final[dict[str, dict[str, Any]]] = {
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone Water Heater from a config_entry."""
coordinator = entry.runtime_data
@@ -26,7 +26,7 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneCloudConfigEntry, AirzoneUpdateCoordinator
from .entity import (
@@ -111,7 +111,7 @@ ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneCloudConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone Cloud binary sensors from a config_entry."""
coordinator = entry.runtime_data
@@ -56,7 +56,7 @@ from homeassistant.components.climate import (
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneCloudConfigEntry, AirzoneUpdateCoordinator
from .entity import (
@@ -119,7 +119,7 @@ HVAC_MODE_HASS_TO_LIB: Final[dict[HVACMode, OperationMode]] = {
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneCloudConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone climate from a config_entry."""
coordinator = entry.runtime_data
@@ -21,7 +21,7 @@ from aioairzone_cloud.const import (
from homeassistant.components.select import SelectEntity, SelectEntityDescription
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneCloudConfigEntry, AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneZoneEntity
@@ -89,7 +89,7 @@ ZONE_SELECT_TYPES: Final[tuple[AirzoneSelectDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneCloudConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone Cloud select from a config_entry."""
coordinator = entry.runtime_data
@@ -47,7 +47,7 @@ from homeassistant.const import (
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneCloudConfigEntry, AirzoneUpdateCoordinator
from .entity import (
@@ -221,7 +221,7 @@ ZONE_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneCloudConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone Cloud sensors from a config_entry."""
coordinator = entry.runtime_data
@@ -13,7 +13,7 @@ from homeassistant.components.switch import (
SwitchEntityDescription,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneCloudConfigEntry, AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneZoneEntity
@@ -38,7 +38,7 @@ ZONE_SWITCH_TYPES: Final[tuple[AirzoneSwitchDescription, ...]] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneCloudConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone Cloud switch from a config_entry."""
coordinator = entry.runtime_data
@@ -29,7 +29,7 @@ from homeassistant.components.water_heater import (
)
from homeassistant.const import ATTR_TEMPERATURE, STATE_OFF, UnitOfTemperature
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AirzoneCloudConfigEntry, AirzoneUpdateCoordinator
from .entity import AirzoneHotWaterEntity
@@ -68,7 +68,7 @@ OPERATION_MODE_TO_DHW_PARAMS: Final[dict[str, dict[str, Any]]] = {
async def async_setup_entry(
hass: HomeAssistant,
entry: AirzoneCloudConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Add Airzone Cloud Water Heater from a config_entry."""
coordinator = entry.runtime_data
@@ -90,7 +90,7 @@
},
"alarm_arm_home": {
"name": "Arm home",
"description": "Sets the alarm to: _armed, but someone is home_.",
"description": "Arms the alarm in the home mode.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
@@ -100,7 +100,7 @@
},
"alarm_arm_away": {
"name": "Arm away",
"description": "Sets the alarm to: _armed, no one home_.",
"description": "Arms the alarm in the away mode.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
@@ -110,7 +110,7 @@
},
"alarm_arm_night": {
"name": "Arm night",
"description": "Sets the alarm to: _armed for the night_.",
"description": "Arms the alarm in the night mode.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
@@ -120,7 +120,7 @@
},
"alarm_arm_vacation": {
"name": "Arm vacation",
"description": "Sets the alarm to: _armed for vacation_.",
"description": "Arms the alarm in the vacation mode.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
@@ -130,7 +130,7 @@
},
"alarm_trigger": {
"name": "Trigger",
"description": "Trigger the alarm manually.",
"description": "Triggers the alarm manually.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
@@ -14,7 +14,7 @@ from homeassistant.const import ATTR_CODE
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AlarmDecoderConfigEntry
from .const import (
@@ -36,7 +36,7 @@ ATTR_KEYPRESS = "keypress"
async def async_setup_entry(
hass: HomeAssistant,
entry: AlarmDecoderConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up for AlarmDecoder alarm panels."""
options = entry.options
@@ -5,7 +5,7 @@ import logging
from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AlarmDecoderConfigEntry
from .const import (
@@ -40,7 +40,7 @@ ATTR_RF_LOOP1 = "rf_loop1"
async def async_setup_entry(
hass: HomeAssistant,
entry: AlarmDecoderConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up for AlarmDecoder sensor."""
@@ -3,7 +3,7 @@
from homeassistant.components.sensor import SensorEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AlarmDecoderConfigEntry
from .const import SIGNAL_PANEL_MESSAGE
@@ -13,7 +13,7 @@ from .entity import AlarmDecoderEntity
async def async_setup_entry(
hass: HomeAssistant,
entry: AlarmDecoderConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up for AlarmDecoder sensor."""
@@ -9,7 +9,7 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntityDescription,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import ATTRIBUTION
@@ -85,7 +85,7 @@ class AmberDemandWindowBinarySensor(AmberPriceGridSensor):
async def async_setup_entry(
hass: HomeAssistant,
entry: AmberConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up a config entry."""
coordinator = entry.runtime_data
@@ -19,7 +19,7 @@ from homeassistant.components.sensor import (
)
from homeassistant.const import CURRENCY_DOLLAR, PERCENTAGE, UnitOfEnergy
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import ATTRIBUTION
@@ -196,7 +196,7 @@ class AmberGridSensor(CoordinatorEntity[AmberUpdateCoordinator], SensorEntity):
async def async_setup_entry(
hass: HomeAssistant,
entry: AmberConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up a config entry."""
coordinator = entry.runtime_data
@@ -25,7 +25,7 @@ from homeassistant.const import (
UnitOfVolumetricFlux,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util import dt as dt_util
from .coordinator import AmbientNetworkConfigEntry, AmbientNetworkDataUpdateCoordinator
@@ -239,6 +239,7 @@ SENSOR_DESCRIPTIONS = (
native_unit_of_measurement=DEGREE,
suggested_display_precision=0,
entity_registry_enabled_default=False,
device_class=SensorDeviceClass.WIND_DIRECTION,
),
SensorEntityDescription(
key=TYPE_WINDGUSTMPH,
@@ -270,7 +271,7 @@ SENSOR_DESCRIPTIONS = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AmbientNetworkConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Ambient Network sensor entities."""
@@ -12,7 +12,7 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.const import ATTR_NAME, EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AmbientStationConfigEntry
from .const import ATTR_LAST_DATA
@@ -381,7 +381,7 @@ BINARY_SENSOR_DESCRIPTIONS = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AmbientStationConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Ambient PWS binary sensors based on a config entry."""
ambient = entry.runtime_data
@@ -27,7 +27,7 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import EntityDescription
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AmbientStation, AmbientStationConfigEntry
from .const import ATTR_LAST_DATA, TYPE_SOLARRADIATION, TYPE_SOLARRADIATION_LX
@@ -608,21 +608,25 @@ SENSOR_DESCRIPTIONS = (
key=TYPE_WINDDIR,
translation_key="wind_direction",
native_unit_of_measurement=DEGREE,
device_class=SensorDeviceClass.WIND_DIRECTION,
),
SensorEntityDescription(
key=TYPE_WINDDIR_AVG10M,
translation_key="wind_direction_average_10m",
native_unit_of_measurement=DEGREE,
device_class=SensorDeviceClass.WIND_DIRECTION,
),
SensorEntityDescription(
key=TYPE_WINDDIR_AVG2M,
translation_key="wind_direction_average_2m",
native_unit_of_measurement=DEGREE,
device_class=SensorDeviceClass.WIND_DIRECTION,
),
SensorEntityDescription(
key=TYPE_WINDGUSTDIR,
translation_key="wind_gust_direction",
native_unit_of_measurement=DEGREE,
device_class=SensorDeviceClass.WIND_DIRECTION,
),
SensorEntityDescription(
key=TYPE_WINDGUSTMPH,
@@ -662,7 +666,7 @@ SENSOR_DESCRIPTIONS = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AmbientStationConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Ambient PWS sensors based on a config entry."""
ambient = entry.runtime_data
@@ -13,7 +13,7 @@ from homeassistant.components.sensor import (
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@@ -94,7 +94,7 @@ GENERAL_SENSORS = [
async def async_setup_entry(
hass: HomeAssistant,
entry: AnalyticsInsightsConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Initialize the entries."""
@@ -8,7 +8,7 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntityDescription,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import MOTION_ACTIVE
from .coordinator import AndroidIPCamConfigEntry, AndroidIPCamDataUpdateCoordinator
@@ -24,7 +24,7 @@ BINARY_SENSOR_DESCRIPTION = BinarySensorEntityDescription(
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AndroidIPCamConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the IP Webcam sensors from config entry."""
@@ -11,7 +11,7 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import DOMAIN
from .coordinator import AndroidIPCamConfigEntry, AndroidIPCamDataUpdateCoordinator
@@ -20,7 +20,7 @@ from .coordinator import AndroidIPCamConfigEntry, AndroidIPCamDataUpdateCoordina
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AndroidIPCamConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the IP Webcam camera from config entry."""
filter_urllib3_logging()
@@ -15,7 +15,7 @@ from homeassistant.components.sensor import (
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from .coordinator import AndroidIPCamConfigEntry, AndroidIPCamDataUpdateCoordinator
@@ -119,7 +119,7 @@ SENSOR_TYPES: tuple[AndroidIPWebcamSensorEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AndroidIPCamConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the IP Webcam sensors from config entry."""
@@ -11,7 +11,7 @@ from pydroid_ipcam import PyDroidIPCam
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AndroidIPCamConfigEntry, AndroidIPCamDataUpdateCoordinator
from .entity import AndroidIPCamBaseEntity
@@ -112,7 +112,7 @@ SWITCH_TYPES: tuple[AndroidIPWebcamSwitchEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AndroidIPCamConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the IP Webcam switches from config entry."""
@@ -21,7 +21,7 @@ from homeassistant.const import ATTR_COMMAND
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util.dt import utcnow
from . import AndroidTVConfigEntry
@@ -65,7 +65,7 @@ ANDROIDTV_STATES = {
async def async_setup_entry(
hass: HomeAssistant,
entry: AndroidTVConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Android Debug Bridge entity."""
device_class = entry.runtime_data.aftv.DEVICE_CLASS
+4 -2
View File
@@ -12,7 +12,7 @@ from homeassistant.components.remote import ATTR_NUM_REPEATS, RemoteEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ServiceValidationError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import CONF_TURN_OFF_COMMAND, CONF_TURN_ON_COMMAND, DOMAIN
from .entity import AndroidTVEntity, adb_decorator
@@ -21,7 +21,9 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the AndroidTV remote from a config entry."""
async_add_entities([AndroidTVRemote(entry)])
@@ -18,7 +18,7 @@ from homeassistant.components.media_player import (
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AndroidTVRemoteConfigEntry
from .const import CONF_APP_ICON, CONF_APP_NAME
@@ -30,7 +30,7 @@ PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AndroidTVRemoteConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Android TV media player entity based on a config entry."""
api = config_entry.runtime_data
@@ -18,7 +18,7 @@ from homeassistant.components.remote import (
RemoteEntityFeature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AndroidTVRemoteConfigEntry
from .const import CONF_APP_NAME
@@ -30,7 +30,7 @@ PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AndroidTVRemoteConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Android TV remote entity based on a config entry."""
api = config_entry.runtime_data
+3 -3
View File
@@ -15,7 +15,7 @@ from homeassistant.components.sensor import (
)
from homeassistant.const import UnitOfTemperature, UnitOfTime
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from .coordinator import AnovaConfigEntry, AnovaCoordinator
@@ -97,7 +97,7 @@ SENSOR_DESCRIPTIONS: list[AnovaSensorEntityDescription] = [
async def async_setup_entry(
hass: HomeAssistant,
entry: AnovaConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up Anova device."""
anova_data = entry.runtime_data
@@ -108,7 +108,7 @@ async def async_setup_entry(
def setup_coordinator(
coordinator: AnovaCoordinator,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up an individual Anova Coordinator."""
@@ -16,7 +16,7 @@ from homeassistant.const import CONF_MAC, CONF_MODEL
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AnthemavConfigEntry
from .const import ANTHEMAV_UPDATE_SIGNAL, DOMAIN, MANUFACTURER
@@ -27,7 +27,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AnthemavConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up entry."""
name = config_entry.title
@@ -10,7 +10,7 @@
},
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"cannot_receive_deviceinfo": "Failed to retreive MAC Address. Make sure the device is turned on"
"cannot_receive_deviceinfo": "Failed to retrieve MAC Address. Make sure the device is turned on"
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
@@ -1,16 +1,23 @@
"""Conversation support for Anthropic."""
from collections.abc import Callable
from collections.abc import AsyncGenerator, Callable
import json
from typing import Any, Literal, cast
from typing import Any, Literal
import anthropic
from anthropic import AsyncStream
from anthropic._types import NOT_GIVEN
from anthropic.types import (
InputJSONDelta,
Message,
MessageParam,
MessageStreamEvent,
RawContentBlockDeltaEvent,
RawContentBlockStartEvent,
RawContentBlockStopEvent,
TextBlock,
TextBlockParam,
TextDelta,
ToolParam,
ToolResultBlockParam,
ToolUseBlock,
@@ -24,7 +31,7 @@ from homeassistant.const import CONF_LLM_HASS_API, MATCH_ALL
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import chat_session, device_registry as dr, intent, llm
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AnthropicConfigEntry
from .const import (
@@ -46,7 +53,7 @@ MAX_TOOL_ITERATIONS = 10
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AnthropicConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up conversation entities."""
agent = AnthropicConversationEntity(config_entry)
@@ -109,7 +116,7 @@ def _convert_content(chat_content: conversation.Content) -> MessageParam:
type="tool_use",
id=tool_call.id,
name=tool_call.tool_name,
input=json.dumps(tool_call.tool_args),
input=tool_call.tool_args,
)
for tool_call in chat_content.tool_calls or ()
],
@@ -124,6 +131,66 @@ def _convert_content(chat_content: conversation.Content) -> MessageParam:
raise ValueError(f"Unexpected content type: {type(chat_content)}")
async def _transform_stream(
result: AsyncStream[MessageStreamEvent],
) -> AsyncGenerator[conversation.AssistantContentDeltaDict]:
"""Transform the response stream into HA format.
A typical stream of responses might look something like the following:
- RawMessageStartEvent with no content
- RawContentBlockStartEvent with an empty TextBlock
- RawContentBlockDeltaEvent with a TextDelta
- RawContentBlockDeltaEvent with a TextDelta
- RawContentBlockDeltaEvent with a TextDelta
- ...
- RawContentBlockStopEvent
- RawContentBlockStartEvent with ToolUseBlock specifying the function name
- RawContentBlockDeltaEvent with a InputJSONDelta
- RawContentBlockDeltaEvent with a InputJSONDelta
- ...
- RawContentBlockStopEvent
- RawMessageDeltaEvent with a stop_reason='tool_use'
- RawMessageStopEvent(type='message_stop')
"""
if result is None:
raise TypeError("Expected a stream of messages")
current_tool_call: dict | None = None
async for response in result:
LOGGER.debug("Received response: %s", response)
if isinstance(response, RawContentBlockStartEvent):
if isinstance(response.content_block, ToolUseBlock):
current_tool_call = {
"id": response.content_block.id,
"name": response.content_block.name,
"input": "",
}
elif isinstance(response.content_block, TextBlock):
yield {"role": "assistant"}
elif isinstance(response, RawContentBlockDeltaEvent):
if isinstance(response.delta, InputJSONDelta):
if current_tool_call is None:
raise ValueError("Unexpected delta without a tool call")
current_tool_call["input"] += response.delta.partial_json
elif isinstance(response.delta, TextDelta):
LOGGER.debug("yielding delta: %s", response.delta.text)
yield {"content": response.delta.text}
elif isinstance(response, RawContentBlockStopEvent):
if current_tool_call:
yield {
"tool_calls": [
llm.ToolInput(
id=current_tool_call["id"],
tool_name=current_tool_call["name"],
tool_args=json.loads(current_tool_call["input"]),
)
]
}
current_tool_call = None
class AnthropicConversationEntity(
conversation.ConversationEntity, conversation.AbstractConversationAgent
):
@@ -206,58 +273,30 @@ class AnthropicConversationEntity(
# To prevent infinite loops, we limit the number of iterations
for _iteration in range(MAX_TOOL_ITERATIONS):
try:
response = await client.messages.create(
stream = await client.messages.create(
model=options.get(CONF_CHAT_MODEL, RECOMMENDED_CHAT_MODEL),
messages=messages,
tools=tools or NOT_GIVEN,
max_tokens=options.get(CONF_MAX_TOKENS, RECOMMENDED_MAX_TOKENS),
system=system.content,
temperature=options.get(CONF_TEMPERATURE, RECOMMENDED_TEMPERATURE),
stream=True,
)
except anthropic.AnthropicError as err:
raise HomeAssistantError(
f"Sorry, I had a problem talking to Anthropic: {err}"
) from err
LOGGER.debug("Response %s", response)
messages.append(_message_convert(response))
text = "".join(
messages.extend(
[
content.text
for content in response.content
if isinstance(content, TextBlock)
_convert_content(content)
async for content in chat_log.async_add_delta_content_stream(
user_input.agent_id, _transform_stream(stream)
)
]
)
tool_inputs = [
llm.ToolInput(
id=tool_call.id,
tool_name=tool_call.name,
tool_args=cast(dict[str, Any], tool_call.input),
)
for tool_call in response.content
if isinstance(tool_call, ToolUseBlock)
]
tool_results = [
ToolResultBlockParam(
type="tool_result",
tool_use_id=tool_response.tool_call_id,
content=json.dumps(tool_response.tool_result),
)
async for tool_response in chat_log.async_add_assistant_content(
conversation.AssistantContent(
agent_id=user_input.agent_id,
content=text,
tool_calls=tool_inputs or None,
)
)
]
if tool_results:
messages.append(MessageParam(role="user", content=tool_results))
if not tool_inputs:
if not chat_log.unresponded_tool_results:
break
response_content = chat_log.content[-1]
+2 -2
View File
@@ -13,7 +13,7 @@ from homeassistant.components.sensor import (
)
from homeassistant.const import PERCENTAGE, UnitOfEnergy
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import (
AOSmithConfigEntry,
@@ -43,7 +43,7 @@ STATUS_ENTITY_DESCRIPTIONS: tuple[AOSmithStatusSensorEntityDescription, ...] = (
async def async_setup_entry(
hass: HomeAssistant,
entry: AOSmithConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up A. O. Smith sensor platform."""
data = entry.runtime_data
@@ -15,7 +15,7 @@ from homeassistant.components.water_heater import (
from homeassistant.const import UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import AOSmithConfigEntry, AOSmithStatusCoordinator
from .entity import AOSmithStatusEntity
@@ -45,7 +45,7 @@ DEFAULT_OPERATION_MODE_PRIORITY = [
async def async_setup_entry(
hass: HomeAssistant,
entry: AOSmithConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up A. O. Smith water heater platform."""
data = entry.runtime_data
@@ -9,7 +9,7 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntityDescription,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .coordinator import APCUPSdConfigEntry, APCUPSdCoordinator
@@ -27,7 +27,7 @@ _VALUE_ONLINE_MASK: Final = 0b1000
async def async_setup_entry(
hass: HomeAssistant,
config_entry: APCUPSdConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up an APCUPSd Online Status binary sensor."""
coordinator = config_entry.runtime_data
+2 -2
View File
@@ -21,7 +21,7 @@ from homeassistant.const import (
UnitOfTime,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import LAST_S_TEST
@@ -406,7 +406,7 @@ INFERRED_UNITS = {
async def async_setup_entry(
hass: HomeAssistant,
config_entry: APCUPSdConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the APCUPSd sensors from config entries."""
coordinator = config_entry.runtime_data
@@ -39,7 +39,7 @@ from homeassistant.components.media_player import (
)
from homeassistant.const import CONF_NAME
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util import dt as dt_util
from . import AppleTvConfigEntry, AppleTVManager
@@ -100,7 +100,7 @@ SUPPORT_FEATURE_MAPPING = {
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AppleTvConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Load Apple TV media player based on a config entry."""
name: str = config_entry.data[CONF_NAME]
+2 -2
View File
@@ -17,7 +17,7 @@ from homeassistant.components.remote import (
)
from homeassistant.const import CONF_NAME
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from . import AppleTvConfigEntry
from .entity import AppleTVEntity
@@ -38,7 +38,7 @@ COMMAND_TO_ATTRIBUTE = {
async def async_setup_entry(
hass: HomeAssistant,
config_entry: AppleTvConfigEntry,
async_add_entities: AddEntitiesCallback,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Load Apple TV remote based on a config entry."""
name: str = config_entry.data[CONF_NAME]

Some files were not shown because too many files have changed in this diff Show More