Compare commits

...

1953 Commits

Author SHA1 Message Date
Paulus Schoutsen
e5c5790768 2023.6.2 (#94621) 2023-06-15 00:19:30 -04:00
Paulus Schoutsen
905bdd0dd5 Bumped version to 2023.6.2 2023-06-14 21:18:40 -04:00
Erik Montnemery
9cbcfca2cd Improve multipan debug logging (#94580) 2023-06-14 21:18:35 -04:00
Chris Talkington
e6b8e4fd48 Fix failed recovery in ipp (#94573) 2023-06-14 21:18:34 -04:00
Chris Talkington
8f437c5833 Fix failed recovery in roku (#94572) 2023-06-14 21:18:33 -04:00
Ian Foster
d28d909114 Fix keyboard_remote for python 3.11 (#94570)
* started work to update keyboard_remote to work with python 3.11

* updated function names

* all checks pass

* fixed asyncio for python 3.11

* cleanup

* Update homeassistant/components/keyboard_remote/__init__.py

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

* Update __init__.py

added:
from __future__ import annotations

* Fix typing

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-14 21:18:32 -04:00
Maciej Bieniek
f67577ebe0 Catch InvalidAuthError in shutdown() method for Shelly gen2 devices (#94563)
* Catch InvalidAuthError in shutdown() method

* Add test

* Revert unwanted change in tests
2023-06-14 21:18:31 -04:00
Franck Nijhof
70d33129d4 Update Home Assistant base image to 2023.06.0 (#94556) 2023-06-14 21:18:29 -04:00
Aaron Bach
a63ce8100e Bump regenmaschine to 2023.06.0 (#94554) 2023-06-14 21:18:28 -04:00
J. Nick Koston
d557c6e43e Bump yalexs-ble to 2.1.18 (#94547) 2023-06-14 21:18:27 -04:00
Raman Gupta
fd0404bb4a Fix entity and device selector TypedDict's (#94510) 2023-06-14 21:18:26 -04:00
Chris Phillips
576cf52573 Bump russound_rio to 1.0.0 (#94500) 2023-06-14 21:17:51 -04:00
mover85
e83f0bb7a5 Revert "Bump pydaikin 2.9.1 (#93635)" (#94469)
Revert to pydaikin 2.9.0
2023-06-14 21:17:08 -04:00
Raman Gupta
fa8e952324 Set default value for endpoint in zwave device automations (#94445)
* Set default value for endpoint in zwave device automations

* add test case
2023-06-14 21:17:07 -04:00
G Johansson
25a4679266 Fix reload service in Command Line (#94436)
* Fix reload in Command Line

* Add read new yaml
2023-06-14 21:17:06 -04:00
G Johansson
f5aa4f5866 Fix manual update for Command Line (#94433)
Manual update command line
2023-06-14 21:17:04 -04:00
Yuxin Wang
0083649e43 Add unit inference for Amps and VA in APCUPSD integration (#94431)
* Add unit inference for Amps and VA

* Rename `init_integration` to `async_init_integration` for better consistency with HA naming style
2023-06-14 21:17:03 -04:00
Sander
2505de35c9 Fix: Xiaomi Miio Fan, delay off countdown unit conversion (#94428) 2023-06-14 21:17:02 -04:00
Christopher Bailey
238eebb0b6 Bump unifiprotect to 4.10.3 (#94416)
* Bump unifiprotect to 4.10.3

* Reqs
2023-06-14 21:17:01 -04:00
Matthias Alphart
4cb30e69ac Update knx-frontend to 2023.6.9.195839 (#94404) 2023-06-14 21:16:19 -04:00
Joost Lekkerkerker
ac00977e57 Abort youtube configuration if user has no channel (#94402)
* Abort configuration if user has no channel

* Clean up

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-14 21:15:21 -04:00
jasonkuster
b2db849798 Fix ZHA binding api to actually return responses (#94388) 2023-06-14 21:15:20 -04:00
Raman Gupta
2c7a176580 Re-add event listeners after Z-Wave server disconnection (#94383)
* Re-add event listeners after Z-Wave server disconnection

* switch order

* Add tests
2023-06-14 21:15:19 -04:00
Matthias Alphart
4dbc408696 Update xknxproject to 3.1.1 (#94375) 2023-06-14 21:14:42 -04:00
Sebastian Muszynski
582fd11a70 Fix deprecated asyncio.wait use with coroutines (#94371) 2023-06-14 21:13:25 -04:00
Jan Bouwhuis
96cb5ff8b0 Fix dep noaa-coops for noaa_tides (#94370)
Bump noaa-coops to 0.1.9
2023-06-14 21:13:23 -04:00
Jafar Atili
6029e23ab7 fix: electrasmart - cast temperature to int in set_temperature (#94368)
fix: cast temperature to int
2023-06-14 21:13:22 -04:00
Jonathan Keljo
3434d74993 Upgrade sisyphus-control to 3.1.3 (#94310) 2023-06-14 21:13:21 -04:00
Nathan Spencer
e091793b6c Bump pylitterbot to 2023.4.2 (#94301) 2023-06-14 21:13:20 -04:00
Glenn Waters
9c8444da0e Bump elkm1-lib to 2.2.5 (#94296)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-14 21:13:19 -04:00
Tom Harris
427f0f4bee Fix issue with Insteon linked devices maintaining current state (#94286)
* Bump pyinsteon

* Update tests
2023-06-14 21:13:18 -04:00
FFT
95528f875e Change pyoppleio to pyoppleio-legacy (#88050)
* Change pyoppleio to pyoppleio-310 (#75268)

* [m] change opple component's dependency to a new working one
2023-06-14 21:13:17 -04:00
Paulus Schoutsen
a5f86bff45 2023.6.1 (#94288) 2023-06-08 14:57:37 -04:00
Paulus Schoutsen
d991970754 Bumped version to 2023.6.1 2023-06-08 13:39:33 -04:00
Tom Harris
d745b44180 Fix Insteon startup for users with X10 devices (#94277) 2023-06-08 13:39:10 -04:00
Tom Harris
602fcd6b1b Restructure Insteon start-up (#92818)
* Restructure startup

* Code review

* Further typing

* Fix circular import
2023-06-08 13:39:09 -04:00
Franck Nijhof
b39b0a960e Fix repair issue about no yaml for config entries (#94271) 2023-06-08 13:35:08 -04:00
Paulus Schoutsen
40bb796f03 Fix default value when logger used (#94269) 2023-06-08 13:28:54 -04:00
Christopher Bailey
2801ba6cad Bump unifiprotect to 4.10.2 (#94263) 2023-06-08 13:28:52 -04:00
Paul Bottein
5da0ef36ea Update frontend to 20230608.0 (#94256) 2023-06-08 13:28:51 -04:00
Joost Lekkerkerker
d861292900 Retrieve friends in an async manner in Lastfm (#94255) 2023-06-08 13:28:50 -04:00
Jc2k
a3fda43c64 Bump aiohomekit to 2.6.5 (fixes python 3.11 regression) (#94245) 2023-06-08 13:28:49 -04:00
Joost Lekkerkerker
8705a26a1a Catch exception when user has no lastfm friends (#94235) 2023-06-08 13:28:48 -04:00
jan iversen
2b1c45c28c Solve wrong return code from modbus. (#94234) 2023-06-08 13:28:47 -04:00
Jan Bouwhuis
0cf3825183 Fix imap crash on email without subject (#94230) 2023-06-08 13:28:46 -04:00
Kostas Chatzikokolakis
413e1c97d7 Bump pulsectl to 23.5.2 (#94227) 2023-06-08 13:28:45 -04:00
Joost Lekkerkerker
3b27a3aabf Bump python-opensky to 0.0.9 (#94224) 2023-06-08 13:28:44 -04:00
Joost Lekkerkerker
4509e13ceb Bump python-opensky (#93916) 2023-06-08 13:28:43 -04:00
Álvaro Fernández Rojas
33bf8c600b Update aioairzone-cloud to v0.1.8 (#94223) 2023-06-08 13:27:46 -04:00
Jan-Philipp Benecke
b508875f17 Set httpx log level to warning (#94217)
Set log level of httpx to warning
2023-06-08 13:27:45 -04:00
Allen Porter
ac963a2b6e Require pydantic 1.10.8 or higher (#94208)
* Requied pydantic 1.10.9 or higher

* Simplify constraint to 2.0

* Drop constraint by one patch release to 1.10.8 or higher

* Add package constraints to gen requirements script
2023-06-08 13:27:43 -04:00
James Connor
13029cf26f Fix ambiclimate for Python 3.11 (#94203)
Fix ambiclimate python 3.11 break
2023-06-08 13:27:42 -04:00
Paulus Schoutsen
f39a6b96ff Rename Local Media to My Media (#94201)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-08 13:27:41 -04:00
Mick Vleeshouwer
c6a17d6832 Bump pyoverkiz to 1.8.0 (#94176) 2023-06-08 13:27:40 -04:00
Joost Lekkerkerker
74c0552a12 Fix Abode unit of measurement (#94168)
Change unit of measurement to HA const
2023-06-08 13:27:38 -04:00
Justin Vanderhooft
f24b514c9a Bump melnor-bluetooth to fix a timezone issue (#94159) 2023-06-08 13:27:37 -04:00
Erik Montnemery
e1c47fdb61 Fix OTBR reset (#94157) 2023-06-08 13:27:36 -04:00
j4n-e4t
93baf24394 Add error handling to input_select integration (#93940) 2023-06-08 12:27:23 -04:00
Franck Nijhof
a4e236d0b9 2023.6.0 (#94158) 2023-06-07 15:39:47 +02:00
Franck Nijhof
421fa5b035 Bumped version to 2023.6.0 2023-06-07 13:49:03 +02:00
Erik Montnemery
3d3fecbd23 Disable google assistant local control of climate entities (#94153) 2023-06-07 13:48:20 +02:00
Erik Montnemery
468be632fd Add debug logs to cloud migration (#94151) 2023-06-07 13:48:17 +02:00
Bram Kragten
74ccdcda68 Update frontend to 20230607.0 (#94150) 2023-06-07 13:48:14 +02:00
Erik Montnemery
5cc61acfb2 Fix migration of Google Assistant cloud settings (#94148) 2023-06-07 13:48:11 +02:00
Christopher Bailey
02d55a8e49 Bump unifiprotect to 4.10.1 (#94141) 2023-06-07 13:48:06 +02:00
Paulus Schoutsen
f4e3ef6b51 Bumped version to 2023.6.0b6 2023-06-06 22:00:28 -04:00
Paulus Schoutsen
7740539df0 Bump waqiasync to 1.1.0 (#94136) 2023-06-06 22:00:20 -04:00
Christopher Bailey
b077bf9b86 Fix multiple smart detects firing at once for UniFi Protect (#94133)
* Fix multiple smart detects firing at once

* Tweak

* Clean up logging. Linting

* Linting
2023-06-06 22:00:19 -04:00
Joakim Plate
23f2898836 Correct zha device classes for voc and pm25 (#94130)
Correct zha device classes
2023-06-06 22:00:18 -04:00
Shay Levy
e6638ca356 Remove goalfeed integration (#94129) 2023-06-06 21:59:32 -04:00
Jean-François Roy
93d52d8835 Bump aiobafi6 to 0.8.2 (#94125) 2023-06-06 21:58:09 -04:00
puddly
26e08abb9a Revert "Increase Zigbee command retries (#93877)" (#94123) 2023-06-06 21:58:08 -04:00
J. Nick Koston
6a573b507e Remove mark_read service from persistent_notification (#94122)
* Remove mark_read from persistent_notification

Nothing on the frontend uses this, and the service is not documented

There is not much point in keeping this as the notifications
are no longer stored in the state machine

* adjust

* adjust
2023-06-06 21:58:07 -04:00
Bram Kragten
2b39550e55 Update frontend to 20230606.0 (#94119) 2023-06-06 21:58:06 -04:00
J. Nick Koston
0e50baf007 Verify persistant notifications can be dismissed by the id they are created with (#94112) 2023-06-06 21:58:05 -04:00
Luke
286de1f051 Bump python-roborock to 23.4 (#94111)
* bump to 23.0

* bump to 23.4
2023-06-06 21:58:04 -04:00
Luke
3e23996247 Bump Roborock to 0.21.0 (#94035)
bump to 21.0
2023-06-06 21:58:03 -04:00
Álvaro Fernández Rojas
7a658117bb Update aioairzone to v0.6.3 and fix issue with latest firmware update (#94100) 2023-06-06 21:56:36 -04:00
Luke
49388eab3a Add diagnostics to Roborock (#94099)
* Add diagnostics

* Update homeassistant/components/roborock/models.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* adds snapshot

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-06 21:56:35 -04:00
Justin Vanderhooft
e6fcc6b73c fix: Bump melnor-bluetooth to fix deadlock (#94098) 2023-06-06 21:56:33 -04:00
Robert Svensson
e00012289d Bump aiounifi to v48 - Fix fail to initialise due to board_rev not exist (#94093) 2023-06-06 21:56:32 -04:00
Luke
f373f1abd5 Add missing translation keys for Roborock mop intensity (#94088) 2023-06-06 21:56:31 -04:00
puddly
2c43672a8a Include port info in the ZHA websocket settings response (#93934) 2023-06-06 21:56:30 -04:00
Paulus Schoutsen
7a6327d7e2 Bumped version to 2023.6.0b5 2023-06-05 16:13:07 -04:00
G Johansson
ee8f63b9c9 Fix reload service in Command Line (#94085)
Fix multi platform reload service in command line
2023-06-05 16:12:59 -04:00
Bram Kragten
28e0f5e104 Update frontend to 20230605.0 (#94083)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-05 16:12:58 -04:00
Michael Hansen
eb036af410 Bump intents to 2023.6.5 (#94077) 2023-06-05 16:12:57 -04:00
Luke
4bb6fec1d6 Don't add Roborock switches if it is not supported (#94069)
* don't add switches if it is not supported

* don't create entity unless if it is valid

* Raise on other exceptions

* rework valid_enties
2023-06-05 16:12:56 -04:00
J. Nick Koston
dbd5511e5e Bump zeroconf to 0.64.0 (#94052) 2023-06-05 16:12:55 -04:00
Raman Gupta
580065e946 Fix zwave_js.update entity restore logic (#94043) 2023-06-05 16:12:54 -04:00
Pascal Reeb
4a31cb0ad8 Update pynuki to 1.6.2 (#94041)
chore(component/nuki): update pynuki to 1.6.2
2023-06-05 16:12:53 -04:00
G Johansson
5a63079c80 Remove update_before_add from binary_sensor in Command Line (#94040)
Remove update_before_add
2023-06-05 16:12:52 -04:00
tronikos
902bd521d2 Android TV Remote: Abort zeroconf if mac address is missing (#94026)
Abort zeroconf if mac address is missing
2023-06-05 16:12:51 -04:00
Ernst Klamer
aff4d537a7 Bump xiaomi-ble to 0.17.2 (#94011)
Bump xiaomi-ble

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-05 16:12:49 -04:00
Joost Lekkerkerker
4f00cc9faa Show the sensor state using the coordinatordata instead of initial data (#94008)
* Show the sensor state using the coordinatordata instead of initial data

* Add test

* Remove part
2023-06-05 16:12:48 -04:00
Joost Lekkerkerker
2a99fea1de Add video id to youtube sensor state attributes (#93668)
* Add video id to state attributes

* Make extra state attributes not optional

* Revert "Make extra state attributes not optional"

This reverts commit d2f9e936c8.
2023-06-05 16:12:48 -04:00
tronikos
9aeba6221b Fix error in tibber while fetching latest statistics (#93998) 2023-06-05 15:55:59 -04:00
Paulus Schoutsen
bb2a89f065 Bumped version to 2023.6.0b4 2023-06-02 23:35:41 -04:00
Robert Hillis
f92298c6fc Catch Google Sheets api error (#93979) 2023-06-02 23:35:36 -04:00
G Johansson
6ff55a6505 Add scan interval to Command Line (#93752)
* Add scan interval

* Handle previous not complete

* Fix faulty text

* Add tests

* lingering

* Cool down

* Fix tests
2023-06-02 23:35:35 -04:00
Paulus Schoutsen
32f7f39eca Bumped version to 2023.6.0b3 2023-06-02 08:46:29 -04:00
Raman Gupta
177cd0f697 Improve logic for zwave_js.lock.is_locked attr (#93947) 2023-06-02 08:45:56 -04:00
Raman Gupta
3d4ba15a95 Make Z-Wave device IBT4ZWAVE discoverable as a cover (#93946)
* Make Z-Wave device IBT4ZWAVE discoverable as a cover

* Test device class
2023-06-02 08:45:55 -04:00
J. Nick Koston
9dd3e6cab8 Bump aiohomekit to 2.6.4 (#93943)
changelog: https://github.com/Jc2k/aiohomekit/compare/2.6.3...2.6.4

mostly additional logging to help track down #93891
2023-06-02 08:45:54 -04:00
J. Nick Koston
cc02d1dfc4 Fix august aiohttp session being closed out from under it (#93942)
* Fix august aiohttp session being closed out from under it

fixes #93941

* Fix august aiohttp session being closed out from under it

fixes #93941

* Fix august aiohttp session being closed out from under it

fixes #93941
2023-06-02 08:45:53 -04:00
automaton82
3d2ad2fd85 Update netdata to 1.1.0, set longer timeout (#93937) 2023-06-02 08:45:52 -04:00
Chris Talkington
d9149407d8 Update pyipp to 0.13.0 (#93886) 2023-06-02 08:45:51 -04:00
Diogo Gomes
964af88c21 Make Riemann sum sensors restore last valid state (#93674)
* keep last valid state

* keep last valid state

* typo

* increase coverage

* better error handling

* debug messages

* increase coverage

* remove random log

* don't expose last_valid_state as an attribute
2023-06-02 08:45:50 -04:00
Tudor Sandu
e58ea00ce6 Fix states not being translated in voice assistants (#93572)
Fix states not being translated
2023-06-02 08:45:49 -04:00
Paulus Schoutsen
a98094eda6 Bumped version to 2023.6.0b2 2023-06-01 15:07:11 -04:00
J. Nick Koston
3317ea7d95 Bump pyunifiprotect to 4.9.1 (#93931) 2023-06-01 15:07:06 -04:00
J. Nick Koston
4e19843152 Bump python-onvif-zeep to 3.1.9 (#93930) 2023-06-01 15:07:05 -04:00
J. Nick Koston
5ac3bb9e9b Fix onvif cameras that use basic auth with no password (#93928) 2023-06-01 15:07:04 -04:00
Bram Kragten
358700af4e Update frontend to 20230601.1 (#93927) 2023-06-01 15:07:03 -04:00
J. Nick Koston
50bd9e9fdd Make RestoreStateData.async_get_instance backwards compatible (#93924) 2023-06-01 15:07:02 -04:00
Joakim Plate
7f6c0fdd4c Raise exception instead of hide in logs on zha write (#93571)
Raise exception instead of hide in logs

Write request that failed parsing of data would fail,
yet display as successful in the gui.
2023-06-01 15:07:01 -04:00
Sebastian Heiden
44274e5323 Fix LaMetric Config Flow for SKY (#93483)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-01 15:07:00 -04:00
Erik Montnemery
32571af131 Add silabs_multiprotocol platform (#92904)
* Add silabs_multiprotocol platform

* Add new files

* Add ZHA tests

* Prevent ZHA from creating database during tests

* Add delay parameter to async_change_channel

* Add the updated dataset to the dataset store

* Allow MultipanProtocol.async_change_channel to return a task

* Notify user about the duration of migration

* Update tests
2023-06-01 15:06:59 -04:00
Paulus Schoutsen
65a9bd661d Bumped version to 2023.6.0b1 2023-05-31 21:17:59 -04:00
Paulus Schoutsen
fb50f0d875 Bump frontend to 20230601.0 (#93884) 2023-05-31 21:17:51 -04:00
puddly
d6f2e1cdff Increase Zigbee command retries (#93877)
* Enable retries for requests

* Update unit tests

* Account for fewer group retries in unit tests
2023-05-31 21:17:50 -04:00
Álvaro Fernández Rojas
d10dd54d88 Update aioairzone-cloud to v0.1.7 (#93871)
* Update aioairzone-cloud to v0.1.7

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: fix copy&paste description

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-31 21:17:49 -04:00
Diogo Gomes
22ed622152 Delay filter integration until after HA has started (#91034)
* delay filter start

* Update homeassistant/components/filter/sensor.py

* Update homeassistant/components/filter/sensor.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 21:17:48 -04:00
Diogo Gomes
408f0bdd6b Always update Filter sensors attr on new_state (#89096)
* always update attr

* reset filter on unit change
2023-05-31 21:17:47 -04:00
Franck Nijhof
ab2e891e91 Bumped version to 2023.6.0b0 2023-05-31 17:55:47 +02:00
Raman Gupta
cb616cdf4e Move Z-Wave refresh value service out of task (#93866) 2023-05-31 11:52:01 -04:00
Bram Kragten
22e7c9cc76 Update frontend to 20230531.0 (#93862) 2023-05-31 17:23:13 +02:00
Matthias Alphart
7b7ea24303 Update knx-frontend to 2023.5.31.141540 (#93864) 2023-05-31 17:20:53 +02:00
Raman Gupta
f1552304e1 Give zwave_js platinum quality score (#93845) 2023-05-31 17:15:44 +02:00
Raman Gupta
bd8c88f51b Add error handling for all zwave_js service calls (#93846)
* Add error handling for all service calls

* Switch siren to use internal function

* Remove failing checks

* Revert change to poll service, add comments, and add additional error handling

* Add error handling for ping and refresh + review comment + add tests

* Add test for statistics entity refresh
2023-05-31 11:09:01 -04:00
Paulus Schoutsen
927b59fe5a Simplify get pipeline method (#93865) 2023-05-31 10:06:03 -05:00
Justin Vanderhooft
4bade86dcc Add time component to Melnor Bluetooth integration (#93652)
* Add time component to Melnor Bluetooth integration

* Apply suggestions from code review

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 11:00:52 -04:00
c0ffeeca7
c3a3ddcfa4 Standardize spelling of TTS and STT (#93857)
* Standardize spelling of TTS and STT

* Apply suggestions from code review

* Update homeassistant/components/tts/media_source.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 11:00:19 -04:00
Mark Kennedy
b03dbeaed5 Block legacy get-mac in preference of getmac (#87712)
Co-authored-by: GnatorX <garvinpang@protonmail.com>
2023-05-31 16:57:45 +02:00
Diego Rodríguez Royo
3cf8ae64c8 Matter cover position improvements (#92278) 2023-05-31 16:08:01 +02:00
Dominik
c8c368340d Glances: Improve performance (#93852)
* Improve performance

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-31 09:17:23 -04:00
Luke
1d7498378e Add Status indicator light switch to Roborock (#93842)
add status indicator light switch
2023-05-31 14:26:39 +02:00
Yuxin Wang
676b6ab706 Add support for "days" unit for STESTI sensor in APCUPSD integration (#93844)
Add a test case for self test interval
2023-05-31 14:25:46 +02:00
Álvaro Fernández Rojas
21771457d1 Use library constants for Airzone Cloud diagnostics (#93858)
airzone_cloud: diagnostics: use constants from library

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-31 14:22:53 +02:00
David F. Mulcahey
0f4dec534c Bump ZHA quirks (#93860) 2023-05-31 14:14:49 +02:00
Raman Gupta
b3990d48d2 Improve Z-Wave support for Ultraviolet multilevel sensor values (#93848)
Improve support for Ultraviolet multilevel sensor values
2023-05-31 13:31:02 +02:00
Raman Gupta
1eb1ea08b0 Add support for Energy Production CC sensors (#93839) 2023-05-31 13:28:07 +02:00
Marc Mueller
c72477811e Fix event typing (#93859) 2023-05-31 12:33:56 +02:00
G Johansson
f7b15dbf84 Fix Timer change service (#93469) 2023-05-31 12:00:45 +02:00
Jan Bouwhuis
fa4d9b2c08 Rework mqtt climate platform to simplify implementation water_heater platform (#93751)
* Rework to simplify water_heater platform

* Remove unused type hints

* Split shared and specific subscriptions

* Convert to abstract class
2023-05-31 11:12:58 +02:00
Erik Montnemery
59c6220b7c Subscribe to device registry changes from entities (#93601)
* Subscribe to device registry changes from entities

* Use async_track_device_registry_updated_event

* Fix unsubscribe

* Fix logic, add tests
2023-05-31 11:01:55 +02:00
Raman Gupta
204215e0f2 Cleanup unnecessary pylance warnings (#93849) 2023-05-31 10:15:21 +02:00
Erik Montnemery
b5f5e1c8c3 Add empty config schema to integrations t-z (#93853) 2023-05-31 10:13:26 +02:00
Erik Montnemery
ef4dea07cd Improve no-yaml warning (#93851) 2023-05-31 10:11:02 +02:00
Erik Montnemery
24ed53cebe Drop incorrect CONFIG_SCHEMA from the homeassistant integration (#93850) 2023-05-31 10:10:44 +02:00
G Johansson
3f3b833034 Add issue when integration key YAML not supported (#93807)
* Add issue when integration key YAML not supported

* Fix feedback

* Fix review

* Update homeassistant/components/homeassistant/strings.json

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

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-05-31 09:56:33 +02:00
Jan Bouwhuis
661aedde90 Remove MQTT platform schema warnings (#93785) 2023-05-31 09:02:48 +02:00
Raman Gupta
4119d3198a Support zwave config parameters not on endpoint 0 (#93383)
* Support zwave config parameters not on endpoint 0

* Update device automation logic

* Make endpoint required

* Update homeassistant/components/zwave_js/services.py

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

* Update homeassistant/components/zwave_js/services.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-30 23:52:12 -04:00
Luke
8244887bb3 Rename confusing device info in Roborock (#93843)
rename confusing device info
2023-05-31 05:33:18 +02:00
Teemu R
23c5e60be0 Swallow error 40000 for songpal power on/off (#80563)
* Swallow error 40000 for songpal power on/off

* Move ERROR_REQUEST_RETRY to consts

* Add tests for the swallow exception behavior

* Update tests/components/songpal/test_media_player.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-30 22:58:41 -04:00
Luke
81561d4d3e Add non coordinated Entity to Roborock (#93841)
switch to non coordinator entity
2023-05-30 22:58:27 -04:00
Raman Gupta
8cd8355ab1 Bump zwave-js-server-python to 0.49.0 (#93835)
* Bump zwave-js-server-python to 0.49.0

* fix tests
2023-05-30 22:40:55 -04:00
leranp
4a3f341444 Language codes for Hebrew (#93681)
* Language codes for Hebrew

There is 2 optional code for Hebrew:
he-IL is the new code
iw-IL is the old code , the google cloud STT for example is using the old code (iw)

* Update language.py

* Update test_language.py

* Update test_language.py

* Update test_language.py

* Simplify duplicate language check

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-05-30 22:27:32 -04:00
mkmer
bfec3d68dd Calculate _attr_native_value when no restore state and appliance is running in Whirlpool (#88559)
* Initialize _attr_native_value when running

* Fix return type on update_sensor_state()
move init at startup if _attr_native_value is None

* allow update _attr_native_value when running and none
2023-05-30 21:48:39 -04:00
J. Nick Koston
fba826ae9e Migrate restore_state helper to use registry loading pattern (#93773)
* Migrate restore_state helper to use registry loading pattern

As more entities have started using restore_state over time, it
has become a startup bottleneck as each entity being added is
creating a task to load restore state data that is already loaded
since it is a singleton

We now use the same pattern as the registry helpers

* fix refactoring error -- guess I am tired

* fixes

* fix tests

* fix more

* fix more

* fix zha tests

* fix zha tests

* comments

* fix error

* add missing coverage

* s/DATA_RESTORE_STATE_TASK/DATA_RESTORE_STATE/g
2023-05-30 20:48:17 -05:00
starkillerOG
b91c6911d9 Reolink autotrack streams for TrackMix and high/low resolution snapshots (#90591)
* Add auto track stream for Trackmix connected to NVR

* Enable autotracking stream by default

* Add snapshot high/low resolution

* Improve naming

* fix snapshots camera's not beeing added

* keep unique ID the same

* fix styling
2023-05-30 21:42:58 -04:00
Emory Penney
9eac0458dd Obihai to have common unique_ids with DHCP or without (#91239)
* DHCPInfo and get_mac_address case mismatch

* Switch to format_mac

* Run black
2023-05-30 21:40:59 -04:00
Dominik
f6d3b0618e Glances: Add error handling for invalid sensor data (#93542)
* Set sensor to Unavailable
when native_value is invalid

* Add unit tests for sensors
2023-05-30 21:35:33 -04:00
G Johansson
ac8d8dccd2 Add translation for Trafikverket Weatherstation sensor (#87315)
* Trafikverket weatherstation translate sensor

* Fix enums
2023-05-30 21:25:31 -04:00
G Johansson
6736ed67ba Translate config flow for sensor measurement option in group (#87374)
* Translate config flow

* reset en

* Delete en.json
2023-05-30 21:23:47 -04:00
G Johansson
5e1c9ba80d Translate entity names for Yale Smart Living (#93560) 2023-05-30 21:22:11 -04:00
J. Nick Koston
466eec2f04 Add a debounce to ld2410 to prevent it from overwhelming the state machine with many devices (#93819)
* Add a debounce to ld2410 to prevent it from overwhelming the state machine

fixes #86665

* set time on debounce
2023-05-30 21:13:49 -04:00
Luke
049582ec50 Add Switch platform to Roborock (#93833)
* init

* add switch platform

* remove stale comments

* remove stale list

* set entity category to config
2023-05-30 21:10:28 -04:00
Jan Bouwhuis
3a7f9ab57d Remove mqtt sensor support for last_reset_topic (#93792)
* Remove mqtt sensor support for `last_reset_topic`

* Add cases for empty last reset messages
2023-05-30 21:07:07 -04:00
andarotajo
d421a51576 Add coordinator to dwd_weather_warnings (#93720)
* Add data coordinator

* Specify coordinator data type

* Apply code review changes
2023-05-30 20:22:27 -04:00
J. Nick Koston
3186ddb095 Speed up setting up event trackers (#93823)
noticed in https://github.com/home-assistant/core/pull/93601 that
the cost of creating the function in the closure was a bit expensive
since we do it once per entity
2023-05-30 20:12:52 -04:00
J. Nick Koston
9f0d3bfce8 Use ReadOnlyDict for entity registry options (#93824)
* Use ReadOnlyDict for entity registry options

While reviewing #93601 it was noticed this was slow at startup
https://github.com/home-assistant/core/pull/93601#issuecomment-1568958280

This is a first pass attempt to improve the performance

* fix tests
2023-05-30 20:11:39 -04:00
Stefan Agner
31e217a11e Update iotawattpy to use our own fork (#93830)
Unfortunately iotawattpy got dormant. Use our fork hosted at in the
[home-assistant-libs/iotawattpy](https://github.com/home-assistant-libs/iotawattpy)
repository and available on PyPI as ha-iotawatt instead.

The first release of the fork also contains a fix for issue #82869.
2023-05-30 20:03:21 -04:00
Yuxin Wang
0653aed49f Directly check string representation of sensor states in APCUPSD tests (#93783)
* Directly check the string representation of sensor states

* Fix expected state value for sensor.ups_nominal_output_power
2023-05-30 20:01:05 -04:00
Tudor Sandu
fe472e6c5b Fix error if a custom_sentences file is empty (#93530)
* Fix #93528

* Log warning file is invalid

* More explicit log warning message

* Rewrite log message
2023-05-30 19:53:52 -04:00
Jesse Hills
d7d9143a44 Add speech detection and conversation_id to esphome voice assistant (#93578)
* Add speech detection to esphome voice assistant

* Timeout after silence
Ensure events are sent before finish is called

* use va_version 3 instead of ESPHome version

* Convert repeated fixtures to factory

* Add some v3 tests

* Add conversation_id

* Bump aioesphomeapi to 13.8.0

* Fix missed buffering of detected chunk

* Alter log message

* Updates

* Spelling

* Fix return type
2023-05-30 19:49:22 -04:00
starkillerOG
49f10eecaa Fix false reolink ONVIF webhook warning (#91015) 2023-05-30 23:13:08 +02:00
Franck Nijhof
58259f1103 Get nightly intents from new intents-package repo (#93826)
Get nighlty intents from new intents-package repo
2023-05-30 16:10:08 -05:00
Ville Skyttä
c7c4ee13c3 Import util.dt as dt_util in remaining tests, enforce with ruff (#93765)
* Import `util.dt` as `dt_util` in remaining tests, enforce with ruff

* Fix `util.dt` import in pvpc_hourly_pricing tests
2023-05-30 23:30:31 +03:00
Michael Hansen
1dcabae760 Don't skip chunk before speech (#93825) 2023-05-30 22:18:55 +02:00
Michael Hansen
9f4c9f1ce3 Bump intents to 2023.5.30 (#93822) 2023-05-30 22:11:08 +02:00
Mike Degatano
c25b26214b Add docker config repair for supervisor issue (#93820) 2023-05-30 22:08:45 +02:00
Raman Gupta
05c3d8bb37 Add zwave_js node statistics sensors (#91714)
* Add node statistics sensors

* fix tests and don't let controller state leak across tests

* Add background RSSI

* Remove extra logging statement

* fix test

* comments

* setup platform once

* Add static properties to entity description

* Update homeassistant/components/zwave_js/sensor.py

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

* don't dupe attribute values in entity description

* fix exception

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-30 20:44:32 +02:00
Jan Bouwhuis
1e0770ff8a Add ssl_verify option to imap integration (#93811)
* Add ssl_verify option to imap integration

* Add test
2023-05-30 19:48:47 +02:00
Franck Nijhof
46d8885023 Use deployment environment in GitHub build actions (#93800) 2023-05-30 19:43:59 +02:00
J. Nick Koston
89cc57c0d6 Fix double state write on camera added to hass when rtsp_to_webrtc is present (#93806) 2023-05-30 19:43:48 +02:00
J. Nick Koston
17d1c0733d Remove outdated HAOS check from bluetooth (#93809) 2023-05-30 19:41:51 +02:00
G Johansson
105608792e Fix switch acting as toggle in Sensibo (#93810)
* Fix switch as toogle

* typing
2023-05-30 20:39:03 +03:00
Jan Bouwhuis
74741c7634 Fix imap advanced settings not shown (#93813) 2023-05-30 20:37:07 +03:00
Luke
c678664d9a Add translations to Roborock fan speed (#93801) 2023-05-30 18:52:55 +02:00
Luke
de3406c856 Add more information to Roborock Status (#93636)
Co-authored-by: Humberto Gontijo <humberto.gontijo@clevertech.biz>
2023-05-30 18:51:57 +02:00
Franck Nijhof
8e05e3850b Deprecate Python 3.10 (#93794) 2023-05-30 18:46:33 +02:00
Raman Gupta
65187c6f11 Add zwave config parameter entities (#92223)
* Add zwave config parameter entities

* Remove unused entity const

* remove unusued imports

* review comments

* switch to reserved values

* fix test
2023-05-30 11:49:55 -04:00
Erik Montnemery
55c2bb59c8 Fix race in rfxtrx config flow (#93804)
* Fix race in rfxtrx config flow

* Add timeout

* Use async_timeout.timeout
2023-05-30 17:45:33 +02:00
Raman Gupta
90bf5429ca Add support for Window Covering CC (#93314)
* Refactor zwave_js.cover and improve test coverage

* Remove extra fixtures

* cleanup old stuff

* Get coverage to 100

* Add support for Window Covering CC

* fix bug

* typo

* remove redundant stuff

* slight change to improve readability

* Add device class

* Update to match specs
2023-05-30 11:26:23 -04:00
PeteRager
6a8d18ab35 Sonos setup fails with unhandled exceptions on discovery messages (#90648)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-30 10:09:13 -05:00
Erik Montnemery
11299c4537 Deduplicate Thread datasets based on EXTPANID (#93795)
* Deduplicate Thread datasets based on EXTPANID

* Apply suggestions from code review
2023-05-30 16:16:56 +02:00
Erik Montnemery
d05d67414a Teach search about blueprints (#78535) 2023-05-30 15:04:35 +02:00
Franck Nijhof
24e1243da7 Delay release of HA Python release until Docker is ready (#93798) 2023-05-30 14:39:19 +02:00
Diego Rodríguez Royo
1a9da67a28 Add tilt support to Matter cover (#92256) 2023-05-30 13:05:14 +02:00
Erik Montnemery
16d8c8d4d5 Bump python-otbr-api to 2.1.0 (#93790)
* Bump python-otbr-api to 2.1.0

* Fix tests
2023-05-30 12:47:46 +02:00
Franck Nijhof
4596ff0ce5 Merge branch 'master' into dev 2023-05-30 12:13:15 +02:00
Brandon Rothweiler
c513934f25 Fix broken URL in MQTT discovery log message (#93778) 2023-05-30 11:39:55 +02:00
Álvaro Fernández Rojas
2df49b416c Add WebServer sensors to Airzone Cloud (#93757) 2023-05-30 10:23:14 +02:00
Erik Montnemery
901624ad6f Adapt otbr to upstream openthread REST API changes (#93544)
* Adapt otbr to upstream openthread REST API changes

* Bump python-otbr-api to 2.0.0
2023-05-30 10:11:21 +02:00
G Johansson
49ae298c55 Use entity attributes in Obihai sensor (#93564) 2023-05-30 08:35:47 +02:00
J. Nick Koston
c25ccb90a4 Speed up creating automations (#93776)
Creating the inner coroutine for each automation to be run at started
was expensive when the user had 1000s of automations
2023-05-29 22:51:35 -05:00
Luke
c129b4d0c2 Remove unneeded icon for Roborock sensor (#93774)
removed unneeded icon
2023-05-29 22:45:53 -04:00
Allen Porter
01a6173cc9 Fix failing todoist test that used timezone before set by fixture (#93775)
* Fix failing todoist test that used timezone before set by fixture

* Merge fix for dt -> dt_util
2023-05-29 22:45:22 -04:00
Marc Mueller
4cbbfaf55a Update pydantic to 1.10.8 (#93772) 2023-05-29 20:48:26 -05:00
J. Nick Koston
cc107bd0b7 Add a filter to the tasmota device registry listener (#93640)
We can avoid creating a task when the event is not
a remove which will be most cases
2023-05-29 20:59:51 -04:00
J. Nick Koston
493d78f070 Avoid dict comp in statistic_during_period if there is no conversion (#93699) 2023-05-29 20:59:15 -04:00
J. Nick Koston
53fe74e055 Reduce overhead to fetch integrations (#93767)
We call this path over and over during startup and most
of the time the integration is already loaded. We want
that case to be the short path
2023-05-29 20:58:51 -04:00
rikroe
1ea202a5bc Add charging switch to BMW Connected Drive (#93737)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-29 23:48:13 +02:00
mover85
07dd34b04a Bump pydaikin 2.9.1 (#93635) 2023-05-29 23:44:05 +02:00
J. Nick Koston
b063a54295 Reduce overhead to match homekit zeroconf discoveries (#93753) 2023-05-29 23:42:12 +02:00
Joost Lekkerkerker
df6317f65e Add entity name translations to Buienradar (#91511)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-29 23:36:53 +02:00
rikroe
52ef4a3b75 Ensure state update after BMW remote service execution (#93745)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-29 23:28:06 +02:00
Raman Gupta
24290e5d08 Add datetime platform (#81943)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-29 23:24:15 +02:00
Ville Skyttä
940942a74a Import util.dt as dt_util in components/[p-s]* (#93761) 2023-05-30 00:09:42 +03:00
Ville Skyttä
2e59ae9e90 Import util.dt as dt_util in components/[k-o]* (#93760) 2023-05-29 23:02:14 +02:00
Ville Skyttä
ced67e5800 Import util.dt as dt_util in components/[a-d]* (#93756) 2023-05-30 00:02:06 +03:00
Ville Skyttä
5aadd7ffc9 Import util.dt as dt_util in components/[g-i]* (#93759) 2023-05-30 00:01:00 +03:00
Ville Skyttä
1ce74ba25c Import util.dt as dt_util in components/[t-z]* (#93763) 2023-05-29 23:00:43 +02:00
Ville Skyttä
70c49824d7 Import util.dt as dt_util in components/[e-f]* (#93758) 2023-05-30 00:00:11 +03:00
Álvaro Fernández Rojas
6aa01e1441 Add Aidoo sensors to Airzone Cloud (#93541) 2023-05-29 21:58:53 +02:00
Erik Montnemery
8b662dc94f Detect attempt to setup config entry integration via YAML (#93589) 2023-05-29 21:01:47 +02:00
Erik Montnemery
ef68f2c3ff Add empty config schema to integrations d-h (#93645) 2023-05-29 21:00:08 +02:00
Erik Montnemery
9c01ea003c Add empty config schema to integrations i-o (#93698) 2023-05-29 20:58:00 +02:00
Erik Montnemery
8896b27f70 Add empty config schema to integrations p-s (#93700) 2023-05-29 20:57:18 +02:00
J. Nick Koston
6cc5bee960 Fix onvif setup failing when unable to parse camera time (#93677) 2023-05-29 20:53:52 +02:00
J. Nick Koston
2f1f32f0bb Make unit converter use a factory to avoid looking up the ratios each conversion (#93706) 2023-05-29 20:50:40 +02:00
Jerome Garec
7f3f2eea38 Add overkiz control for ATLANTIC_PASS_APC_HEATING_ZONE (#93712) 2023-05-29 20:42:46 +02:00
J. Nick Koston
9443ca89bc Handle exceptions to prevent disconnect when esphome state subscription raises (#93723) 2023-05-29 20:41:50 +02:00
Yuxin Wang
a547181984 Fix unit inference for ITEMP field for APCUPSD integration (#93724) 2023-05-29 20:40:36 +02:00
J. Nick Koston
17fadbcf4a Reduce overhead to update unifiprotect entity (#93725) 2023-05-29 20:39:34 +02:00
Erik Montnemery
8053073a77 Add empty config schema to integrations a-c (#93608) 2023-05-29 14:38:33 -04:00
G Johansson
171ce747c1 Remove nextcloud YAML configuration (#93550) 2023-05-29 20:33:29 +02:00
Ville Skyttä
f5cba290ad Access datetime.datetime and .time directly in caldav (#93688) 2023-05-29 20:27:47 +02:00
Álvaro Fernández Rojas
a3ce1ac497 Fix possible KeyError exception in Airzone Cloud (#93747)
airzone_cloud: fix KeyError for Aidoo installations

Some Airzone Cloud installations might be limited to Aidoo devices. In that
case, the library will provide AZD_AIDOOS, but it won't provide AZD_ZONES,
resulting in a KeyError exception.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-29 13:22:42 -05:00
Joakim Plate
067fc079a3 Don't mock non async with AsyncMock (#93749) 2023-05-29 20:20:27 +02:00
Joakim Plate
617ff24b9b Fix missed case for device tuple fallback in rfxtrx (#93575)
* rfxtrx: add missed case for device tuple fallback

Previously the code was prepared for a backward compatible
migration of tuples, where both styles of identifiers might exist
in device registry at the same time.

This place was sadly missed

* No need to raise special, we can assert instead

* Add some basic tests
2023-05-29 19:59:11 +02:00
G Johansson
e1ef027461 Address late review comments for Command Line (#93743)
* Late review comments

* Rephrase
2023-05-29 19:45:42 +02:00
Stephan Uhle
64ee1e8e43 Bump pysml to 0.0.12 (#93686) 2023-05-29 19:41:32 +02:00
Luke
3b4273d018 Add Roborock Clean time sensors (#93637)
* add clean time information

* add sensor test

* update to cleaning time

* fix sensor test
2023-05-29 09:40:35 -07:00
J. Nick Koston
3c5475a558 Drop codeowner for radiotherm (#93744) 2023-05-29 18:03:36 +02:00
mkmer
b42a5bab89 Bump Blinkpy to 0.21.0 (#93735) 2023-05-29 17:48:08 +02:00
J. Nick Koston
db931132a8 Fix thread leak in onvif discovery (#93742) 2023-05-29 17:06:13 +02:00
J. Nick Koston
3db59908ca Switch mqtt to use async_track_device_registry_updated_event (#93603) 2023-05-29 09:43:01 -05:00
Jan Bouwhuis
c44a7fe358 Do not trigger reload when unloading or reloading MQTT entry (#93588)
* Do not trigger reload when unloading MQTT entry

* More cleanup

* cleanup async_reload_manual_mqtt_items

* Add test

* Improve test

* Remove unuse mocks from test

* Add discovery item in test
2023-05-29 15:44:09 +02:00
G Johansson
46e7486ce6 Move yaml configuration to integration key for command_line (#92824)
* Inital init commit

* bs and cover

* notify

* sensor

* switch

* Issues

* Finalize __init__

* First pass tests

* Fix Binary sensors

* Test cover

* Test notify

* Test sensor

* Tests switch

* Fix coverage

* Add codeowner

* Fix caplog

* test issue

* Flaky test notify

* Fix async

* Adjust yaml structure

* Change yaml format again

* Issue strings

* Fix tests

* string review comment
2023-05-29 08:00:50 +02:00
Joost Lekkerkerker
20d1a0fc77 Add Options flow to YouTube (#93667)
* Add Options flow to YouTube

* Add strings for options flow

* Add strings for options flow

* Add strings for options flow
2023-05-28 21:44:45 -04:00
Marvin Wichmann
795ef075da Restore original websocket commands for config entries (#93707)
Restore original websocket commands and add "config_entries/get_single"
2023-05-28 21:40:35 -04:00
Erik Montnemery
5f584d5dbd Fix typo in switcher_kis (#93702) 2023-05-28 22:39:41 +02:00
G Johansson
c6feb30c31 Raise issue "does not support platform setup" (#93585)
* Raise issue on platform missing

* Modify issue

* Remove deprecation

* Fix strings

* Strings

* Last strings

* strings to common
2023-05-28 21:53:32 +02:00
Joost Lekkerkerker
68c646be40 Improve async youtube (#93685)
* Improve async youtube

* Improve async youtube
2023-05-28 08:48:43 -07:00
Erik Montnemery
25b5ad7de4 Fix typo in ping (#93701) 2023-05-28 10:11:46 -05:00
J. Nick Koston
083cf7a38b Fix refactoring error with updating polling entities in sequence (#93693)
* Fix refactoring error with updating in sequence

see #93649

* coverage

* make sure entities are being updated in parallel

* make sure entities are being updated in sequence
2023-05-28 16:20:48 +02:00
Erik Montnemery
49c3a8886f Make cv.empty_config_schema log an error instead of raise (#93646)
* Make cv.empty_config_schema log an error instead of raise

* Add test

* Update homeassistant/helpers/config_validation.py

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-05-28 15:54:22 +02:00
Matthias Alphart
7ff1c79514 Update xknx to 2.10.0 and knx-frontend to 2023.5.28.94855 (#93694) 2023-05-28 15:22:38 +02:00
Jan Bouwhuis
4c0d169cfc Fix imap parsing non rfc compliant date crash (#93630)
* Fix imap parsing non rfc compliant date crash

* Use parsedate_to_datetime from mail.utils
2023-05-28 13:28:11 +02:00
Joost Lekkerkerker
202c9071a4 Improve Youtube integration (#93683)
* Fix feedback

* Fix feedback
2023-05-28 10:52:30 +02:00
Sven Serlier
41882d833d Update dialogflow URL (#93616)
Update URL
2023-05-28 08:52:52 +02:00
Erik Montnemery
02b76be0ba Use config entry setup in cast tests (#93595)
* Use config entry setup in cast tests

* Remove import step from config flow

* Remove import tests

* Fix tests
2023-05-27 21:07:54 -04:00
Joost Lekkerkerker
fad3a4e168 Improve OpenSky typing (#93666)
* Add types to OpenSky

* Update .strict-typing

* Add types to OpenSky
2023-05-27 20:58:04 -04:00
J. Nick Koston
5f5951e71c Add hardware model to onvif config flow discovery (#93676) 2023-05-27 19:47:13 -05:00
Joost Lekkerkerker
f3037d0b84 Add reauth flow to Youtube (#93670) 2023-05-27 20:29:18 -04:00
J. Nick Koston
cc12698f26 Make diagnostics dataclasses sloted (#93600)
Now available since our minimum python version is 3.10

Saves a tiny bit of ram
2023-05-27 20:04:39 -04:00
J. Nick Koston
0a9c4f15c4 Add event helper to dispatch device registry updates by device_id (#93602)
* Add event helper to dispatch device registry updates by device_id

* Update homeassistant/helpers/event.py

* dry

* dry

* reduce

* reduce

* reorder

* reduce

* cleanup stack depth

* dry

* fix double lookup

* remove unused

* collapse
2023-05-27 20:04:09 -04:00
J. Nick Koston
e1b7d68134 Speed up processing subscribe_events and subscribe_entites when user has read all permissions (#93611)
Speed up processing subscribe_events and subscribe_entites when user the read all permissions
2023-05-27 19:59:46 -04:00
J. Nick Koston
67d9fa8b22 Disable call_soon for device tracker device registry updates (#93638)
Run device tracker device registry updates immediately
without the call_soon delay. This listener does not
need a delay and it only adds overhead in this case.
2023-05-27 19:58:27 -04:00
J. Nick Koston
b966ff7a3d Await in sequence when we know we will be blocked by the entity platform semaphore (#93649)
* Defer creating tasks we know are going to wait on the entity platform semaphore

When looking at whats going on with aiomonitor-ng, I noticed
we end up creating a lot of tasks that block waiting for the
executor because of the entity platform parallel_updates semaphore.

When we know the tasks are going to block we now await them
in sequence to avoid feeding the loop a herd of tasks that
will block on the semaphore

* change during iteration fix

* change during iteration fix

* cleanup

* cleanup

* fix vizio test
2023-05-27 19:58:02 -04:00
J. Nick Koston
a56b5994e5 Disable polling for samsungtv remote entities (#93650)
These entities do not have a defined state, there is no reason to poll
2023-05-27 19:55:48 -04:00
J. Nick Koston
460d04fc07 Disable polling on energy sensors (#93651)
These sensors do not implement async_update so no
polling is needed
2023-05-27 19:54:40 -04:00
J. Nick Koston
5feceee588 Improve performance when serializing small bits of JSON (#93653)
* Improve performance when serializing small bits of JSON

Making json_bytes a partial reduced the run time to
build the small JSON messages by ~18.75%

We serialize a lot of small messages over the websocket

* typing
2023-05-27 19:53:52 -04:00
J. Nick Koston
c721cbd10c Collapse valid state check when creating a state (#93655)
Inline valid state check when creating a state

This was added in #9696 and only used in one place so
it does not need to be another function
2023-05-27 19:53:08 -04:00
J. Nick Koston
560e744f1e Reduce overhead to filter entities in the recorder (#93656)
* Reduce overhead to filter entities in the recorder

* fix type
2023-05-27 19:52:42 -04:00
J. Nick Koston
5a0b25479e Use httpx instead of requests for mjpeg camera images that need digest to avoid jump to executor (#93244)
* Use httpx instead of requests for mjpeg camera images that need digest

Avoids jump to executor

* Use httpx instead of requests for mjpeg camera images that need digest

Avoids jump to executor

* stream as well

* fix

* fix
2023-05-27 19:46:46 -04:00
J. Nick Koston
3a1389c3b4 Switch some frequently called call_laters to call_at (#93659)
* Switch some frequently called call_laters to call_at

call_at is a bit faster than call_later since call_later
is a wrapper around call_at.

We call at lot of these at startup so it helps a bit when
we are resource constrained

* update test

* update test
2023-05-27 19:45:35 -04:00
Álvaro Fernández Rojas
94ad9643b5 Update aioairzone to v0.6.1 (#93629) 2023-05-27 18:25:49 -05:00
Joost Lekkerkerker
e4c51d43f0 Add YouTube integration (#92988)
* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add Youtube stub

* Add Youtube stub

* Add tests

* Add tests

* Add tests

* Clean up

* Add test for options flow

* Fix feedback

* Fix feedback

* Remove obsolete request

* Catch exceptions

* Parallelize latest video calls

* Apply suggestions from code review

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Add youtube to google brands

* Fix feedback

* Fix feedback

* Fix test

* Fix test

* Add unit test for http error

* Update homeassistant/components/youtube/coordinator.py

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Fix black

* Fix feedback

* Fix feedback

* Fix tests

---------

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>
2023-05-27 11:21:12 -07:00
Aaron Godfrey
bb170a2bbf Fix todoist end time for tasks with due date in the future (#91874)
Fix end time for tasks with due date in the future.

Co-authored-by: Allen Porter <allen@thebends.org>
2023-05-27 10:09:11 -07:00
Artem Draft
c5e425d075 Bump androidtvremote2 to 0.0.9 (#93634) 2023-05-27 09:49:57 +02:00
Raj Laud
236ee8be04 Bump pysqueezebox to 0.6.2 (#93573) 2023-05-26 14:53:40 -05:00
Erik Montnemery
d4462829f5 Add CONFIG_SCHEMA to analytics (#93598) 2023-05-26 16:29:32 +02:00
Paul Frank
0bf9bb15f6 Use entity attributes in mystrom (#93591)
* Migrated proprties to _attr_

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* review comment

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-26 16:22:59 +02:00
Erik Montnemery
5671934b34 Fix sharkiq tests (#93597) 2023-05-26 15:35:06 +02:00
Erik Montnemery
5b654c8b79 Fix mill tests (#93596) 2023-05-26 15:20:46 +02:00
Bram Kragten
b51f82719e Update frontend to 20230526.0 (#93581) 2023-05-26 12:39:52 +02:00
G Johansson
af9ee8bc4a Remove obihai YAMl configuration (#93549) 2023-05-26 08:41:21 +02:00
G Johansson
1f467fcc6a Remove EDL21 YAML configuration (#93551) 2023-05-26 08:38:44 +02:00
G Johansson
3633062024 Remove platform yaml Frontier Silicon (#93552) 2023-05-26 08:24:08 +02:00
Jan Bouwhuis
d852ba8b09 Remove redundant stub_blueprint_populate fixture for MQTT integration (#93570)
Remove redundant stub_blueprint_populate fixture
2023-05-26 08:13:45 +02:00
Jan Bouwhuis
ec98e22330 Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Franck Nijhof
9e53bca452 Add entity name translations to Rituals Perfume Genie (#92549) 2023-05-26 08:09:29 +02:00
J. Nick Koston
88893121a1 Increase timeout for test_purge_many_old_events (#93579) 2023-05-25 22:38:44 -05:00
J. Nick Koston
48485fc2bf Complete persistent notifications migration (#92828)
* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* fixes

* fixes

* fixes

* ws test

* update tests

* update tests

* fix more tests

* fix more tests

* more fixes

* fix

* fix person

* fix person

* keep whitelist

* use singleton
2023-05-25 23:09:13 -04:00
J. Nick Koston
e2b69fc470 Significantly improve performance of conversation default_agent listening for new states (#93577)
Use the async_track_state_added_domain helper instead of tracking
all state changes and rejecting them as it is already optimized
for this job
2023-05-25 23:04:38 -04:00
J. Nick Koston
f251c464e2 Fix history start time state returning None with some postgresql versions (#93555)
* Add additional coverage to history websocket api

related issue #93258

* Add additional coverage to history websocket api

related issue #93258

* Fix results when union query ends up at the end instead of front

* Apply suggestions from code review

* resort

* zero instead

* fix exception

* fix tests
2023-05-25 22:18:19 -04:00
J. Nick Koston
61e57872c3 Fix not retrying on connection reset during nexia config entry setup (#93576)
* Fix not retrying on connection reset during nexia config entry setup

fixes
```
2023-05-26 00:15:39.129 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Alexander for nexia
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 558, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 670, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_writer.py", line 130, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_writer.py", line 75, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/nexia/__init__.py", line 47, in async_setup_entry
    await nexia_home.login()
  File "/usr/local/lib/python3.11/site-packages/nexia/home.py", line 385, in login
    request = await self.post_url(self.API_MOBILE_ACCOUNTS_SIGN_IN_URL, payload)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nexia/home.py", line 157, in post_url
    response: aiohttp.ClientResponse = await self.session.post(
                                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 572, in _request
    raise ClientOSError(*exc.args) from exc
aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport
```

* coverage
2023-05-25 21:52:44 -04:00
J. Nick Koston
d9b43fc43f Significantly speed up recorder event listener (#93532)
* Significantly speed up recorder event listener

This code is called every time an event happens since it
subscribes to all events. Its our most frequently called
listener out of the box.

It used to have a seperate filter function but it was
later combined after core had some previous refactoring.

It was never optimized after that happened.

This change reduces the run time by ~70%

* decruft
2023-05-25 21:44:12 -04:00
J. Nick Koston
10aa49be2b Speed up async_active_zone by avoiding dict lookups (#93427)
Speed up async_active_zone by avoding dict lookups
2023-05-25 21:37:18 -04:00
Justin Vanderhooft
accee4b5ef Add support for configuring built-in Melnor Bluetooth scheduling system (#93333) 2023-05-25 20:06:22 -05:00
Maciej Bieniek
e6a214595b Avoid KeyError when specifying the consumption type in Shelly integration (#93561)
Avoid KeyError when specifying the consumption type
2023-05-25 23:12:25 +02:00
Maciej Bieniek
eb058a3d41 Add illuminance sensor for Shelly gen2 devices (#93559) 2023-05-25 23:10:44 +02:00
starkillerOG
f5358d3863 Bump reolink-aio to 0.5.16 (#93540) 2023-05-25 22:15:33 +02:00
Artem Draft
70e20815c7 Mark as assumed_state LG Netcast media player (#93543)
Mark as assumed_state LG Netcast media player
2023-05-25 22:47:13 +03:00
Erik Montnemery
a71c097aeb Revert "Allow setting an entity's name by its device class" (#93539) 2023-05-25 17:20:54 +02:00
Álvaro Fernández Rojas
f7404e2ee0 Update aioairzone-cloud to v0.1.6 (#93513) 2023-05-25 17:18:28 +02:00
J. Nick Koston
25a33b6b37 Bump zeroconf to 0.63.0 (#93533)
changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.62.0...0.63.0

performance improvements
2023-05-25 16:52:31 +02:00
Dominik
eb617e85f3 Use DEFAULT_SCAN_INTERVAL as update interval for glances (#93535)
Use default scan interval constant
2023-05-25 16:51:57 +02:00
Philip Peitsch
6c66af4e41 Add ability to send custom keys to Samsung TV (#83439)
* Add SamsungTV Remote entity with support for turn-off and send command

* Fix SamsungTV remote tests
2023-05-25 15:55:44 +02:00
Joost Lekkerkerker
a96215bf2e Lastfm config flow (#92299)
* Move constant values to separate file

* Move constant values to separate file

* Add config flow to lastfm

* Add tests

* Add config flow to lastfm

* Add tests

* Add tests

* Add tests

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add OptionsFlow

* Add tests

* Fix feedback

* Fix feedback

* Fix feedback

* Fix feedback

* Fix test

* Apply suggestions from code review

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

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update homeassistant/components/lastfm/config_flow.py

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

* Add tests

* Cleanup

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Fix test

* Fix feedback

* Codeowner lastfm

* Fix feedback

* Fix feedback

* Parametrize errors

* Parametrize errors

* Parametrize errors

* Finish tests

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-05-25 14:48:16 +02:00
J. Nick Koston
e09e4f14d6 Speed up setting state (#93472) 2023-05-25 07:34:07 -05:00
Erik Montnemery
3cca338c6e Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
badewanne1234
393dbb6dc0 Fix of cover-tilt in homekit_controller (#91631)
* Fix of cover-tilt in homekit_controller

* Fix of cover-tilt and its tests
2023-05-25 12:41:42 +02:00
IceBotYT
9231010402 Code quality improvements and debug logs for LaCrosse View (#91979)
* Code quality improvements and debug logs for LaCrosse View

* Remove unrelated files

* Remove version bump

* Revert "Remove version bump"

This reverts commit ed440899f9.

* Revert "Remove unrelated files"

This reverts commit d9b48ae4f9.
2023-05-25 12:37:16 +02:00
Erik Montnemery
3fc0c9a325 Improve TTS test fixtures (#93517) 2023-05-25 11:59:20 +02:00
Dara Adib
e2daffc117 Fix exception handling in Microsoft TTS (#92556)
pycsspeechtts uses the requests library, but Microsoft TTS previously
caught HTTPException from the standard library. This is changed to
catch requests.HTTPError and return `(None, None)` consistent with
other TTS integrations. This will properly raise HomeAssistantError
for display in the frontend.

Follow up to PR #92215 which adds tests for Microsoft TTS.
2023-05-25 11:29:13 +02:00
starkillerOG
4ef315b32a Add Kodi keypress event (#93321)
* Add keypress events

* Fix styling

* fix tests

* improve tests

* Revert device trigger

* Add entity_id to event for ease of filtering
2023-05-25 11:11:29 +02:00
RenierM26
f86cc34644 Add Ezviz number entity (#93366)
* Initial commit

* Add number entity.

* update coveragerc

* Add services back and add depreciation repair.

* Remove redundant typing declaration.

* Case change in strings.

* Apply cleanups from simular pull request.

* Commit suggestions.
2023-05-25 11:09:47 +02:00
Jan Bouwhuis
1b5d207984 Add imap custom event data template (#93423)
* Add imap custom event template

* Add template validation
2023-05-25 11:05:25 +02:00
Álvaro Fernández Rojas
6cd766ef1f Add Airzone Cloud diagnostics (#93465)
* airzone_cloud: add diagnostics support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloue: remove unused import

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: diagnostics: redact additional API keys

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-25 11:04:57 +02:00
Dara Adib
663f66a2b2 Scrape Microsoft TTS supported languages (#91988)
* Update Microsoft TTS supported languages

`script.microsoft_tts` scrapes Microsoft Azure documentation for
the list of supported languages and saves them to
`homeassistant.generated.microsoft_tts` for use in the component.

This adds support for more TTS languages, like fa-ir (Persian).

* Improve xpath query for Microsoft TTS languages

* Remove asserts for Microsoft TTS languages

* Add more tests for Microsoft TTS languages
2023-05-25 10:46:34 +02:00
disaster37
6e8472b90f Fix/arest switch (#91553)
* Fix arest switch to set output when connection is lost

Signed-off-by: disaster37 <linuxworkgroup@hotmail.com>

* fix: lint

Signed-off-by: disaster37 <linuxworkgroup@hotmail.com>

---------

Signed-off-by: disaster37 <linuxworkgroup@hotmail.com>
2023-05-25 10:45:15 +02:00
Matrix
e744632164 YoLink Power Failure Alarm (#91934)
* add ys-7106

* expose mute property

* add volume entity description

* add beep entity description

* fix as suggest
2023-05-25 10:44:51 +02:00
dependabot[bot]
6df44ff5d5 Bump actions/setup-python from 4.6.0 to 4.6.1 (#93512)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.6.0...v4.6.1)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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>
2023-05-25 09:48:52 +02:00
Marc Mueller
64118ee011 Improve hydrawise typing (#93503)
* Improve hydrawise generic typing

* Enable strict typing

* Remove unused code
2023-05-25 07:58:59 +02:00
J. Nick Koston
f8d918ca4a Small speedup to unifiprotect attribute lookups (#93507) 2023-05-25 07:51:45 +02:00
J. Nick Koston
c63e3c3bf1 Update prometheus tests to avoid patching utcnow (#93505) 2023-05-25 07:15:14 +02:00
Marcel van der Veldt
2bb46c8a9e Fix for missing/corrupt names of Matter devices (#92073)
* Fix missing names on some devices/bridges

* guard for None devicetype (just in case)

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* black and isort

* Code quality

* Add tests

* Add coverage test, add None for empty string

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: jbouwh <jan@jbsoft.nl>
2023-05-25 03:50:13 +02:00
Michał Modzelewski
33387bf418 Readable paired device names for Apple TV airplay and companion protocols (#93449)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-24 20:07:49 -05:00
J. Nick Koston
7ec6e03d5d Update sensor tests to avoid patching utcnow (#93497) 2023-05-24 19:54:08 -05:00
Michał Modzelewski
d5e09bd4c3 Support volume level push updates in apple_tv integration (#93496) 2023-05-24 18:28:29 -05:00
J. Nick Koston
9dcd73b308 Update recorder tests to avoid patching utcnow (#93489) 2023-05-24 17:47:42 -05:00
J. Nick Koston
f8d8f5caba Update statistics tests to avoid patching utcnow (#93499) 2023-05-24 17:38:38 -05:00
J. Nick Koston
f5eb872eaf Update state helper test to avoid patching utcnow (#93484) 2023-05-24 17:38:09 -05:00
J. Nick Koston
ee62584570 Add constraint for pyminiaudio to 1.57 (#93501) 2023-05-24 17:03:37 -05:00
J. Nick Koston
40a47c72f4 Update history tests to avoid patching utcnow (#93487) 2023-05-24 16:09:26 -05:00
J. Nick Koston
45b1ad36b1 Bump onvif-zeep-async to 3.1.8 (#93464) 2023-05-24 15:38:54 -05:00
J. Nick Koston
0160c8c14f Update switch tests to avoid patching utcnow (#93491) 2023-05-24 15:28:38 -05:00
J. Nick Koston
bf2c12dcf2 Update remote tests to avoid patching utcnow (#93492) 2023-05-24 15:28:22 -05:00
J. Nick Koston
33c2cb9895 Fix integration trapezoidal test (#93494) 2023-05-24 15:24:15 -05:00
J. Nick Koston
41aa3e223e Update light tests to avoid patching utcnow (#93490) 2023-05-24 15:21:40 -05:00
J. Nick Koston
1f5916cb4d Update statistics tests to avoid patching utcnow (#93485) 2023-05-24 14:53:33 -05:00
Raman Gupta
f0874791d8 Refactor zwave_js.cover (#93433)
* Refactor zwave_js.cover and improve test coverage

* Remove extra fixtures

* cleanup old stuff

* Get coverage to 100

* Remove redundant stuff

* Revert all changes to tests

* Update conftest.py
2023-05-24 15:37:33 -04:00
Luke
46c63dd70b Fix Roborock Sensor test failing (#93488)
fix roborock sensors
2023-05-24 21:35:05 +02:00
Álvaro Fernández Rojas
f5a235beee Fix Airzone min/max climate temperatures (#93161)
* airzone: climate: fix max/min temps

The library now provides AZD_ABS_TEMP_MAX/AZD_ABS_TEMP_MIN which are useful for
devices with different max/min temperatures depending on the current working
mode (HEAT vs COOL).
These new values will have the highest/lowest max/min of both modes.
Until now, the max/min of the current working mode (HEAT/COOL) would be set
when starting Home Assistant, limiting the temperature range if the device
mode was changed after that.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: climate: update max/min temps

Some devices have different max/min climate temps depending on the active
mode (HEAT vs COOL), so we should update these values.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Revert "airzone: climate: update max/min temps"

This reverts commit 988194d486.

* Revert "Revert "airzone: climate: update max/min temps""

This reverts commit e4ead24f71.

* tests: airzone: add max/min climate changes test

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: airzone: fix dict copy

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-24 21:18:59 +02:00
J. Nick Koston
5c6ed8f6d5 Use call_at for events instead call_later (#93431)
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-05-24 21:04:07 +02:00
Erik Montnemery
30d9d7d905 Minor adjustment of tts typing (#93450) 2023-05-24 21:02:55 +02:00
Erik Montnemery
68379dd55a Improve TTS cache dir mocking (#93468) 2023-05-24 21:00:35 +02:00
epenet
6057aeee2f Prevent NumberEntity and RestoreEntity inheritance (#93467) 2023-05-24 20:59:14 +02:00
J. Nick Koston
dc3826f68e Update generic_hygrostat tests to avoid patching utcnow (#93476) 2023-05-24 20:57:56 +02:00
J. Nick Koston
cff72f9653 Update derivative tests to avoid patching utcnow (#93477) 2023-05-24 20:54:50 +02:00
J. Nick Koston
70c1fe8c6c Update integration tests to avoid patching utcnow (#93480) 2023-05-24 20:54:11 +02:00
Luke
8dd9482bb5 Add Roborock Consumable sensors (#91972)
* add sensors to roborock

* add value_fn typing

* fixed strings

* Update homeassistant/components/roborock/sensor.py

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

* change to work time instead of time left

* added time left back

* fixed tests

* made diagnostic

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-05-24 20:31:02 +02:00
J. Nick Koston
e80579e52f Update generic_thermostat tests to avoid patching utcnow (#93479) 2023-05-24 13:17:28 -05:00
J. Nick Koston
da5ad4a17d Update binary_sensor tests to avoid patching utcnow (#93474) 2023-05-24 13:17:11 -05:00
Raman Gupta
3e84c374f4 Improve zwave.cover tests (#93458)
* Improve zwave.cover tests

* Update conftest.py
2023-05-24 18:51:15 +02:00
J. Nick Koston
08c8c22fac Fix non threadsafe call in xiaomi_aqara again (#93461)
Fix non threadsafe call in xiaomi_aqara

The original fix in #93405 was ineffective and only moved the problem

fixes #93400
2023-05-24 18:21:44 +02:00
Martin Malina
d2d21b4158 Show current day in met weather forecast (#91891)
Version 0.10.0 of pyMetno added the option
to defined range_start when calling get_forecast:
https://github.com/Danielhiversen/pyMetno/pull/35/files

So let's use that to include today in the forecast.
2023-05-24 16:07:59 +02:00
Vova-SH
f8fdeeabc2 Add resize_keyboard and one_time_keyboard attributes to telegram bot service (#91613)
* Add new params for telegram bot

Add resize_keyboard and one_time_keyboard attributes

* Apply review changes

* Update homeassistant/components/telegram_bot/__init__.py

* Update __init__.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 16:07:22 +02:00
starkillerOG
16780bf4c2 Prevent firmware update error when internet blocked for Reolink camera (#91738)
* Prevent firmware update error when internet blocked

* fix styling

* switch back to async_config_entry_first_refresh

* fix still raising when starting

* missing return

* Catch CancelledError
2023-05-24 15:16:35 +02:00
MarkGodwin
e97b331942 Add gateway WAN/LAN port connectivity entities to TP-Link Omada (#91905)
* Add gateway WAN/LAN port status entities

* Fix copy pasta comments

* Add omada binary_sensor to coveragerc
2023-05-24 15:12:51 +02:00
Raman Gupta
872cd47e87 Add proper support for zwave_js Indicator CC (#90248)
* Add proper support for zwave_js Indicator CC

* remove stale test

* Make all indicators diagnostic

* only set entity category if it is specified

* Only set properties from discovery if specified

* Conditionally set assumed state as well

* fix const name

* Don't create task

* Disable property keys 3-5 by default

* add additional dispatcher_connects so we catch all signals

* be consistent about order

* rename new discovery parameter

* comment

* exclude property keys 3-5

* fix remove logic

* add comment so I don't forget

* Switch entity category to config where necessary

* cut line

* less lines

* Update homeassistant/components/zwave_js/switch.py

Co-authored-by: kpine <keith.pine@gmail.com>

* Move async_remove to respond to interview started event

* Set up listener immediately so we don't wait for platform creation

* remove dupe import

* black

* append

---------

Co-authored-by: kpine <keith.pine@gmail.com>
2023-05-24 09:09:38 -04:00
Raman Gupta
66f7218b68 Do optimistic state update for Z-Wave multilevel switch entities (#90490)
* Do optimistic state update for Z-Wave multilevel switch entities

* simplify

* define constant for setting value to previous value

* Rework to only consider value of 255 and only places where we know that the previous state is known by the integration due to the service being called

* missed commit

* better code

* Add tests and use constant from lib

* fix logic

* fix bug

* Add comments with more details
2023-05-24 09:04:11 -04:00
Raman Gupta
3e93dd6a01 Update name for Notification CC sensors and buttons (#93019)
* Update name for Notification CC sensors and buttons

* Add comment with reference to names
2023-05-24 09:00:37 -04:00
rappenze
83f206a6fe Code cleanup: Separate fibaro scene logic (#91895)
* Code cleanup fibaro scene

* Remove duplicated code

* Fixes
2023-05-24 14:57:35 +02:00
rappenze
11accd8ba7 Set available state in fibaro integration (#91893) 2023-05-24 14:54:10 +02:00
Aaron Godfrey
89f1677307 Fix todoist state updates (#91915)
* Update event when coordinator updates data.

* Move function to make diff easier to view

* Actually make it easier to view

* Move all tasks calculation to extra_state_attributes.
2023-05-24 14:46:13 +02:00
ad0p
ef24e508f8 Bump pydeconz to v112 (#91924)
* Bump pydeconz to v112

* PR review - add suggested_display_precision

* Test - fix

* Bump pydeconz to v112

* PR review - add suggested_display_precision

* Fix tests

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-05-24 14:43:02 +02:00
Jeff Grieger
7e165021a3 Fix directv attribute media_position_updated_at (#92383)
* Fix directv attribute media_position_updated_at

Fix to update media_position_updated_at attribute when media_position attribute is updated.

* Do not update media_position_updated_at when paused
2023-05-24 14:22:56 +02:00
David Knowles
ace45f31ff Add a DataUpdateCoordinator to Hydrawise (#93223)
* Add a DataUpdateCoordinator to Hydrawise

* Replace DATA_HYDRAWISE with DOMAIN

* Replace persistent notification with a ConfigEntryNotReady exception

* Changes requested during PR review

* Add a type annotation to the `monitored_conditions` field.

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-24 14:07:37 +02:00
Colin Robbins
f355f0cc6d Add UDP listener in Lightwave (#85385) 2023-05-24 13:44:12 +02:00
epenet
c475273145 Prevent SensorEntity and RestoreEntity inheritance (#88971) 2023-05-24 12:49:35 +02:00
Joost Lekkerkerker
db33aadcbb Implement OpenSky library (#92814)
* Implement OpenSky library

* Move function to library

* Fix feedback
2023-05-24 12:48:55 +02:00
Tom Schneider
0ca0ed3a31 Bump pygti and change the request for the new api version (#92283)
Bump pygti and change request for the new api version
2023-05-24 12:43:36 +02:00
Mike Heath
2a7ba60574 Fully Kiosk: Truncate long URLs (#92347)
* Truncate long URLs

URL's longer than 256 characters will result in a
`homeassistant.exceptions.InvalidStateError`. This fixes that problem
and adds 2 extra_state_attributes: `full_url`, and `truncated`.

Fixes #89249

* Refactor to use function ref in entity description
2023-05-24 12:32:26 +02:00
Erik Montnemery
937ebb374c Enable strict type checks of cloud (#92576)
* Enable strict type checks of cloud

* Fix circular import

* Address review comments

* Apply suggestions from code review
2023-05-24 11:46:11 +02:00
Franck Nijhof
a8ce4d3c66 Remove legacy translations from electrasmart (#93446) 2023-05-24 11:42:49 +02:00
Álvaro Fernández Rojas
746a47f094 Update aioairzone-cloud to v0.1.3 (#93443) 2023-05-24 11:37:41 +02:00
Mike Degatano
08a719e09e Add backup location and mount failed repair (#93126)
* Add backup location and mount failed repair

* Fix coverage

* Change storage_location to backup_location

* Use backticks

* Update homeassistant/helpers/selector.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 10:33:41 +02:00
Raman Gupta
9b53484e2e Remove unused zwave discovery logic (#93436) 2023-05-24 10:02:50 +02:00
Jafar Atili
7bc9e1ae9f Bump PySwitchbee to 1.8.0 (#92348)
* fix

* fixes

* bump pyswitchbee

* bump pyswitchbee

* bump pyswitchbee

* fix

* bump pyswitchbee

* Apply suggestions from code review

---------

Co-authored-by: Jafar Atili <jafar.atili@axonius.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 09:44:36 +02:00
Ludy
a310b5c1c3 remove template deprecated function device_trigger.py (#93419)
remove template deprecated fun `device_trigger.py`
2023-05-24 09:42:44 +02:00
Mike Degatano
2906caf4d1 Fix reference string in data disk repair (#93220)
* Fix reference string in data disk repair

* Use backticks
2023-05-24 09:42:30 +02:00
epenet
7c72b97d79 Use SnapshotAssertion in Renault tests (part 2) (#92395) 2023-05-24 09:39:37 +02:00
epenet
dc14b83249 Add ability to unload demo integration (#92515)
* Add unload to demo integration

* Adjust config tests to use kitchen_sink

* Use async_unload_platforms
2023-05-24 09:38:29 +02:00
Joost Lekkerkerker
326d80f4f7 Move Twitch constants to separate file (#92605)
* Move Twitch constants to separate file

* Move Twitch constants to separate file

* Move Twitch constants to separate file

* Update branch
2023-05-24 09:18:20 +02:00
Guido Schmitz
9363fa6561 Update quality scale of devolo Home Control (#92646)
Update quality scale
2023-05-24 09:16:41 +02:00
ollo69
62ccecb690 Change utility_meter log level for invalid old state (#93026) 2023-05-24 09:10:51 +02:00
jjlawren
abf08f66a4 Bump sonos-websocket to 0.1.2 (#93429)
Bump sonos-websocket to 0.1.2
2023-05-24 08:38:16 +02:00
Jesse Hills
bb39b99a3f ESPHome fix changing light color_mode (#93434) 2023-05-24 08:37:42 +02:00
uvjustin
67515f8ac3 Bump ha-av to v10.1.0 (#93420) 2023-05-24 08:28:04 +02:00
Chris Talkington
5bdc830664 Bump rokuecp to 0.18.0 (#93424) 2023-05-24 08:27:20 +02:00
Dara Adib
3bd6dea63b Add tests for Microsoft TTS (#92215)
* Add tests for Microsoft TTS

* Update requirements_test_all

* Update tests/components/microsoft/__init__.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 08:25:03 +02:00
Ludy
3c7e6bf3cc Add missing constants trigger_typeand condition_type (#93415)
* Add missing `trigger_type`and  ´condition_type`

* auto generate `TURNED_ON` and  `TURNED_OFF`
2023-05-24 08:22:52 +02:00
Álvaro Fernández Rojas
a29adc0a6a Airzone select improvements (#92894)
* airzone: select: remove unneed .keys()

Fixes late comment when select platform was introduced.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: make options translatable

This was a late comment when the select platform was introduced.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: change options to lists (from enums)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: airzone: fix python 3.10 tests

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: add manual dict values

This was requested in order to keep control of the translation strings.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Revert "airzone: select: add manual dict values"

This reverts commit b818a2674d.

* Revert "tests: airzone: fix python 3.10 tests"

This reverts commit 93f8bd1430.

* Revert "airzone: select: change options to lists (from enums)"

This reverts commit e503a1dd3a.

* airzone: select: options: copy dict to list

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: use degree symbol

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-24 08:21:24 +02:00
luar123
869f970e59 Fix Snapcast connection issues (#93010)
* Add (dis)connect and update listeners, terminate connection and reconnect. Set availability

* Pass entry_id to constructor
2023-05-24 08:16:09 +02:00
Tom
a43dcaf812 Plugwise add value_fn for select (#93375)
* Plugwise prepare value_fn for select

* Plugwise prepare value_fn for select

* Try proposed options

* Fix initial defs

---------

Co-authored-by: Bouwe Westerdijk <11290930+bouwew@users.noreply.github.com>
2023-05-24 07:56:17 +02:00
J. Nick Koston
d8493a41aa Add Yale Home virtual integration (#93364)
* Add Yale Home virtual integration

Yale split all their customers outside of North America off into
a new brand recently

https://www.yalehome.com/in/en/news/news/introducing-the-new-yale-home-app#:~:text=The%20Yale%20Home%20app,products%20and%20new%20products%20alike.

* init

* brands
2023-05-24 07:21:49 +02:00
Franck Nijhof
3107d7514c 2023.5.4 (#93422) 2023-05-23 23:51:57 +02:00
Franck Nijhof
264bed1af7 Bumped version to 2023.5.4 2023-05-23 21:54:57 +02:00
J. Nick Koston
63b81d86ef Fix race in tracking pending writes in recorder (#93414) 2023-05-23 21:54:33 +02:00
Marcel van der Veldt
41702410f7 Bump Matter server library to 3.4.1 and address changes (#93411)
* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* lint

* update requirements_all
2023-05-23 21:54:30 +02:00
J. Nick Koston
0f888340da Fix non threadsafe call xiaomi_aqara (#93405) 2023-05-23 21:54:26 +02:00
epenet
fce2275083 Bump httpx to 0.24.1 (#93396) 2023-05-23 21:53:42 +02:00
J. Nick Koston
cc94a9f4bb Fix august configuration url with Yale Home brand (#93361)
* Fix august configuration url with Yale Home brand

changelog: https://github.com/bdraco/yalexs/compare/v1.4.6...v1.5.0

* bump
2023-05-23 21:51:24 +02:00
Dominik
dbbd9265d6 Bump glances_api to 0.4.2 (#93352) 2023-05-23 21:51:20 +02:00
Raman Gupta
d1ee479e31 Bump zwave-js-server-python to 0.48.1 (#93342)
* Bump zwave-js-server-python to 0.48.1

* fix mypy
2023-05-23 21:51:16 +02:00
Aaron Bach
e1cd5b627a Bump aionotion to 2023.05.5 (#93334) 2023-05-23 21:51:13 +02:00
Steven Looman
97bbc52c75 Bump async-upnp-client to 0.33.2 (#93329)
* Bump async-upnp-client to 0.33.2

* Fix tests
2023-05-23 21:51:09 +02:00
J. Nick Koston
1a0035798b Add support for Yale Home brand to august (#93214) 2023-05-23 21:51:06 +02:00
J. Nick Koston
65c5e70064 Disconnect yale access locks at the stop event (#93192) 2023-05-23 21:51:02 +02:00
Brett Adams
9bfd636ade Add Fan and Dry HVAC modes to Advantage Air MyTemp preset (#93189) 2023-05-23 21:50:59 +02:00
rikroe
8ebd827667 Fix china login for bmw_connected_drive (#93180)
* Bump bimmer_connected to 0.13.5

* Fix snapshots after dependency bump

* Load gcid from config entry if available

* Add tests

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-23 21:50:55 +02:00
J. Nick Koston
94130b7134 Bump pyatv to 0.11.0 (#93172) 2023-05-23 21:50:52 +02:00
Aaron Bach
0d432a4dd3 Bump regenmaschine to 2023.05.1 (#93139) 2023-05-23 21:50:49 +02:00
Diogo Gomes
fab670434e Better handling of source sensor unavailability in Riemman Integration (#93137)
* refactor and increase coverage

* fix log order
2023-05-23 21:50:45 +02:00
Maciej Bieniek
40c0447292 Bump accuweather to version 0.5.2 (#93130) 2023-05-23 21:50:42 +02:00
Jan Bouwhuis
397864c497 Fix last imap message is not reset on empty search (#93119) 2023-05-23 21:50:39 +02:00
J. Nick Koston
fa6834347a Bump pyunifiprotect to 4.9.0 (#93106)
changelog: https://github.com/AngellusMortis/pyunifiprotect/compare/v4.8.3...v4.9.0
2023-05-23 21:50:35 +02:00
J. Nick Koston
a9afccb406 Fix ONVIF cameras that change the xaddr for the pull point service (#93104) 2023-05-23 21:50:32 +02:00
Nerdix
c200c9fb4b Increase timeout to 30 seconds for homeassistant_alerts integration (#93089) 2023-05-23 21:50:29 +02:00
MatthewFlamm
ce98324da3 Fix NWS error with no observation (#92997)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-23 21:50:26 +02:00
Michael Mraka
cd195b7f50 Update solax state class for sensors with no units (#92914)
Update sensor.py

Units.NONE is used for text entities which are not measurements.
Marking them so breaks their history.
2023-05-23 21:50:23 +02:00
J. Nick Koston
367198a20c Fix onvif cameras that cannot parse relative time (#92711)
* Fix onvif cameras that cannot parse relative time

The spec requires that the camera can parse relative or absolute timestamps
However there are many cameras that cannot parse time correctly.

Much of the event code has been offloaded to the library and
support to determine if the camera has broken time and switch
to absolute timestamps is now built into the library

* adjust verison

* fixes

* bump

* bump

* bump

* more fixes

* preen

* fix resume

* one more fix

* fix race in webhook setup

* bump to 3.1.3 which has more fixes for broken camera firmwares

* bump 3.1.4 for more fixes

* fix

* fix comment

* bump

* fix url limit

* bump

* more fixes

* old hik uses -s
2023-05-23 21:50:20 +02:00
Daniel Gangl
5b0d53389c Fix weather handling in zamg (#85635)
* TypeError handling in weather

* Check for None

* Use walrus operator as proposed
2023-05-23 21:50:05 +02:00
J. Nick Koston
f09abb0f2e Fix race in tracking pending writes in recorder (#93414) 2023-05-23 21:47:31 +02:00
Brett Adams
f6e7b727b0 Add Fan and Dry HVAC modes to Advantage Air MyTemp preset (#93189) 2023-05-23 21:32:47 +02:00
Marcel van der Veldt
56d2048ffa Bump Matter server library to 3.4.1 and address changes (#93411)
* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* lint

* update requirements_all
2023-05-23 20:42:09 +02:00
Patrick Li
46103f56c4 Fix trusted_users group schema (#92847)
* Fix trusted_users group schema

* Add tests for CONFIG_SCHEMA
2023-05-23 20:11:25 +02:00
andarotajo
fa366e59e0 Improve dwd_weather_warnings code quality (#92738)
Improve code quality by removing unnecessary data
2023-05-23 19:34:47 +02:00
epenet
160fce781d Bump httpx to 0.24.1 (#93396) 2023-05-23 12:31:03 -05:00
Álvaro Fernández Rojas
8edb253ace Add Airzone Cloud integration (#93238)
* airzone-cloud: add new integration

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Add missing aioairzone-cloud to test requirements

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone-cloud to v0.0.4

Allows to handle TooManyRequests exception on coordinator.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* aioairzone_cloud: reduce API requests

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: remove system_zone_id

As opposed to the Local API of Airzone devices, the Cloud API provides unique
IDs for both systems and zones, so we can remove the system_zone_id copied from
the Local API integration.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: minor improvements

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: airzone_cloud: simplify mock_get_webserver

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone to v0.0.5

- Add token refresh and relogin support.
- Improve fetching installation devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: add to strict typing

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone to v0.0.7

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* trigger CI

* airzone_cloud: remove unneeded api_get_user call

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Add Airzone brand

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone to v0.1.1

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: use unique_id instead of entry_id

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: remove special handling of TooManyRequests

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: bump coordinator timeout to 30s

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: make AirzoneEntity an ABC

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: fix strings typo

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: airzone_cloud: simplify webserver mock

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone-cloud to v0.1.2

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 19:22:50 +02:00
Michael Mraka
8bf22014ce Update solax state class for sensors with no units (#92914)
Update sensor.py

Units.NONE is used for text entities which are not measurements.
Marking them so breaks their history.
2023-05-23 19:20:04 +02:00
Álvaro Fernández Rojas
942089d590 Add QNAP QSW firmware update support (#92869)
* qnap_qsw: add firmware update support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: qnap_qsw: remove backup leftovers

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: qnap_qsw: remove backup leftovers v2

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 19:10:33 +02:00
chiefdragon
9672db0354 Add new preset to Tado to enable geofencing mode (#92877)
* Add new preset to Tado to enable geofencing mode
Add new 'auto' preset mode to enable Tado to be set to auto geofencing
mode.  The existing ‘home’ and ‘away’ presets switched Tado into manual
geofencing mode and there was no way to restore it to auto mode.
Note 1: Since preset modes (home, away and auto) apply to the Tado home
holistically, irrespective of the Tado climate entity used to select
the preset, three new sensors have been added to display the state of
the Tado home
Note 2: Auto mode is only supported if the Auto Assist skill is enabled
in the owner's Tado home. Various checks have been added to ensure the
Tado supports auto geofencing and if it is not supported, the preset is
not listed in the preset modes available

* Update codeowners in manifest.json

* Update main codeowners file for Tado component
2023-05-23 19:08:00 +02:00
J. Nick Koston
761943e1e6 Fix non threadsafe call xiaomi_aqara (#93405) 2023-05-23 18:56:27 +02:00
Aaron Bach
fdf40fd1e5 Remove @bachya as a Slack codeowner (#93408)
* Remove @bachya as a Slack codeowner

* Manifest
2023-05-23 18:55:55 +02:00
Tom Harris
e2fb1de0d9 Clean up Insteon config_flow (#93004)
* Clean up config_flow

* Remove unnecessary logging

* Remove logger

* Add more tests

* Test closing modem connection

* Simplify patching
2023-05-23 17:31:17 +02:00
Erik Montnemery
d62cdf3d65 Improve error message for sensors with a non-numeric value (#93399)
* Improve error message for sensors with a non-numeric value

* Address review comment
2023-05-23 15:54:24 +02:00
rikroe
f8f83906f8 Add climate on/off for supported BMW vehicles (#92962)
* Add switch platform

* Add tests

* Remove separate button

* Bump coverage

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-23 15:21:29 +02:00
J. Nick Koston
28fa6f541f Bump ifaddr to 0.2.0 (#93377) 2023-05-23 14:18:26 +02:00
J. Nick Koston
bb8dfc9470 Bump protobuf to 4.23.1 (#93338) 2023-05-23 13:16:20 +02:00
RenierM26
497fa1980b Add Ezviz update entity (#85377)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-05-23 12:32:14 +02:00
epenet
c23718d13d Cleanup samsungtv strings (#93395) 2023-05-23 12:06:19 +02:00
erikbadman
2721874f13 Get kostal plenticore hostname id from get_settings (#93008)
* Get hostname id from get_settings

* Add try except in get_hostname_id function

* Update tests after adding get_hostname_id function

* Revert "Update tests after adding get_hostname_id function"

This reverts commit 5fa4e533cb.

* Add test for G2 models in config flow.

* Add test for helper module.

* Fix test for numbers.

* Revert "Add try except in get_hostname_id function"

This reverts commit 059f5bd9b4.

* Update variable name with known hostname ids to be private

---------

Co-authored-by: Stefan Gmeiner <stefangm42@gmail.com>
2023-05-23 11:42:54 +02:00
epenet
1dccb8a9a9 Cleanup deprecated YAML from samsungtv (#93392) 2023-05-23 11:33:51 +02:00
Paul Frank
d0d74eb30e Bump mystrom to 2.2.0 (#93389) 2023-05-23 11:28:33 +02:00
Álvaro Fernández Rojas
7e1a946705 Support Airzone temperature ranges (HEAT_COOL) (#93110)
* airzone: climate: add Temperature range support

This is useful for HEAT_COOL climate mode (Airzone AUTO).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* trigger CI

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 11:23:32 +02:00
luar123
86ad5ad113 Change snapcast to local_push (#93113) 2023-05-23 11:21:50 +02:00
Diogo Gomes
e100bcfaea Better handling of source sensor unavailability in Riemman Integration (#93137)
* refactor and increase coverage

* fix log order
2023-05-23 11:19:29 +02:00
Erik Montnemery
b754f03eb1 Add WS command for getting a config entry (#93387)
* Add WS command for getting a config entry

* Update tests
2023-05-23 10:44:02 +02:00
Dominik
657d285e8f Bump glances_api to 0.4.2 (#93352) 2023-05-22 23:15:01 +02:00
Tom
400263cf04 Plugwise binary_sensor typing improvement (#93371)
Typing miss correction (spotted by epenet)
2023-05-22 23:02:42 +02:00
Tom
af3bbdee82 Plugwise add value_fn for switch (#93345)
* Plugwise add value_fn for switch

* Skip none as suggested
2023-05-22 22:15:02 +02:00
Maciej Bieniek
71466e5012 Add new sensors to AccuWeather (#93362)
* Add solar irradiance and condition sensors

* Use entity_registry_enabled_by_default fixture
2023-05-22 21:55:54 +02:00
Franck Nijhof
d2a39e0e6f Update requests to 2.31.0 (#93363) 2023-05-22 20:48:56 +02:00
Guido Schmitz
91da7516d0 Use snapshots in devolo_home_control tests (#93202) 2023-05-22 18:16:57 +02:00
Matthias Alphart
b10e73e2d4 Configurable KNX Telegram history size (#93248)
* Configurable KNX Telegram history size

* Add maximum value to description
2023-05-22 18:09:59 +02:00
Raman Gupta
3bf9eaffdf Bugfix and add test coverage for zwave_js.light (#93257)
Add test coverage for zwave_js.light
2023-05-22 12:08:29 -04:00
Raman Gupta
18eeeaaf68 Refactor zwave_js.fan and add tests (#93256)
* Refactor zwave_js.fan and add tests

* fix const
2023-05-22 12:08:13 -04:00
Raman Gupta
03300c24da Bugfix and small refactor for zwave_js.device_action (#93261)
Improve test coverage for zwave_js.device_action
2023-05-22 18:04:04 +02:00
Raman Gupta
e1dd7118e0 Refactor zwave_js.sensor and add test coverage (#93259)
* Refactor zwave_js.sensor and add test coverage

* use walrus

* inherit config parameter class from list class

* use walrus in more places

* improve config parameter test
2023-05-22 11:58:10 -04:00
Raman Gupta
d6997d8656 Improve test coverage for zwave_js.trigger (#93260)
Improve coverage for zwave_js.trigger
2023-05-22 17:55:03 +02:00
J. Nick Koston
5d02be5d7f Fix august configuration url with Yale Home brand (#93361)
* Fix august configuration url with Yale Home brand

changelog: https://github.com/bdraco/yalexs/compare/v1.4.6...v1.5.0

* bump
2023-05-22 10:39:56 -05:00
Jan Bouwhuis
a81fe517c1 Make mqtt device_tracker state_topic optional when json_attribute_topic is used (#93322)
* Make device_tracker state_topic optional

* No state_topic needed
2023-05-22 15:49:18 +02:00
David Knowles
4d44d60e73 Move HydrawiseEntity into entity.py (#93359) 2023-05-22 15:47:32 +02:00
Franck Nijhof
9eca234948 Update Home Assistant base image to 2023.05.0 (#93350) 2023-05-22 15:45:29 +02:00
Franck Nijhof
7537667e53 Adjust counter to not restore configuration parameters (#93344) 2023-05-22 15:27:44 +02:00
Franck Nijhof
f2899a19c1 Deprecate counter.configure service (#93343) 2023-05-22 15:27:33 +02:00
Dmitry Vlasov
6df030a455 Update zwave-me-ws version to 0.4.3 (#93348)
Up zwave-me-ws to 0.4.3
2023-05-22 15:20:18 +02:00
David Knowles
ab8a13ae6b Add myself as a code owner of the Hydrawise integration (#93358) 2023-05-22 15:15:20 +02:00
David Knowles
3d6d650a16 Move Hydrawise constants into const.py (#93357) 2023-05-22 15:11:32 +02:00
Raman Gupta
ec12d9a197 Improve test coverage for zwave_js (#93262) 2023-05-22 12:20:01 +02:00
Jan Bouwhuis
5bc825a8ab Add advanced imap option to set custom event max message size (#93163) 2023-05-22 12:14:06 +02:00
Raman Gupta
4b67839e19 Bump zwave-js-server-python to 0.48.1 (#93342)
* Bump zwave-js-server-python to 0.48.1

* fix mypy
2023-05-22 11:06:34 +02:00
Aaron Bach
d16452bed7 Bump aionotion to 2023.05.5 (#93334) 2023-05-22 10:14:52 +02:00
Tom
79cafd5a46 Plugwise prepare typing for binary_sensor (#93162) 2023-05-22 09:19:00 +02:00
J. Nick Koston
aa937b1640 Use slots for template RenderInfo (#93337) 2023-05-22 08:52:49 +02:00
Franck Nijhof
31c0374c98 Update apprise to 1.4.0 (#93331) 2023-05-22 07:31:02 +02:00
Franck Nijhof
69770bac22 Update sentry-sdk to 1.23.1 (#93330) 2023-05-21 22:09:52 -04:00
Steven Looman
63c2b5868e Bump async-upnp-client to 0.33.2 (#93329)
* Bump async-upnp-client to 0.33.2

* Fix tests
2023-05-21 17:17:08 -05:00
Álvaro Fernández Rojas
c3cd60e0cb Fix pressure for AEMET stations close to sea level (#87094) 2023-05-21 22:17:26 +02:00
Luke
2cc9fcc977 Add scaffolds to vscode tasks (#92015) 2023-05-21 21:29:33 +02:00
Joost Lekkerkerker
c12fae4775 Bump TwitchAPI to 3.10.0 (#92418)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-05-21 21:13:59 +02:00
J. Nick Koston
e27554f7a6 Improve http handler performance (#93324) 2023-05-21 13:36:03 -05:00
J. Nick Koston
ab0d35df92 Add zeroconf support to roomba (#93309) 2023-05-21 16:12:19 +02:00
Ernst Klamer
40c74ad5b7 Add support for sleepy BTHome devices (#92991)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-21 09:01:09 -05:00
starkillerOG
5821a563c7 Bump motionblinds to 0.6.18 (#93300) 2023-05-21 15:20:50 +02:00
henryptung
8a0f3a8c88 Fix Broadlink discovery for new RM Mini3 (again) (#93158) 2023-05-21 14:53:06 +02:00
Maciej Bieniek
d47e58fb38 Bump accuweather to version 1.0.0 (#93305) 2023-05-21 14:50:10 +02:00
J. Nick Koston
90984c34a9 Fix double call to options in sensor state (#93311) 2023-05-21 15:42:19 +03:00
J. Nick Koston
780f9bcdc0 Fix shutdown being delayed for cancelling tasks (#93287) 2023-05-21 14:17:34 +02:00
rikroe
72c76d35cc Bump bimmer_connected to 0.13.6 (#93307) 2023-05-21 14:16:47 +02:00
G Johansson
e676cbe9f2 Fix import issue in Workday (#92727)
* Workday fix import

* Messages
2023-05-21 10:13:36 +02:00
G Johansson
ddb9a6e33c Add change service to timer (#84775)
* Add change service

* test subtract

* Test no change if timer not running

* Modify example

* Raise

* Finalize

* test event

* Fix tests

* Fix tracking time
2023-05-21 10:11:08 +02:00
J. Nick Koston
fc7a421a48 Fix lookin falling back to polling too quickly (#93227) 2023-05-20 14:41:16 -05:00
J. Nick Koston
cbee514c2a Bump sqlalchemy to 2.0.15 (#93293) 2023-05-20 14:26:33 -05:00
J. Nick Koston
2a2b19ed7c Add support for Yale Home brand to august (#93214) 2023-05-20 09:42:19 -05:00
Mick Vleeshouwer
fa415480d6 Bump pyoverkiz to 1.7.9 (#93275)
Update PyOverkiz to v1.7.9
2023-05-20 12:52:43 +01:00
Jafar Atili
1935e126bf Add new integration to control Electra Smart HVAC devices (#70361)
* Added new integration to support Electra Smart (HVAC)

* fixes + option to set scan interval

* renamed the module to electrasmart and added unittests

* added non tested files to .coveragerc

* changed the usage from UpdateCoordinator to each entity updates it self

* small fixes

* increased pypi package version, increased polling timeout to 60 seconds, improved error handling

* PARALLEL_UPDATE=1 to prevent multi access to the API

* code improvements

* aligned with the new HA APIs

* fixes

* fixes

* more

* fixes

* more

* more

* handled re-atuh flow

* fixed test

* removed hvac action

* added shabat mode

* tests: 100% coverage

* ran hassfest

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/climate.py

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

* address Shay's comments

* address Shay's comments

* address more comments

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2023-05-20 13:13:32 +03:00
Tom Brien
09a8479cf0 Add MASK wallets to Coinbase (#90742) 2023-05-19 22:31:19 +01:00
Luke
0ce1117287 Bump Roborock to 17.0 adding device specific support and bugfixes (#92547)
* init commit

* use official version release

* remove options

* moved first refresh to gather

* add extra tests

* remove model_sepcification

* remove old mqtt test

* bump to 13.4

* fix dndtimer

* bump to 14.1

* add status back

* bump to 17.0

* remove error as it is not used

* addressing mr comments

* making enum access use get()

* add check for empty hass data
2023-05-18 20:55:39 -07:00
J. Nick Koston
aebded049b Mark oralb devices as sleepy (#93250) 2023-05-18 16:32:24 -05:00
J. Nick Koston
be08bb5ba6 Convert proximity to be async (#93241) 2023-05-18 16:32:12 -05:00
Jan Čermák
3cdcfb1654 Bump rapt-ble to v0.1.1 (#93242) 2023-05-18 14:15:39 -05:00
Ville Skyttä
cb22154b36 Capture warnings.warn and friends messages in logs (#85875)
The default behavior of these warnings is to go to stderr, which in
some setups goes easily unnoticed. For example in Docker based ones,
they end up only in the container logs, and not e.g. in the HA log.

Capture these to make them available in logs where other such messages
are, and to make them subject to filtering as usual.
https://docs.python.org/3/library/logging.html#logging.captureWarnings
2023-05-18 21:41:13 +03:00
Guido Schmitz
3abcffe3a0 Raise on reauth in devolo Home Network switch platform (#92850) 2023-05-18 11:28:17 -05:00
Andre Lengwenus
0fca90127b Bump pypck to 0.7.17 (#93234) 2023-05-18 11:26:37 -05:00
J. Nick Koston
763b898621 Add always connected option to Yale Access Bluetooth (#93224)
* Add always connected option to Yale Access Bluetooth

If the lock does not support push updates via advertisements or you want lock operation to be more responsive, you can enable always connected mode. Always connected will cause the lock to stay connected to Home Assistant via Bluetooth, which will use more battery.

* Update homeassistant/components/yalexs_ble/config_flow.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-18 10:48:04 -05:00
J. Nick Koston
2eef2ed911 Add option to disable webhooks in ONVIF (#93186) 2023-05-18 10:34:09 -05:00
Ville Skyttä
0c51de25a2 Update UpCloud config entry data on successful reconfig (#68718)
* Update UpCloud config entry data on successful reconfig

* Add already configured test

* Improve success case request mocking

So that the data fetch that might happen in the background after success
won't trash the test log with misleading errors.

* Simplify already configured test

Thanks-to: Martin Hjelmare <marhje52@gmail.com>
2023-05-18 16:04:27 +03:00
Joakim Plate
ae7930c0ad Use entity translation in dsmr (#93017)
* Use entity translation in dsmr

* Combine a few strings
2023-05-17 22:31:04 +02:00
epenet
6481ee3c82 Fix lingering timers in yeelight (#92118) 2023-05-17 22:08:49 +02:00
epenet
dad3fbf5e2 Fix lingering timer in esphome (#92533) 2023-05-17 22:05:44 +02:00
J. Nick Koston
3f43184187 Speed up signing paths (#93127) 2023-05-17 22:01:13 +02:00
MatthewFlamm
d0460d5424 Fix NWS error with no observation (#92997)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-17 22:00:13 +02:00
Aaron Bach
b9798e4f4f Add support for SimpliSafe Smoke+CO detector (#93217) 2023-05-17 21:56:49 +02:00
Michael Benz
0828cc0e44 Add light entity to Tuya Air Purifiers (#92861) 2023-05-17 20:16:54 +01:00
Franck Nijhof
1173039392 Add virtual integration: Whisper (#93183) 2023-05-17 13:34:09 +02:00
Franck Nijhof
08fd0fd441 Add virtual integration: Piper (#93182) 2023-05-17 13:33:52 +02:00
J. Nick Koston
af1bac8745 Disconnect yale access locks at the stop event (#93192) 2023-05-17 13:25:28 +02:00
Nerdix
7cdd6b4cbc Increase timeout to 30 seconds for homeassistant_alerts integration (#93089) 2023-05-17 13:15:28 +02:00
J. Nick Koston
00b600bfa8 Fix ONVIF cameras that change the xaddr for the pull point service (#93104) 2023-05-17 13:14:31 +02:00
Franck Nijhof
fb7c579216 Add missing entity attribute translations to humidifier entity component (#93206) 2023-05-17 13:10:08 +02:00
J. Nick Koston
32481065a8 Increase size of valid entity id cache (#93125) 2023-05-17 13:06:52 +02:00
Ziv
f564a0ca24 Fix failure to register services in dynalite (#93069)
* fixed bug that fails to register services when there is no YAML config

* style improvement per thecode's suggestion
2023-05-17 14:05:36 +03:00
Matthias Alphart
c522ea855d KNX Group Monitor: Load latest 50 Telegrams on start (#93153)
* remove impossible test

IndividualAddress telegrams are not processed by xknx.telegram_queue

* Use Telegrams helper class for group monitor messages

* Store 50 telegrams in deque for group monitor

* Send recent telegrams at once on connection of group monitor

* Update KNX-frontend to support group monitor prepopulation
2023-05-17 09:58:00 +02:00
J. Nick Koston
b993fe1c9d Cache generation of the service descriptions (#93131) 2023-05-16 21:42:37 -05:00
tronikos
6c56ceead0 Create Google Generative AI Conversation integration (#93156)
* Copy openai_conversation to google_generative_ai_conversation
This is to improve diff of the next commit with the actual implementation.

Commands used:
cp -r homeassistant/components/openai_conversation/ homeassistant/components/google_generative_ai_conversation/
cp -r tests/components/openai_conversation/ tests/components/google_generative_ai_conversation/

find homeassistant/components/google_generative_ai_conversation/ tests/components/google_generative_ai_conversation/ -type f | xargs sed -i \
-e 's@openai_conversation@google_generative_ai_conversation@g' \
-e 's@OpenAI Conversation@Google Generative AI Conversation@g' \
-e 's@balloob@tronikos@g'

* Add google_generative_ai_conversation to Google brand

* Google Generative AI Conversation

* Sync recent openai changes

* handle empty responses
2023-05-16 21:05:56 -04:00
rikroe
defc23cc7c Fix china login for bmw_connected_drive (#93180)
* Bump bimmer_connected to 0.13.5

* Fix snapshots after dependency bump

* Load gcid from config entry if available

* Add tests

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-17 02:03:01 +02:00
J. Nick Koston
210c309770 Bump pyatv to 0.11.0 (#93172) 2023-05-16 18:52:18 -05:00
Aaron Bach
e48961d29b Bump regenmaschine to 2023.05.1 (#93139) 2023-05-16 16:28:20 -06:00
J. Nick Koston
bf16f6b104 Remove as_compressed_state cache (#93169)
* Remove as_compressed_state cache

All calls to as_compressed_state are now covered by a higher level
JSON cache so there is no need to store these in memory anymore

* Remove as_compressed_state cache

All calls to as_compressed_state are now covered by a higher level
JSON cache so there is no need to store these in memory anymore
2023-05-16 12:39:16 -05:00
Ville Skyttä
e949344dd9 Huawei LTE connection management cleanups (#85929)
* Disconnect rather than just logout at end of config flow

Neither the connection or the requests session will be reused, so
there's no reason just to logout. Do all of the connection closure
so we get all of huawei-lte-api's cleanups explicitly done.

* Name connect functions consistently, analoguous to disconnect
2023-05-16 20:34:03 +03:00
Maciej Bieniek
685016052b Bump accuweather to version 0.5.2 (#93130) 2023-05-16 11:38:17 -05:00
Álvaro Fernández Rojas
e5c12122e2 Update aioairzone to v0.5.6 (#93146) 2023-05-16 12:51:22 +02:00
epenet
9bd49e4f1d Fix lingering timer in usgs_earthquakes_feed (#93084) 2023-05-16 11:13:14 +02:00
J. Nick Koston
32b70ea133 Bump PyJWT to 2.7.0 (#93128) 2023-05-16 10:26:04 +02:00
J. Nick Koston
99265a983a Speed up reconnects by caching state serialize (#93050) 2023-05-16 02:33:12 -05:00
J. Nick Koston
9c039a17ea Bump guppy3 to 3.1.3 (#93124) 2023-05-16 08:26:17 +02:00
epenet
f6b700372a Allow wemo config entry to be unloaded (#93082)
* Fix lingering timer in wemo

* Also stop the subscriptions
2023-05-16 06:31:31 +02:00
Guido Schmitz
36332eb441 Bump devolo_plc_api to 1.3.1 (#93099) 2023-05-15 20:12:44 -05:00
Matthias Alphart
2f8e8901fc Add KNX interface device trigger for telegrams (#93102)
* telegram device trigger initial

* add Telegrams helper class

to parse and convert Telegram only once instead of once per device trigger

* translation

* label for extra_field

* test device trigger

* test trigger callback removal

* rename extra_field key to same name as used in trigger

* typo
2023-05-15 22:59:29 +02:00
J. Nick Koston
72a6d3a748 Re-enable cleanup_closed on cpython >= 3.11.4 (#93120) 2023-05-15 21:29:41 +02:00
luar123
d8d4446563 Bump snapcast to 2.3.3 (#93112)
bump snapcast to 2.3.3
2023-05-15 22:29:28 +03:00
J. Nick Koston
b400c53159 Bump pyunifiprotect to 4.9.0 (#93106)
changelog: https://github.com/AngellusMortis/pyunifiprotect/compare/v4.8.3...v4.9.0
2023-05-15 22:26:29 +03:00
J. Nick Koston
64623283b2 Bump aioesphomeapi to 13.7.5 (#93121)
performance improvements

changelog: https://github.com/esphome/aioesphomeapi/compare/v13.7.4...v13.7.5
2023-05-15 22:24:17 +03:00
luar123
209650dca1 Remove snapcast friendly_name attribute (#93116)
Remove friendly_name attribute and fix names
2023-05-15 22:23:24 +03:00
epenet
b38a7aabe9 Fix lingering timer in withings (#93085) 2023-05-15 21:20:20 +02:00
Pascal Vizeli
cf957f1880 Bump aioecowitt 2023.5.0 (#93094) 2023-05-15 21:19:27 +02:00
Jan Bouwhuis
c97e0f11a5 Fix last imap message is not reset on empty search (#93119) 2023-05-15 21:15:10 +02:00
Daniel Gangl
d12ea0040f Fix weather handling in zamg (#85635)
* TypeError handling in weather

* Check for None

* Use walrus operator as proposed
2023-05-15 19:26:02 +02:00
epenet
48ab74eedf Add missing mock in wiffi tests (#93083) 2023-05-15 11:15:19 +02:00
Jens Østergaard Nielsen
01dc27e2a2 Remove default unit of measurement in IHC sensors (#93054)
Remove sensor default unit of measurement
2023-05-15 09:50:39 +02:00
Stephan Uhle
55c675d0fd Bump pysml to 0.0.11 (#93035)
Updated pysml to 0.0.11
2023-05-15 09:15:22 +02:00
Pieter Viljoen
77f99e4162 Add MEASUREMENT state class to Sense Voltage sensors (#93044)
Add MEASUREMENT to Voltage sensors
2023-05-15 09:11:12 +02:00
J. Nick Koston
ef887e529f Fix onvif cameras that cannot parse relative time (#92711)
* Fix onvif cameras that cannot parse relative time

The spec requires that the camera can parse relative or absolute timestamps
However there are many cameras that cannot parse time correctly.

Much of the event code has been offloaded to the library and
support to determine if the camera has broken time and switch
to absolute timestamps is now built into the library

* adjust verison

* fixes

* bump

* bump

* bump

* more fixes

* preen

* fix resume

* one more fix

* fix race in webhook setup

* bump to 3.1.3 which has more fixes for broken camera firmwares

* bump 3.1.4 for more fixes

* fix

* fix comment

* bump

* fix url limit

* bump

* more fixes

* old hik uses -s
2023-05-14 16:08:39 -04:00
J. Nick Koston
d5a0824924 Use futures instead of asyncio.Event for async_get_integrations (#93060)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-05-14 14:42:04 -05:00
Paulus Schoutsen
e0a97ec90d 2023.5.3 (#93066) 2023-05-14 13:00:18 -04:00
J. Nick Koston
b95405a7e9 Small performance improvements to state diff messages (#92963)
Adds missing test coverage
2023-05-14 12:28:34 -04:00
J. Nick Koston
3314eed8d1 Switch to using a ContextVar for template RenderInfo (#93016)
The ContextVar is about 40% faster than the attr
and dict lookups
2023-05-14 12:23:31 -04:00
J. Nick Koston
2848f8648d Log last message when websocket reaches peak limit (#93038)
When we hit the absolute limit, we would log the last messages as
it was key to finding out the source. We now do the same when
we hit the peak limit
2023-05-14 12:22:19 -04:00
Paulus Schoutsen
1f6a601fc9 Bumped version to 2023.5.3 2023-05-14 12:11:32 -04:00
Aaron Bach
ff14277805 Fix a series of bugs due to Notion API changes (#93039)
* Fix a series of bugs due to Notion API changes

* Simplify

* Reduce blast radius

* Reduce blast radius

* Fix tests
2023-05-14 12:11:22 -04:00
J. Nick Koston
6424dee231 Fix sslv2/sslv3 with unverified connections (#93037)
In #90191 we use the same ssl context for httpx now to avoid
a memory leak, but httpx previously allowed sslv2/sslv3 for
unverified connections

This reverts to the behavior before #90191
2023-05-14 12:11:21 -04:00
J. Nick Koston
13c51e9c34 Disable cleanup_closed for aiohttp.TCPConnector with cpython 3.11.1+ (#93013)
* Disable cleanup_closed for aiohttp.TCPConnector with cpython 3.11.2+

There is currently a relatively fast memory leak when using
cpython 3.11.2+ and cleanup_closed with aiohttp

For my production instance it was leaking ~450MiB per day
of `MemoryBIO`, `SSLProtocol`, `SSLObject`, `_SSLProtocolTransport`
`memoryview`, and `managedbuffer` objects

see https://github.com/aio-libs/aiohttp/issues/7252
see https://github.com/python/cpython/pull/98540

* Update homeassistant/helpers/aiohttp_client.py
2023-05-14 12:11:20 -04:00
puddly
304c34a119 Bump bellows to 0.35.5 to fix Aqara Zigbee connectivity issue (#92999)
Bump bellows to 0.35.5
2023-05-14 12:11:19 -04:00
starkillerOG
d840d27f2d Bump reolink-aio to 0.5.15 (#92979) 2023-05-14 12:11:18 -04:00
Michael
a8cf3fadaa Fix remove of device when surveillance station is not used in Synology DSM (#92957) 2023-05-14 12:11:17 -04:00
Joost Lekkerkerker
a3f3b43c20 Bump python-vehicle to 1.0.1 (#92933) 2023-05-14 12:11:17 -04:00
Robert Hillis
b0520ccb94 Bump eternalegypt to 0.0.16 (#92919) 2023-05-14 12:11:16 -04:00
Jonathan Keslin
fe308e26dc Bump volvooncall to 0.10.3 to fix sensor type error (#92913) 2023-05-14 12:11:15 -04:00
Michael
60fb71159d Fix uptime sensor deviation detection in Fritz!Tools (#92907) 2023-05-14 12:11:14 -04:00
G Johansson
413dbe89e5 Fix already_configured string in workday (#92901)
* Fix already_configured string in workday

* Fix strings
2023-05-14 12:11:13 -04:00
J. Nick Koston
7abe9f1f9a Bump bluetooth-auto-recovery to 1.2.0 (#92893) 2023-05-14 12:11:12 -04:00
Glenn Waters
252b99f00b Bump UPB integration library to 0.5.4 (#92879) 2023-05-14 12:11:11 -04:00
J. Nick Koston
8e407334b7 Add ONVIF services to diagnostics (#92878) 2023-05-14 12:11:10 -04:00
puddly
91faa31e8c Bump ZHA dependencies (#92870) 2023-05-14 12:11:09 -04:00
Michael Hansen
5e77de35bd Allow "no" to match "nb" in language util (#92862)
* Allow "no" to match "nb"

* Adjust comparison for speed
2023-05-14 12:11:09 -04:00
jjlawren
c1b18dcbba Bump sonos-websocket to 0.1.1 (#92834) 2023-05-14 12:11:08 -04:00
Diogo Gomes
3c45bda0e8 Don't try to restore unavailable nor unknown states (#92825) 2023-05-14 12:11:07 -04:00
Álvaro Fernández Rojas
7361c29cba Update aioairzone to v0.5.5 (#92812) 2023-05-14 12:11:06 -04:00
Álvaro Fernández Rojas
a551de06c7 Fix Airzone Auto operation mode (#92796) 2023-05-14 12:11:05 -04:00
Erik Montnemery
84ce2f13f2 Fix race in Alexa async_enable_proactive_mode (#92785) 2023-05-14 12:11:04 -04:00
Álvaro Fernández Rojas
5c949bd862 Update aioairzone to v0.5.3 (#92780) 2023-05-14 12:11:03 -04:00
Keilin Bickar
16020d8ab9 Bump asyncsleepiq to 1.3.5 (#92759) 2023-05-14 12:11:02 -04:00
karwosts
f866d6100d Fix zwave_js services example data (#92748) 2023-05-14 12:11:01 -04:00
Brandon Rothweiler
8d0da78fab Increase timeout to 30 seconds for Mazda integration (#92744) 2023-05-14 12:11:00 -04:00
J. Nick Koston
7173a4f377 Bump aioesphomeapi to 3.7.4 to fix proxied BLE connections not retrying right away on error (#92741) 2023-05-14 12:11:00 -04:00
Eduard van Valkenburg
d4acb2a381 Update deprecated functions in SIA (#92737)
update deprecated functions
2023-05-14 12:10:59 -04:00
Shay Levy
b1111eb2c7 Bump aiowebostv to 0.3.3 to fix Python 3.11 support (#92736)
Bump aiowebostv to 0.3.3
2023-05-14 12:10:58 -04:00
Mick Vleeshouwer
4895ca218f Bump pyoverkiz to 1.7.8 (#92702) 2023-05-14 12:10:57 -04:00
Aaron Bach
91e9d21548 Bump aionotion to 2023.05.1 (#92697) 2023-05-14 12:10:56 -04:00
J. Nick Koston
996c6c4a92 Fix onvif reauth when device returns a http 401/403 error (#92690) 2023-05-14 12:10:55 -04:00
J. Nick Koston
96ff24aa2f Always request at least one zone for multi-zone LIFX devices (#92683) 2023-05-14 12:08:33 -04:00
J. Nick Koston
dcc5940f9b Fix parallel_updates being acquired too late for entity executor jobs (#92681)
* Fix parallel_updates being acquired too late for entity executor jobs

* tweak
2023-05-14 12:08:33 -04:00
rikroe
dd51bba677 Bump bimmer_connected to 0.13.3 (#92648)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-14 12:08:32 -04:00
Luke
ac9da5c167 Roborock continue on failed mqtt disconnect (#92502)
continue on async disconnect failure
2023-05-14 12:08:31 -04:00
J. Nick Koston
e073f091b1 Cache ip address stringify in zeroconf (#92800)
stringify IPv6 addresses is expensive, and since zeroconf sees the same
ones over and over again an LRU can avoid the constant stringify
2023-05-14 12:07:38 -04:00
Aaron Bach
637941df4d Fix a series of bugs due to Notion API changes (#93039)
* Fix a series of bugs due to Notion API changes

* Simplify

* Reduce blast radius

* Reduce blast radius

* Fix tests
2023-05-14 12:07:15 -04:00
J. Nick Koston
e593ceaaf2 Fix sslv2/sslv3 with unverified connections (#93037)
In #90191 we use the same ssl context for httpx now to avoid
a memory leak, but httpx previously allowed sslv2/sslv3 for
unverified connections

This reverts to the behavior before #90191
2023-05-13 20:16:11 -04:00
J. Nick Koston
7d371a33bb Disable cleanup_closed for aiohttp.TCPConnector with cpython 3.11.1+ (#93013)
* Disable cleanup_closed for aiohttp.TCPConnector with cpython 3.11.2+

There is currently a relatively fast memory leak when using
cpython 3.11.2+ and cleanup_closed with aiohttp

For my production instance it was leaking ~450MiB per day
of `MemoryBIO`, `SSLProtocol`, `SSLObject`, `_SSLProtocolTransport`
`memoryview`, and `managedbuffer` objects

see https://github.com/aio-libs/aiohttp/issues/7252
see https://github.com/python/cpython/pull/98540

* Update homeassistant/helpers/aiohttp_client.py
2023-05-13 20:15:02 -04:00
imerla1
a9778c4236 fixed typo (#93029) 2023-05-13 21:05:55 +02:00
puddly
61cd36d628 Bump bellows to 0.35.5 to fix Aqara Zigbee connectivity issue (#92999)
Bump bellows to 0.35.5
2023-05-13 14:06:22 -04:00
Justas
0437926db8 Adding newly supported language codes to Google TTS (#93030) 2023-05-13 14:03:20 -04:00
G Johansson
01e131b278 Fix already_configured string in workday (#92901)
* Fix already_configured string in workday

* Fix strings
2023-05-13 10:42:04 +02:00
J. Nick Koston
81796fbf7b Bump orjson to 3.8.12 (#92935)
changes: https://github.com/ijl/orjson/releases/tag/3.8.12
2023-05-13 10:06:32 +03:00
starkillerOG
051d631504 Poll Reolink motion when ONVIF not available (#92837)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-12 18:48:32 +02:00
J. Nick Koston
8711735ec0 Improve websocket throughput and reduce latency (#92967) 2023-05-13 00:13:57 +09:00
Erik Montnemery
9a70f47049 Teach UnitlessRatioConverter about ppm and ppb (#92989) 2023-05-12 16:46:37 +02:00
Matrix
7807df4426 Fix yolink dimmer Incorrect state update (#92986)
fix state update
2023-05-12 16:15:04 +02:00
starkillerOG
4a50c3fbae Bump reolink-aio to 0.5.15 (#92979) 2023-05-12 23:04:36 +09:00
Michael
e883fef8ab Fix remove of device when surveillance station is not used in Synology DSM (#92957) 2023-05-12 23:02:42 +09:00
Álvaro Fernández Rojas
45e7283584 Add Airzone fan speed support (#92840) 2023-05-12 22:56:17 +09:00
Jan Bouwhuis
a05c20a498 Filter replaying unrelated retained MQTT messages when subscribing to share topics (#88826)
* Do not replay already processed retained subscr.

* Add tests

* Always replay wildcards

* Update tests for debouncer

* Rework for retained topics

* Fix test

* Correct comment

* Add cleanup and test

* Fix key error

* Correct helper

* Rename mock

* Add comment on function _retained_init

* Always replay initial retained payload

* Apply suggestion moving msg.retain to outer check

* Improve test on edge case

* Improve comment formatting

* Follow up comment - improve comments on test

* Update homeassistant/components/mqtt/client.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-12 15:23:05 +02:00
Robert Hillis
bd7e943efe Move Netgear LTE services to their own file (#92945)
* Move Netgear LTE services to their own file

* Update homeassistant/components/netgear_lte/services.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-12 15:18:34 +02:00
Erik Montnemery
30f52b8d96 Minor typing adjustment in entity_platform (#92978) 2023-05-12 15:17:01 +02:00
J. Nick Koston
93bfd7d8d0 Small speed up to validating entity ids (#92970) 2023-05-12 15:04:09 +02:00
Piotr Tobolski
02b5d643e7 Add unique_id support to history_stats sensor (#92972) 2023-05-12 15:03:06 +02:00
J. Nick Koston
24284fe379 Speed up validating domains in templates (#92975)
This path gets called quite a bit since most templates
access the state via states.DOMAIN...
2023-05-12 14:57:51 +02:00
Erik Montnemery
5a7c3aaa2d Add sensor device class volatile_organic_compounds_parts (#92973) 2023-05-12 14:37:54 +02:00
Erik Montnemery
7546e8efa4 Remove stale comment from sensor.const (#92974) 2023-05-12 14:34:29 +02:00
Robert Hillis
b4e85b7692 Move Netgear LTE entity to its own file (#92944) 2023-05-12 13:29:56 +02:00
Álvaro Fernández Rojas
e9705364a8 Fix Airzone Auto operation mode (#92796) 2023-05-12 16:07:29 +09:00
J. Nick Koston
809f394ff5 Bump sqlalchemy to 2.0.13 (#92936) 2023-05-12 04:37:16 +09:00
Joost Lekkerkerker
30c35e7398 Bump python-vehicle to 1.0.1 (#92933) 2023-05-11 21:31:17 +02:00
Ian
0fcf8f968b Move nextbus constants and utils (#92211)
* NextBus: Move general components to const and util

* Remove not yet used code
2023-05-11 17:28:29 +01:00
Robert Hillis
aee3f115d6 Move Netgear LTE constants to their own file (#92924)
* Move Netgear LTE parts to their own files

* Revert to only move constants

* uno mas
2023-05-11 16:49:11 +01:00
J. Nick Koston
52c773a776 Always request at least one zone for multi-zone LIFX devices (#92683) 2023-05-11 12:02:32 +02:00
Erik Montnemery
c1f716487c Include data for entire periods in response to recorder/statistics_during_period (#92848)
* Include data for entire periods in response to recorder/statistics_during_period

* Break out function for calculating the end of the month
2023-05-11 11:28:33 +02:00
Franck Nijhof
67d5ca4894 Mark entities from the sun as diagnostic (#92909) 2023-05-11 18:27:19 +09:00
Bram Kragten
75f8ea48f4 Add tts get engine ws command (#92336)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-11 10:51:00 +02:00
Erik Montnemery
4568207f9b Support calculating changes between consecutive sum statistics (#92823)
* Support calculating changes between consecutive sum statistics

* Add support for unit conversion when calculating change

* Don't include sum in WS response unless requested

* Improve tests

* Break out calculating change to its own function

* Improve test coverage
2023-05-11 10:05:58 +02:00
J. Nick Koston
8b57d31eba Add ONVIF services to diagnostics (#92878) 2023-05-11 17:03:31 +09:00
Jonathan Keslin
c14efef582 Bump volvooncall to 0.10.3 to fix sensor type error (#92913) 2023-05-11 09:42:04 +02:00
epenet
949e8f7b13 Migrate rest notify to httpx (#90769) 2023-05-11 08:26:16 +01:00
Michael
26f7843800 Fix uptime sensor deviation detection in Fritz!Tools (#92907) 2023-05-11 09:10:06 +02:00
J. Nick Koston
bf2cfb8edf Bump bluetooth-auto-recovery to 1.2.0 (#92893) 2023-05-11 08:58:29 +02:00
epenet
0cc3e8200c Fix lingering timer in iaqualink (#92856) 2023-05-11 08:55:36 +02:00
epenet
2c79adad5e Fix lingering timer in flux (#92573) 2023-05-11 08:54:51 +02:00
Ståle Storø Hauknes
fbd06e0745 Add model name to Airthings integration (#92921) 2023-05-11 08:44:38 +02:00
Marc Mueller
2b59adc955 Update mypy to 1.3.0 (#92911) 2023-05-11 08:38:08 +02:00
J. Nick Koston
3c8659d5d7 Fix missing f-string in async_track_utc_time_change (#92916) 2023-05-11 08:37:15 +02:00
Ståle Storø Hauknes
2ea21e9c2a Adjust link for Airthings (cloud) devices (#92922) 2023-05-11 08:31:23 +02:00
Robert Hillis
14752fdfc2 Bump eternalegypt to 0.0.16 (#92919) 2023-05-10 20:32:14 -04:00
Ziv
dd7db85529 User config flow and custom panel for Dynalite integration (#77181) 2023-05-11 00:17:23 +02:00
Matthias Alphart
6250b0a230 Add a custom panel for KNX with a group monitor (#92355)
* Add KNX panel

* provide project data for the panel group monitor

* upload and delete project from panel

* test project store

* more tests

* finish tests

* use integers for DPTBinary payload monitor display

* add project to diagnostics

* require new frontend version

* update knx_frontend

* review suggestions

* update xknxproject to 3.1.0

---------

Co-authored-by: Marvin Wichmann <me@marvin-wichmann.de>
2023-05-11 00:13:22 +02:00
Flo
0f2caf864a Alexa Intent: Use the 'id' field and expose nearest resolutions as variables (#86709)
* Use the 'id' field and nearest resolutions
Expose nearest Resolution (ID and Value) as Variables

* Add more specific type hints

* Change type definition of request

* Add deprecation warning and remove variables

* Remove deprecation warning & update tests

* Fix wrong value assignment

* revert future changes
2023-05-10 21:25:08 +02:00
Franck Nijhof
97cac66195 Add counter.set_value service (#92863) 2023-05-10 18:52:10 +02:00
puddly
98b91bcad9 Bump ZHA dependencies (#92870) 2023-05-10 18:04:46 +02:00
Glenn Waters
74c26fb5e0 Bump UPB integration library to 0.5.4 (#92879) 2023-05-10 18:03:38 +02:00
Dave T
4d26486c98 Add minor comment to assist development in aurora_abb_powerone (#90936)
Add comment to assist development
2023-05-10 15:53:00 +02:00
Kashif Khan
7439ca5b1a Bump azure-servicebus to 7.10.0 (#92866) 2023-05-10 12:36:44 +02:00
Malte Franken
649557ed2e Add config flow to geo_json_events (#87062)
* migrated geo_json_events integration to config flow

* improve test coverage

* code reformatting

* fix tests

* fix entity manager

* changes after review

* improve test coverage and fixed form

* remove unused code

* remove commented out code

* changes after review

* make title prettier

* fixed tests

* simplified code

* changes after review

* fix test

* push deprecation out

* changes after review

* changes after review

* changes after review

* changes after review

* changes after review

* removed scan interval from user flow and import flow
2023-05-10 10:28:45 +02:00
Arkadii Yakovets
0c0d59d3e2 Correct workday strings typo (#92880) 2023-05-10 09:47:42 +02:00
epenet
be040f8259 Bump samsungtvws to 2.6.0 (#92876) 2023-05-10 08:52:38 +09:00
Diogo Gomes
23e24d75dc Don't try to restore unavailable nor unknown states (#92825) 2023-05-09 22:22:06 +02:00
Jan Bouwhuis
9e9073d5da Move raise on MQTT publish outside lock (#92860)
* Move raise outside lock

* Move log too
2023-05-09 20:55:29 +02:00
Michael Hansen
5d6ccd6a32 Allow "no" to match "nb" in language util (#92862)
* Allow "no" to match "nb"

* Adjust comparison for speed
2023-05-09 13:46:57 -05:00
Erik Montnemery
7d29d584fd Fix race in Alexa async_enable_proactive_mode (#92785) 2023-05-09 19:58:00 +02:00
Erik Montnemery
67c1051305 Allow setting an entity's name by its device class (#90767)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-09 18:55:55 +02:00
epenet
337b59ba23 Fix lingering timer in hassio (#92854) 2023-05-09 18:42:04 +02:00
kernelpanic85
923276a333 Bump panacotta to 0.2 (#92797) 2023-05-09 18:28:10 +02:00
epenet
5f7496f97b Fix lingering timer in hue light tests (#92858) 2023-05-09 17:07:23 +02:00
Jan Bouwhuis
25549eed85 Debounce and group mqtt unsubscribes (#92201)
* Debounce MQTT unsubscribes and merge to one call

* Make _async_unsubscribe a callback

* Make sure unsubscribes are processed

* Move debug log out of lock

* Reduce calls and raise outside lock

* Cancel any unsubscribe when queing

* Copy pending unsubscribes

* Only convert topics to list once

* No copy needed

* Typo in comment
2023-05-09 16:36:19 +02:00
Álvaro Fernández Rojas
0199c6f5b2 Update aioairzone to v0.5.5 (#92812) 2023-05-09 09:21:47 +02:00
epenet
cc9de2cc21 Drop unused argument in hassio (#92820) 2023-05-09 08:54:55 +02:00
jjlawren
04c298b772 Bump sonos-websocket to 0.1.1 (#92834) 2023-05-09 07:58:56 +02:00
G Johansson
0bda869553 Lock entity options (#88139) 2023-05-08 22:06:11 +02:00
J. Nick Koston
cdc4b315e5 Bump aioesphomeapi to 3.7.4 to fix proxied BLE connections not retrying right away on error (#92741) 2023-05-08 18:56:06 +02:00
Jan Bouwhuis
689c6fbef7 Merge pending MQTT subscribes to a single call to the paho client (#92172)
* Merge mqtt subscribes in one call

* Cleanup

* cleanup, log outside of lock

* Remove function wrapper

* Add test that we bundle subscriptions
2023-05-08 15:37:25 +02:00
Álvaro Fernández Rojas
bafb01246a Update aioairzone to v0.5.3 (#92780) 2023-05-08 15:16:16 +02:00
Erik Montnemery
043812bfc3 Bump hass-nabucasa to 0.67.1 (#92484)
* Bump hass-nabucasa to 0.67.1

* Fix typing
2023-05-08 10:51:47 +02:00
G Johansson
6ad4e13b38 Manual trigger entity and refactor command_line switch (#91506)
* TriggerEntity to CoordinatorTriggerEntity

* _render_templates

* split manual vs coordinator

* name

* ManualTriggerEntity

* value

* Remove ManualTriggerEntity

* ManualTriggerEntity

* process_manual_data

* Add test

* imports

* Move ManualTriggerEntity

* cmd_line switch

* Review comments

* Fix templating

* Review comments

* Remove unneeded logging
2023-05-08 10:19:37 +02:00
G Johansson
2e65b77b2b Bump pytrafikverket to 0.3.3 (#92761) 2023-05-07 22:03:37 +02:00
Stephan Uhle
d14af51f56 Add debug logs for EDL21 (#92763) 2023-05-07 21:24:42 +02:00
Keilin Bickar
86e5efd929 Bump asyncsleepiq to 1.3.5 (#92759) 2023-05-07 20:58:14 +02:00
Brandon Rothweiler
bfb38d2f9c Increase timeout to 30 seconds for Mazda integration (#92744) 2023-05-07 17:32:11 +02:00
karwosts
266905a9d3 Fix zwave_js services example data (#92748) 2023-05-07 17:31:25 +02:00
G Johansson
5b8e72feda Fix regression in rainbird (#92745) 2023-05-07 17:11:55 +02:00
Joakim Plate
6fe596b64f Bump nibe to 2.2.0 (#92740) 2023-05-07 17:11:34 +02:00
Robert Hillis
54b303dfea Cleanup after removing D-Link yaml (#92739) 2023-05-07 16:49:34 +02:00
Robert Hillis
e753a33fd7 Fix regression in Skybell (#92735) 2023-05-07 16:48:49 +02:00
Eduard van Valkenburg
28efeb9d9e Update deprecated functions in SIA (#92737)
update deprecated functions
2023-05-07 16:47:02 +02:00
Shay Levy
78fa7fc5da Bump aiowebostv to 0.3.3 to fix Python 3.11 support (#92736)
Bump aiowebostv to 0.3.3
2023-05-07 16:33:15 +03:00
Guido Schmitz
f165a41b7a Add button platform to devolo Home Network (#85834)
* Add Start WPS button

* Add remaining buttons

* Set correct entity categories

* Inherit from DevoloEntity

* Fix mypy

* Apply feedback

* Raise on DevicePasswordProtected

* Fix ruff

* Really fix ruff

* Adapt to recent development

* Change error message
2023-05-07 14:53:46 +02:00
Gerard
8c67e96e38 Add AC current limit and Pre entry climatization (#92688)
* Add AC current limit and Pre entry climatization

Additional information available for EVs

* Add pre entry climatization

* Fix mypy error

* Change for black and mypy
2023-05-07 12:46:00 +02:00
Austin Mroczek
16c915864b Add diagnostic sensors for TotalConnect (#73152)
* add diagnostic sensors

* test binary_sensor.py file

* add tests for binary sensor

* fix zone type checks and error on unknown

* improve entity tests

* hide entities by default

* Revert "hide entities by default"

This reverts commit 9808d732471385e45ccc5f7c3aea93bfecbdfa6f.

* Update homeassistant/components/totalconnect/binary_sensor.py

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

* update binary_sensor per comments

* update test

* move to _attr_extra_state_attributes

* no spaces in unique_id

* update per balloob suggestions

* fix typing

* fix black and mypy

* Apply suggestions from code review

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

* add more to binary_sensor tests

* remove unused import

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-05-07 10:27:33 +02:00
andarotajo
bf6d429339 Add config flow to dwd_weather_warnings (#91040)
* Add config flow to dwd_weather_warnings

* Add additional test for more coverage

* Apply code review changes

* Apply further code review changes

* Rename constant for configuration

* Apply code review changes

* Simplify config flow code
2023-05-07 10:26:39 +02:00
Thijs W
b22c45ea29 Fix radio_id can be unavailable (#92698)
Allow radio_id to be unavailable
2023-05-07 08:59:36 +02:00
G Johansson
2c5cad4ca0 Clean config flow for SQL (#92332) 2023-05-07 01:42:37 +02:00
J. Nick Koston
f47f49c9a1 Reduce overhead to check bluetooth logging (#92512) 2023-05-07 01:30:54 +02:00
J. Nick Koston
ce3cb5864a Improve reliablity of recorder purge test (#92641) 2023-05-07 01:28:43 +02:00
epenet
7cb25e9710 Fix lingering timer in generic_hygrostat (#92575) 2023-05-07 01:28:10 +02:00
G Johansson
7e19bb4ee0 Minor cleanup config flow Workday (#92163) 2023-05-07 00:55:06 +02:00
J. Nick Koston
c624e50b60 Update onvif error checking to use explict None check (#92642) 2023-05-07 00:47:15 +02:00
Mick Vleeshouwer
4a2af45e37 Change IO_OUTLET_ENGINE sensor from Liter to Cubic Meters Per Hour in Overkiz (#92704) 2023-05-07 00:44:26 +02:00
Mick Vleeshouwer
99ab7c5a37 Bump pyoverkiz to 1.7.8 (#92702) 2023-05-07 00:36:21 +02:00
J. Nick Koston
d05724a42a Fix onvif reauth when device returns a http 401/403 error (#92690) 2023-05-07 00:12:24 +02:00
G Johansson
d66305ddd3 Remove dlink yaml import (#92590) 2023-05-07 00:01:58 +02:00
Marc Mueller
14fd5b7cda Update pylint to 2.17.4 (#92703) 2023-05-06 23:21:31 +02:00
Aaron Bach
c634d8f940 Bump aionotion to 2023.05.1 (#92697) 2023-05-06 13:11:57 -05:00
G Johansson
9538d8bcfe Bump pysensibo to 1.0.28 (#92684) 2023-05-06 12:02:09 -05:00
Luke
3f8ffcae73 Bump anova_wifi to 0.10.0 to add better debug (#92686)
add more debig
2023-05-06 18:32:44 +02:00
G Johansson
080ce51ed9 Remove issue from pushover (#92595)
* Remove issue pushover

* Remove strings
2023-05-06 16:49:34 +02:00
J. Nick Koston
4c3e98b77c Fix parallel_updates being acquired too late for entity executor jobs (#92681)
* Fix parallel_updates being acquired too late for entity executor jobs

* tweak
2023-05-06 16:46:00 +02:00
Artem Draft
d816da9355 Add media_player platform to Android TV Remote (#91677) 2023-05-06 09:18:34 -05:00
Christoffer Poulsen
053eaad2bd Add charging target sensor to bmw_connected_drive (#92628)
* Add chaging status sensor

* Add unit type based on review
2023-05-06 11:57:53 +02:00
Joakim Plate
f9fe3f4af4 Add nibe heat pump water heater entities (#79099)
* Add water heater platform

* Enable water heater platform

* No need to set target temp feature

* Split out preset mode

* Switch to parameters from lib

* Drop presets

* Add missing callback to coordinator update

* Drop support for heatpump activity

- Current entity model does not support it

* Handle s series lack of mappings

* Protect for missing operation modes to set
2023-05-06 11:41:11 +02:00
Sebastian Lövdahl
e680ec6247 Remove deprecated Vallox YAML configuration (#91096)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-05-06 10:23:14 +02:00
rikroe
7e041a95c9 Bump bimmer_connected to 0.13.3 (#92648)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-06 10:05:57 +02:00
rikroe
9a65a89aa4 Improve internet/API error handling for BMW (#90274)
* Improve internet/API error handling

* Switch to library exceptions for HTTP status errors

* Remove duplicate logging after reconnect

* Raise UpdateFailed instead of custom log handling

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-05-06 10:00:37 +02:00
Matthias Alphart
1af1f4db0c Fix devolo home lint errors from ruff (#92649) 2023-05-05 17:11:05 -05:00
Guido Schmitz
b195d5d1db Assemble platforms upfront in devolo Home Network (#80126)
* Assemble platforms upfront in devolo Home Network

* Add tests

* Optimize mocks

* Use async_forward_entry_setups

* Adapt tests to newly added switch platform
2023-05-05 23:01:57 +02:00
Tom Harris
bdd786b1f0 Cleanup Insteon to use Platform vs DOMAIN constants (#92366)
* Utilize Platform constant

* Use Platform constant
2023-05-05 21:32:51 +02:00
Guido Schmitz
2b3f7ad70d Add diagnostics to devolo Home Control (#86069)
* Add diagnostics to devolo Home Control

* Apply feedback
2023-05-05 21:24:42 +02:00
Paulus Schoutsen
e904edb12e 2023.5.2 (#92610) 2023-05-05 15:23:51 -04:00
mkmer
774f1c8ef9 Dont reload integration on auth error in Aladdin Connect (#92399)
Remove reload on auth error
2023-05-05 21:22:55 +02:00
mkmer
7a57435e8c Address connection error wording in Honeywell (#92488)
Connection error wording in Honeywell
2023-05-05 21:21:22 +02:00
Luke
f326dd919b Roborock continue on failed mqtt disconnect (#92502)
continue on async disconnect failure
2023-05-05 21:20:30 +02:00
G Johansson
82b4368d1d Bump pytrafikverket to 0.3.1 (#92425)
* Bump pytrafikverket 0.3.0

* 0.3.1

* mypy

* Fix exceptions
2023-05-05 21:19:16 +02:00
G Johansson
85dcd4007c Remove yaml config issue from steam_online (#92592)
Remove yaml config issue from steam
2023-05-05 21:02:40 +02:00
G Johansson
e597b3a862 Remove issue from skybell (#92602)
Remove issue
2023-05-05 20:56:49 +02:00
Steve Easley
6bbcf2f689 Add JVC Projector integration (#84748)
* Initial commit of jvcprojector

* Renamed domain

* Initial commit

* Support for v1.0.6 device api

* Fixed failing test

* Removed TYPE_CHECKING constant

* Removed jvc brand

* Removed constant rename

* Renaming more constants

* Renaming yet more constants

* Improved config_flow tests

* More changes based on feedback

* Moved config_flow dependency

* Removed default translation title

* Removed translation file

* Order manifest properly
2023-05-05 20:44:53 +02:00
J. Nick Koston
ddebfb3ac5 Fix duplicate ONVIF sensors (#92629)
Some cameras do not configure the video source correctly
when using webhooks but work fine with PullPoint which
results in duplicate sensors
2023-05-05 14:41:00 -04:00
J. Nick Koston
fe57901b5f Add support for visitor detections to onvif (#92350) 2023-05-05 14:40:59 -04:00
J. Nick Koston
73d4c73dbb Fix missing ONVIF events when switching from PullPoint to webhooks (#92627)
We now let the PullPoint subscription expire instead of explicitly
unsubscribing when pausing the subscription. We will still unsubscribe
it if Home Assistant is shutdown or the integration is reloaded

Some cameras will cancel ALL subscriptions when we do an unsubscribe
so we want to let the PullPoint subscription expire instead
of explicitly cancelling it.
2023-05-05 14:39:32 -04:00
Bram Kragten
f1bccef224 Update frontend to 20230503.3 (#92617) 2023-05-05 14:39:31 -04:00
Joost Lekkerkerker
cf243fbe11 Lower scan interval for OpenSky (#92593)
* Lower scan interval for opensky to avoid hitting rate limit

* Lower scan interval for opensky to avoid hitting rate limit

* Update homeassistant/components/opensky/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/opensky/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-05 14:39:30 -04:00
J. Nick Koston
35c48d3d0e Improve reliability of ONVIF subscription renewals (#92551)
* Improve reliablity of onvif subscription renewals

upstream changelog: https://github.com/hunterjm/python-onvif-zeep-async/compare/v2.0.0...v2.1.0

* ```
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/onvif/client.py", line 75, in _async_wrap_connection_error_retry
    return await func(*args, **kwargs)
  File "/Users/bdraco/home-assistant/homeassistant/components/onvif/event.py", line 441, in _async_call_pullpoint_subscription_renew
    await self._pullpoint_subscription.Renew(SUBSCRIPTION_RELATIVE_TIME)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/transports.py", line 235, in post_xml
    response = await self.post(address, message, headers)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/transports.py", line 220, in post
    response = await self.client.post(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1845, in post
    return await self.request(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1530, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1617, in send
    response = await self._send_handling_auth(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
    with map_httpcore_exceptions():
  File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadTimeout
```

* adjust timeouts for slower tplink cameras

* tweak

* more debug

* tweak

* adjust message

* tweak

* Revert "tweak"

This reverts commit 10ee2a8de7.

* give time in seconds

* revert

* revert

* Update homeassistant/components/onvif/event.py

* Update homeassistant/components/onvif/event.py
2023-05-05 14:39:29 -04:00
J. Nick Koston
bcbc8539a6 Fix missing ONVIF events when switching from PullPoint to webhooks (#92627)
We now let the PullPoint subscription expire instead of explicitly
unsubscribing when pausing the subscription. We will still unsubscribe
it if Home Assistant is shutdown or the integration is reloaded

Some cameras will cancel ALL subscriptions when we do an unsubscribe
so we want to let the PullPoint subscription expire instead
of explicitly cancelling it.
2023-05-05 14:38:36 -04:00
J. Nick Koston
c8c1466c06 Fix duplicate ONVIF sensors (#92629)
Some cameras do not configure the video source correctly
when using webhooks but work fine with PullPoint which
results in duplicate sensors
2023-05-05 14:32:55 -04:00
Bram Kragten
cd02a67847 Update frontend to 20230503.3 (#92617) 2023-05-05 14:27:48 -04:00
Joost Lekkerkerker
6d1e607756 Lower scan interval for OpenSky (#92593)
* Lower scan interval for opensky to avoid hitting rate limit

* Lower scan interval for opensky to avoid hitting rate limit

* Update homeassistant/components/opensky/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/opensky/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-05 14:27:28 -04:00
J. Nick Koston
9a589a3a54 Improve reliability of ONVIF subscription renewals (#92551)
* Improve reliablity of onvif subscription renewals

upstream changelog: https://github.com/hunterjm/python-onvif-zeep-async/compare/v2.0.0...v2.1.0

* ```
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/onvif/client.py", line 75, in _async_wrap_connection_error_retry
    return await func(*args, **kwargs)
  File "/Users/bdraco/home-assistant/homeassistant/components/onvif/event.py", line 441, in _async_call_pullpoint_subscription_renew
    await self._pullpoint_subscription.Renew(SUBSCRIPTION_RELATIVE_TIME)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/transports.py", line 235, in post_xml
    response = await self.post(address, message, headers)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/transports.py", line 220, in post
    response = await self.client.post(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1845, in post
    return await self.request(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1530, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1617, in send
    response = await self._send_handling_auth(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
    with map_httpcore_exceptions():
  File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadTimeout
```

* adjust timeouts for slower tplink cameras

* tweak

* more debug

* tweak

* adjust message

* tweak

* Revert "tweak"

This reverts commit 10ee2a8de7.

* give time in seconds

* revert

* revert

* Update homeassistant/components/onvif/event.py

* Update homeassistant/components/onvif/event.py
2023-05-05 14:26:58 -04:00
Jan Bouwhuis
53e533af6b Improve and enforce type hints for imap (#92325) 2023-05-05 19:21:57 +02:00
G Johansson
e41a75f617 Remove yaml import rainbird (#92599) 2023-05-05 16:53:40 +02:00
G Johansson
835be4758a Remove deprecated service for rainbird (#92601) 2023-05-05 07:22:07 -07:00
epenet
70bfbde8aa Add ability to shutdown a coordinator on STOP (#92611) 2023-05-05 16:05:03 +02:00
ollo69
8001ed865d Fix switchbot binary sensor translation key (#92557) 2023-05-05 08:04:11 -05:00
Paulus Schoutsen
15ef53cd9a Bumped version to 2023.5.2 2023-05-05 08:47:12 -04:00
Erik Montnemery
fb29e1a14e Bump hatasmota to 0.6.5 (#92585)
* Bump hatasmota to 0.6.5

* Fix tests
2023-05-05 08:47:08 -04:00
epenet
f8c3586f6b Fix hassio get_os_info retry (#92569) 2023-05-05 08:47:07 -04:00
Paulus Schoutsen
e8808b5fe7 Re-run expose entities migration if first time failed (#92564)
* Re-run expose entities migration if first time failed

* Count number of exposed entities

* Add tests

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-05-05 08:47:06 -04:00
J. Nick Koston
82c0967716 Bump elkm1-lib to 2.2.2 (#92560)
changelog: https://github.com/gwww/elkm1/compare/2.2.1...2.2.2

fixes #92467
2023-05-05 08:47:05 -04:00
J. Nick Koston
163823d2a5 Allow duplicate state updates when force_update is set on an esphome sensor (#92553)
* Allow duplicate states when force_update is set on an esphome sensor

fixes #91221

* Update homeassistant/components/esphome/entry_data.py

Co-authored-by: pdw-mb <pdw@mythic-beasts.com>

---------

Co-authored-by: pdw-mb <pdw@mythic-beasts.com>
2023-05-05 08:47:04 -04:00
puddly
2dd1ce2047 Handle invalid ZHA cluster handlers (#92543)
* Do not crash on startup when an invalid cluster handler is encountered

* Add a unit test
2023-05-05 08:47:03 -04:00
J. Nick Koston
241cacde62 Bump aioesphomeapi to 13.7.3 to fix disconnecting while handshake is in progress (#92537)
Bump aioesphomeapi to 13.7.3

fixes #92432
2023-05-05 08:47:02 -04:00
Erik Montnemery
8a11ee81c4 Improve cloud migration (#92520)
* Improve cloud migration

* Tweak

* Use entity_ids func

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-05-05 08:47:01 -04:00
J. Nick Koston
e3762724a3 Fix blocking I/O in the event loop when starting ONVIF (#92518) 2023-05-05 08:47:00 -04:00
karwosts
b973825833 Fix scene service examples (#92501) 2023-05-05 08:46:59 -04:00
Eduard van Valkenburg
b2fcbbe50e Fix for SIA Code not being handled well (#92469)
* updated sia requirements

* updates because of changes in package

* linting and other small fixes

* fix for unknown code

* added same to alarm_control_panel
2023-05-05 08:46:58 -04:00
Francesco Carnielli
d96b37a004 Fix power sensor state_class in Netatmo integration (#92468) 2023-05-05 08:46:57 -04:00
DDanii
affece8857 Fix transmission error handling (#91548)
* transmission error handle fix

* added unexpected case tests
2023-05-05 08:46:56 -04:00
epenet
b222c58642 Fix hassio get_os_info retry (#92569) 2023-05-05 08:43:56 -04:00
epenet
802e907a35 Migrate rest switch to httpx (#90768) 2023-05-05 14:43:39 +02:00
Erik Montnemery
5843c1fa3b Bump hatasmota to 0.6.5 (#92585)
* Bump hatasmota to 0.6.5

* Fix tests
2023-05-05 08:40:30 -04:00
epenet
176820d665 Fix lingering timer in freedns (#92572)
* Fix lingering timer in freedns

* type hint
2023-05-05 14:11:31 +02:00
Paulus Schoutsen
19dcc8c88f Re-run expose entities migration if first time failed (#92564)
* Re-run expose entities migration if first time failed

* Count number of exposed entities

* Add tests

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-05-05 08:11:09 -04:00
epenet
6f3c9324ac Fix lingering timer in hdmi_cec (#92579) 2023-05-05 14:10:44 +02:00
G Johansson
e55f2173f8 Use selectors in Trafikverket Train (#92554)
Use selectors
2023-05-05 13:29:00 +02:00
Eduard van Valkenburg
1976232d5a Fix for SIA Code not being handled well (#92469)
* updated sia requirements

* updates because of changes in package

* linting and other small fixes

* fix for unknown code

* added same to alarm_control_panel
2023-05-05 10:47:49 +02:00
epenet
603aa759d3 Fix KeyError in rest (#92464) 2023-05-05 09:05:31 +02:00
DDanii
9ce062411d Fix transmission error handling (#91548)
* transmission error handle fix

* added unexpected case tests
2023-05-05 08:42:51 +02:00
Erik Montnemery
b6664ce367 Improve cloud migration (#92520)
* Improve cloud migration

* Tweak

* Use entity_ids func

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-05-04 23:10:43 -04:00
J. Nick Koston
3f630493ff Allow duplicate state updates when force_update is set on an esphome sensor (#92553)
* Allow duplicate states when force_update is set on an esphome sensor

fixes #91221

* Update homeassistant/components/esphome/entry_data.py

Co-authored-by: pdw-mb <pdw@mythic-beasts.com>

---------

Co-authored-by: pdw-mb <pdw@mythic-beasts.com>
2023-05-04 22:21:42 -04:00
J. Nick Koston
6dd88a767b Bump elkm1-lib to 2.2.2 (#92560)
changelog: https://github.com/gwww/elkm1/compare/2.2.1...2.2.2

fixes #92467
2023-05-04 22:20:25 -04:00
J. Nick Koston
785faf4380 Bump aioesphomeapi to 13.7.3 to fix disconnecting while handshake is in progress (#92537)
Bump aioesphomeapi to 13.7.3

fixes #92432
2023-05-04 22:18:20 -04:00
puddly
5f22b0c6cc Handle invalid ZHA cluster handlers (#92543)
* Do not crash on startup when an invalid cluster handler is encountered

* Add a unit test
2023-05-04 20:02:17 -04:00
Franck Nijhof
9e529d1d59 Refactor of unique ID and entity description handling in Rituals Perfume Genie (#92545) 2023-05-04 21:54:28 +02:00
rrooggiieerr
7b8936b420 Add support for setting NumberMode using NumberEntityDescription (#92427) 2023-05-04 21:41:32 +02:00
Franck Nijhof
7d00804f13 Add entity descriptions to selects of Rituals Perfume Genie (#92522) 2023-05-04 20:13:04 +02:00
Franck Nijhof
80e9219546 Add entity descriptions to sensors of Rituals Perfume Genie (#92527) 2023-05-04 20:12:52 +02:00
Erik Montnemery
a72bcfde4a Refactor multipan options flow (#92175) 2023-05-04 19:50:43 +02:00
Jan Bouwhuis
56dcb908bc Wait for mqtt client to become available (#92524) 2023-05-04 19:48:32 +02:00
Franck Nijhof
677ab5837f Add entity descriptions to switch of Rituals Perfume Genie (#92531) 2023-05-04 19:20:58 +02:00
Franck Nijhof
dd3ae96d5f Add entity descriptions to numbers of Rituals Perfume Genie (#92486) 2023-05-04 19:13:05 +02:00
epenet
628236209b Fix lingering timer in cloud (#92498) 2023-05-04 19:10:44 +02:00
J. Nick Koston
7987b00d89 Fix blocking I/O in the event loop when starting ONVIF (#92518) 2023-05-04 12:05:29 -05:00
epenet
e0903b8bc4 Fix lingering timer in duckdns (#92516) 2023-05-04 19:03:54 +02:00
epenet
4d77c6f27f Fix lingering timer in elkm1 (#92517) 2023-05-04 19:03:26 +02:00
epenet
b6930c0f04 Fix lingering timer in demo geo_location (#92514) 2023-05-04 19:02:52 +02:00
Erik Montnemery
887e656570 Small improvement of assist_pipeline test coverage (#92115) 2023-05-04 19:01:41 +02:00
Paulus Schoutsen
bce18bf61a 2023.5.1 (#92513) 2023-05-04 12:45:55 -04:00
Francesco Carnielli
57af4672d5 Fix power sensor state_class in Netatmo integration (#92468) 2023-05-04 17:36:31 +02:00
karwosts
8237d6b9f0 Fix scene service examples (#92501) 2023-05-04 17:35:52 +02:00
Paulus Schoutsen
eda0731e60 Bumped version to 2023.5.1 2023-05-04 10:23:58 -04:00
Bram Kragten
238c87055f Update frontend to 20230503.2 (#92508) 2023-05-04 10:23:53 -04:00
Erik Montnemery
4b4464a3de Force migration of cloud settings to exposed_entities (#92499) 2023-05-04 10:23:52 -04:00
J. Nick Koston
a07fbdd61c Bump bluetooth-auto-recovery 1.1.2 (#92495)
Improve handling when getting the power state times out

https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/compare/v1.1.1...v1.1.2
2023-05-04 10:23:52 -04:00
J. Nick Koston
3126ebe9d6 Fix lifx light strips when color zones are not initially populated (#92487)
fixes #92456
2023-05-04 10:23:51 -04:00
Aaron Bach
89aec9d356 Bump aionotion to 2023.05.0 (#92451) 2023-05-04 10:23:49 -04:00
J. Nick Koston
0cfa566ff6 Fix onvif cameras with invalid encodings in device info (#92450)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-04 10:23:49 -04:00
J. Nick Koston
fffece95f5 Fix onvif setup when time set service is not functional (#92447) 2023-05-04 10:23:48 -04:00
Bram Kragten
d66fabb5b5 Update frontend to 20230503.2 (#92508) 2023-05-04 10:22:48 -04:00
J. Nick Koston
36cb8a7184 Bump bluetooth-auto-recovery 1.1.2 (#92495)
Improve handling when getting the power state times out

https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/compare/v1.1.1...v1.1.2
2023-05-04 09:53:43 -04:00
Erik Montnemery
e14be8b0ab Force migration of cloud settings to exposed_entities (#92499) 2023-05-04 09:53:28 -04:00
J. Nick Koston
9b74cb9507 Fix lifx light strips when color zones are not initially populated (#92487)
fixes #92456
2023-05-04 08:55:47 -04:00
epenet
8a9b9c35e0 Fix lingering timer in lifx (#92476)
* Fix lingering timer in lifx

* Remove duplicate code
2023-05-04 14:06:38 +02:00
Franck Nijhof
a73a66bb0c Add entity descriptions to binary sensors of Rituals Perfume Genie (#92485) 2023-05-04 13:54:57 +02:00
J. Nick Koston
41515249a0 Fix onvif cameras with invalid encodings in device info (#92450)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-04 06:48:13 -05:00
epenet
95023ecf08 Fix lingering timer in rfxtrx (#92461) 2023-05-04 12:27:17 +02:00
Erik Montnemery
78da1168db Adjust type hints in CloudClient (#92465) 2023-05-04 12:26:52 +02:00
Franck Nijhof
46bf0e59f3 Move naming of entities in Rituals Perfume Genie (#92482) 2023-05-04 12:25:22 +02:00
J. Nick Koston
5ee6595998 Bump dbus-fast to 1.86.0 (#92435) 2023-05-04 12:24:26 +02:00
epenet
9fca594777 Fix lingering timer in rflink (#92460) 2023-05-04 12:23:45 +02:00
Aaron Bach
b0b53574f9 Bump aionotion to 2023.05.0 (#92451) 2023-05-04 12:21:58 +02:00
epenet
71b86e9f97 Fix lingering timer in sabnzbd (#92462) 2023-05-04 12:19:40 +02:00
J. Nick Koston
88019d70fe Bump zeroconf to 0.62.0 (#92444) 2023-05-04 12:18:08 +02:00
J. Nick Koston
322c5152be Fix onvif setup when time set service is not functional (#92447) 2023-05-04 11:50:12 +02:00
epenet
7dc5d131b4 Fix lingering timer in jewish_calendar (#92470) 2023-05-04 11:38:24 +02:00
epenet
a4a795e35b Fix lingering timer in kira tests (#92471) 2023-05-04 11:28:05 +02:00
epenet
8ab8b7152a Fix lingering timer in kostal_plenticore (#92473) 2023-05-04 11:27:17 +02:00
epenet
6836e15d98 Add type hints to tests (#92477) 2023-05-04 11:25:35 +02:00
epenet
3b4828d736 Drop tmpdir from media_source tests (#92478) 2023-05-04 11:24:29 +02:00
epenet
1cca6f7c9e Fix lingering timer in shelly (#92466) 2023-05-04 10:34:15 +02:00
J. Nick Koston
ef9bcd9285 Bump zeroconf to 0.61.0 (#92424)
changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.60.0...0.61.0
2023-05-04 00:09:35 +03:00
Franck Nijhof
c61e29709c 2023.5.0 (#92422) 2023-05-03 20:46:28 +02:00
Michael Hansen
458fe17a48 Bump voip-utils to 0.0.7 (#92372) 2023-05-03 20:02:45 +02:00
Franck Nijhof
15fdefd23b Bumped version to 2023.5.0 2023-05-03 19:44:53 +02:00
Michael Hansen
576f9600b5 Pass OPUS payload ID through VoIP (#92421) 2023-05-03 19:44:34 +02:00
Michael Hansen
aa78962a9a Pass OPUS payload ID through VoIP (#92421) 2023-05-03 19:43:14 +02:00
Franck Nijhof
7a62574360 Bumped version to 2023.5.0b9 2023-05-03 18:59:42 +02:00
Erik Montnemery
0251d677d8 Migrate cloud settings for all Google entities (#92416) 2023-05-03 18:59:32 +02:00
Michael Hansen
2cd9b94ecb Skip unexposed entities in intent handlers (#92415)
* Filter intent handler entities by exposure

* Add test for skipping unexposed entities
2023-05-03 18:59:29 +02:00
Erik Montnemery
3cd2ab2319 Migrate cloud settings for all Alexa entities (#92413)
* Migrate cloud settings for all Alexa entities

* Also set settings for unknown entities
2023-05-03 18:59:25 +02:00
J. Nick Koston
4f0d403393 Bump bluetooth-auto-recovery to 1.1.1 (#92412)
* Bump bluetooth-auto-recovery to 1.1.0

https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/releases/tag/v1.1.0

In https://github.com/home-assistant/operating-system/issues/2485 is was discovered that a more aggressive reset strategy is needed due to a yet unsolved bug in the linux 6.1.x kernel series

* bump to 1.1.1 since event 47 cannot be decoded (newer kernels only)
2023-05-03 18:59:22 +02:00
Bram Kragten
b558cf8b59 Update frontend to 20230503.1 (#92410) 2023-05-03 18:59:18 +02:00
Erik Montnemery
820c7b77ce Update cloud WS API for getting entity (#92409)
* Update cloud WS API for getting entity

* Adjust comment
2023-05-03 18:59:15 +02:00
Erik Montnemery
9d0fc916fc Use exposed_entities API in cloud tests (#92408) 2023-05-03 18:59:11 +02:00
Erik Montnemery
387f07a97f Include all entities in cloud lists (#92406) 2023-05-03 18:59:08 +02:00
J. Nick Koston
44968cfc7c Handle webhook URL rejection in onvif (#92405) 2023-05-03 18:59:04 +02:00
Erik Montnemery
c6751bed86 Allow setting google disable 2fa flag on any entity (#92403)
* Allow setting google disable 2fa flag on any entity

* Fix test

* Include disable_2fa flag in cloud/google_assistant/entities/get
2023-05-03 18:59:01 +02:00
Bram Kragten
b87e3860d9 Update frontend to 20230503.0 (#92402) 2023-05-03 18:58:57 +02:00
David F. Mulcahey
8ef6bd85f5 Bump ZHA quirks (#92400) 2023-05-03 18:58:54 +02:00
Erik Montnemery
ad4fed4f60 Allow exposing any entity to the default conversation agent (#92398)
* Allow exposing any entity to the default conversation agent

* Tweak

* Fix race, update tests

* Update tests
2023-05-03 18:58:51 +02:00
Erik Montnemery
1050895657 Don't use storage collection helper in ExposedEntities (#92396)
* Don't use storage collection helper in ExposedEntities

* Fix tests
2023-05-03 18:58:47 +02:00
Erik Montnemery
c31d657206 Improve exposed entities tests (#92389) 2023-05-03 18:58:44 +02:00
repaxan
88343bed77 Add ZHA binding for window coverings (#92387) 2023-05-03 18:58:40 +02:00
Artem Draft
51a10a84da Bump pybravia to 0.3.3 (#92378) 2023-05-03 18:58:35 +02:00
Erik Montnemery
a9d8bc989e Migrate cloud settings for all Google entities (#92416) 2023-05-03 18:56:48 +02:00
Erik Montnemery
51be90d87e Migrate cloud settings for all Alexa entities (#92413)
* Migrate cloud settings for all Alexa entities

* Also set settings for unknown entities
2023-05-03 12:39:27 -04:00
J. Nick Koston
4abf0ddeb9 Bump bluetooth-auto-recovery to 1.1.1 (#92412)
* Bump bluetooth-auto-recovery to 1.1.0

https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/releases/tag/v1.1.0

In https://github.com/home-assistant/operating-system/issues/2485 is was discovered that a more aggressive reset strategy is needed due to a yet unsolved bug in the linux 6.1.x kernel series

* bump to 1.1.1 since event 47 cannot be decoded (newer kernels only)
2023-05-03 12:18:47 -04:00
Michael Hansen
74560ab139 Skip unexposed entities in intent handlers (#92415)
* Filter intent handler entities by exposure

* Add test for skipping unexposed entities
2023-05-03 12:18:31 -04:00
Bram Kragten
2ae3e90238 Update frontend to 20230503.1 (#92410) 2023-05-03 17:27:42 +02:00
Erik Montnemery
f089f52504 Update cloud WS API for getting entity (#92409)
* Update cloud WS API for getting entity

* Adjust comment
2023-05-03 17:06:42 +02:00
Erik Montnemery
470c3a0f5f Use exposed_entities API in cloud tests (#92408) 2023-05-03 16:50:43 +02:00
Erik Montnemery
b71f98e8b7 Include all entities in cloud lists (#92406) 2023-05-03 16:14:04 +02:00
Erik Montnemery
31de1b17e8 Allow setting google disable 2fa flag on any entity (#92403)
* Allow setting google disable 2fa flag on any entity

* Fix test

* Include disable_2fa flag in cloud/google_assistant/entities/get
2023-05-03 09:55:38 -04:00
J. Nick Koston
20942ab26f Handle webhook URL rejection in onvif (#92405) 2023-05-03 15:46:53 +02:00
Bram Kragten
9162bad4da Update frontend to 20230503.0 (#92402) 2023-05-03 15:46:14 +02:00
Erik Montnemery
0126cfa9d9 Allow exposing any entity to the default conversation agent (#92398)
* Allow exposing any entity to the default conversation agent

* Tweak

* Fix race, update tests

* Update tests
2023-05-03 09:45:54 -04:00
David F. Mulcahey
6a8668effc Bump ZHA quirks (#92400) 2023-05-03 08:35:53 -04:00
repaxan
1d6b08e194 Add ZHA binding for window coverings (#92387) 2023-05-03 08:35:20 -04:00
Erik Montnemery
4860a8d1e8 Don't use storage collection helper in ExposedEntities (#92396)
* Don't use storage collection helper in ExposedEntities

* Fix tests
2023-05-03 12:39:22 +02:00
Erik Montnemery
7aa94f97c0 Improve exposed entities tests (#92389) 2023-05-03 10:49:01 +02:00
Artem Draft
d417cbaf0f Bump pybravia to 0.3.3 (#92378) 2023-05-03 08:52:56 +02:00
Paulus Schoutsen
5f3bbf2804 Bumped version to 2023.5.0b8 2023-05-02 22:39:38 -04:00
Paulus Schoutsen
b8eebf085c Fix deserialize bug + add test coverage (#92382) 2023-05-02 22:39:33 -04:00
Paulus Schoutsen
1baa4d5109 Fix deserialize bug + add test coverage (#92382) 2023-05-02 22:38:54 -04:00
Franck Nijhof
cdfd53e1cc Bumped version to 2023.5.0b7 2023-05-02 22:44:32 +02:00
Bram Kragten
ca147dd97e Update frontend to 20230502.0 (#92373) 2023-05-02 22:43:23 +02:00
Erik Montnemery
5b1278d885 Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:43:19 +02:00
J. Nick Koston
0db28dcf4d Start onvif events later (#92354) 2023-05-02 22:43:15 +02:00
Raman Gupta
7c651665c5 Clean up zwave_js.cover (#92353) 2023-05-02 22:43:12 +02:00
J. Nick Koston
2f3964e3ce Bump ulid-transform to 0.7.2 (#92344) 2023-05-02 22:43:08 +02:00
John Pettitt
eef95fa0d4 Increase default timeout in sense (#90556)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-02 22:43:03 +02:00
Bram Kragten
5ed41d3d51 Update frontend to 20230502.0 (#92373) 2023-05-02 22:41:35 +02:00
Michael Hansen
17db1aa38b Bump voip-utils to 0.0.7 (#92372) 2023-05-02 22:39:41 +02:00
Erik Montnemery
e3c16e634b Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
John Pettitt
cc4e741cfa Increase default timeout in sense (#90556)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-02 09:50:34 -05:00
J. Nick Koston
a9d992c2de Add support for visitor detections to onvif (#92350) 2023-05-02 12:19:27 +02:00
Raman Gupta
9f7c085652 Clean up zwave_js.cover (#92353) 2023-05-02 12:18:19 +02:00
J. Nick Koston
c0fa078b0b Start onvif events later (#92354) 2023-05-02 12:17:01 +02:00
J. Nick Koston
2636a46a5f Bump ulid-transform to 0.7.2 (#92344) 2023-05-02 08:46:14 +02:00
Franck Nijhof
43a1eb043b Bumped version to 2023.5.0b6 2023-05-01 22:55:49 +02:00
Bram Kragten
6b77775ed5 Update frontend to 20230501.0 (#92339) 2023-05-01 22:55:34 +02:00
Michael Hansen
7077d23127 Bump voip-utils to 0.0.6 (#92334) 2023-05-01 22:55:31 +02:00
J. Nick Koston
c7eac0ebbb Avoid starting ONVIF PullPoint if the camera reports its unsupported (#92333) 2023-05-01 22:55:27 +02:00
David F. Mulcahey
7f13033f69 Don't poll ZHA electrical measurement sensors unnecessarily (#92330) 2023-05-01 22:55:23 +02:00
Paulus Schoutsen
eba201e71b Add voip configuration url (#92326) 2023-05-01 22:55:20 +02:00
G Johansson
1e9d777201 Fix db_url issue in SQL (#92324)
* db_url fix

* Add test

* assert entry.options
2023-05-01 22:55:16 +02:00
J. Nick Koston
030b7f8a37 Bump sqlalchemy to 2.0.12 (#92315)
changelog: https://docs.sqlalchemy.org/en/20/changelog/changelog_20.html#change-2.0.12
2023-05-01 22:55:12 +02:00
J. Nick Koston
8cbc69fc92 Retry onvif setup when it is unexpectedly cancelled (#92313)
* Retry onvif setup when it is unexpectedly cancelled

fixes #92308

* Retry onvif setup when it is unexpectedly cancelled

fixes #92308
2023-05-01 22:55:08 +02:00
J. Nick Koston
2a5f5ea039 Reduce size of migration transactions to accommodate slow/busy systems (#92312)
* Reduce size of migration transactions to accommodate slow/busy systems

related issue #91489

* handle overloaded RPIs better
2023-05-01 22:55:04 +02:00
Michael Hansen
0ba662e7bc Allow configuring SIP port in VoIP (#92210)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-01 22:54:59 +02:00
J. Nick Koston
86f8147782 Bump zeroconf to 0.60.0 (#92335) 2023-05-01 22:51:30 +02:00
Raman Gupta
5dd3209e42 Add date and time platforms to core files (#92343) 2023-05-01 22:50:44 +02:00
Bram Kragten
a6d6d59c93 Update frontend to 20230501.0 (#92339) 2023-05-01 22:49:38 +02:00
Franck Nijhof
a7088e767e Migrate unique IDs of Rituals Perfume Genie (#92342)
* Migrate unique IDs of Rituals Perfume Genie

* Fix doc string
2023-05-01 22:46:38 +02:00
Michael Hansen
40896514eb Bump voip-utils to 0.0.6 (#92334) 2023-05-01 22:43:27 +02:00
Michael Hansen
b1d6f3afc0 Allow configuring SIP port in VoIP (#92210)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-01 22:42:27 +02:00
Marc Mueller
d66056cfab Improve fritz generic typing (#92327) 2023-05-01 21:11:40 +02:00
J. Nick Koston
324df197d1 Avoid starting ONVIF PullPoint if the camera reports its unsupported (#92333) 2023-05-01 18:33:52 +02:00
David F. Mulcahey
2bc2c4a651 Don't poll ZHA electrical measurement sensors unnecessarily (#92330) 2023-05-01 18:32:40 +02:00
Paulus Schoutsen
adaae46178 Add voip configuration url (#92326) 2023-05-01 16:20:37 +02:00
G Johansson
9795699669 Fix db_url issue in SQL (#92324)
* db_url fix

* Add test

* assert entry.options
2023-05-01 16:17:01 +02:00
Luke
7b5d26d3fa Bump anova version (#92206)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-05-01 11:15:29 +02:00
J. Nick Koston
ede1f08c51 Reduce size of migration transactions to accommodate slow/busy systems (#92312)
* Reduce size of migration transactions to accommodate slow/busy systems

related issue #91489

* handle overloaded RPIs better
2023-04-30 23:18:00 -04:00
J. Nick Koston
30dd8b9f3a Retry onvif setup when it is unexpectedly cancelled (#92313)
* Retry onvif setup when it is unexpectedly cancelled

fixes #92308

* Retry onvif setup when it is unexpectedly cancelled

fixes #92308
2023-04-30 23:12:01 -04:00
J. Nick Koston
32f6dd4a82 Bump sqlalchemy to 2.0.12 (#92315)
changelog: https://docs.sqlalchemy.org/en/20/changelog/changelog_20.html#change-2.0.12
2023-04-30 23:11:29 -04:00
Allen Porter
e7433c42b9 Cleanup code from nest yaml migration and OOB auth deprecation (#92311) 2023-04-30 18:00:40 -07:00
Raman Gupta
c0d0c89293 Add time platform (#81949) 2023-04-30 22:33:51 +02:00
Allen Porter
6f63ed07f9 Deprecate legacy Works With Nest (again) (#92304) 2023-04-30 21:56:29 +02:00
Franck Nijhof
5cbf08f89a Only store and pass around coordinator in Rituals Perfume Genie (#92298) 2023-04-30 21:32:14 +02:00
J. Nick Koston
bb4c03ce3c Avoid returning statistics columns that the metadata knows are impossible (#92095) 2023-04-30 20:46:26 +02:00
Raman Gupta
d138bbe26e Add date platform (#81948) 2023-04-30 20:34:57 +02:00
Franck Nijhof
05530d656a Bumped version to 2023.5.0b5 2023-04-30 20:16:39 +02:00
Jan Bouwhuis
2b2be6a333 Fix mqtt not available when starting snips (#92296) 2023-04-30 20:16:28 +02:00
J. Nick Koston
5bd54490ea Ensure onvif webhook can be registered (#92295) 2023-04-30 20:16:25 +02:00
J. Nick Koston
00a28caa6d Bump bleak to 0.20.2 (#92294) 2023-04-30 20:16:21 +02:00
J. Nick Koston
c4aa6ba262 Bump beacontools to fix conflict with construct<2.10 and >=2.8.16 (#92293) 2023-04-30 20:16:18 +02:00
J. Nick Koston
7a90db903b Prevent pysnmp from being installed as it does not work with newer python (#92292) 2023-04-30 20:16:14 +02:00
Robert Hillis
fe279c8593 Add missing fstrings in Local Calendar (#92288) 2023-04-30 20:16:10 +02:00
Maximilian
ddf5a9fbcc Bump pynina to 0.3.0 (#92286) 2023-04-30 20:16:07 +02:00
J. Nick Koston
093d5d6176 Fix august lock state when API reports locking and locked with the same timestamp (#92276) 2023-04-30 20:16:01 +02:00
J. Nick Koston
f95f2d1cfc Prevent pysnmp from being installed as it does not work with newer python (#92292) 2023-04-30 20:13:47 +02:00
epenet
b969790e95 Use SnapshotAssertion in Renault tests (#90778) 2023-04-30 18:55:31 +02:00
stickpin
9317ddb1c7 Home Connect add WasherDryer support (#90673) 2023-04-30 18:50:51 +02:00
Joost Lekkerkerker
cd52e05075 Move lastfm constants to separate file (#92289) 2023-04-30 18:09:02 +02:00
J. Nick Koston
ed286fc223 Fix august lock state when API reports locking and locked with the same timestamp (#92276) 2023-04-30 18:08:12 +02:00
J. Nick Koston
4fcf05c202 Ensure onvif webhook can be registered (#92295) 2023-04-30 18:06:38 +02:00
J. Nick Koston
a08cda3cfe Bump beacontools to fix conflict with construct<2.10 and >=2.8.16 (#92293) 2023-04-30 18:06:09 +02:00
Maximilian
696e714190 Bump pynina to 0.3.0 (#92286) 2023-04-30 18:05:22 +02:00
Jan Bouwhuis
7a43b29f38 Fix mqtt not available when starting snips (#92296) 2023-04-30 17:35:24 +02:00
Franck Nijhof
2cc31d6a5b Extract Rituals Perfume Genie DataUpdateCoordinator into module (#92284) 2023-04-30 17:07:55 +02:00
J. Nick Koston
b629bf37bb Bump bleak to 0.20.2 (#92294) 2023-04-30 17:07:00 +02:00
Robert Hillis
464c81ec9d Add missing fstrings in Local Calendar (#92288) 2023-04-30 06:15:57 -07:00
Tomer Figenblat
2cb73b4a1f Remove myself from switcher_kis codeowners (#92277)
chore: remove myself switcher_kis codeowners

Signed-off-by: Tomer Figenblat <tomer@tomfi.info>
2023-04-30 11:19:46 +03:00
Paulus Schoutsen
eb586c7144 Bumped version to 2023.5.0b4 2023-04-29 21:23:22 -04:00
J. Nick Koston
ec15a03706 Handle AttributeError from wrong port in ONVIF config flow (#92272)
* Handle AttributeError from wrong port in ONVIF config flow

fixes
```
2023-04-29 19:17:22.289 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/view.py", line 146, in handle
    result = await result
  File "/Users/bdraco/home-assistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/Users/bdraco/home-assistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 271, in async_configure
    result = await self._async_handle_step(
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/Users/bdraco/home-assistant/homeassistant/components/onvif/config_flow.py", line 233, in async_step_configure
    errors, description_placeholders = await self.async_setup_profiles()
  File "/Users/bdraco/home-assistant/homeassistant/components/onvif/config_flow.py", line 277, in async_setup_profiles
    await device.update_xaddrs()
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/onvif/client.py", line 433, in update_xaddrs
    capabilities = await devicemgmt.GetCapabilities({"Category": "All"})
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 164, in send_async
    return self.process_reply(client, operation_obj, response)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 204, in process_reply
    doc = parse_xml(content, self.transport, settings=client.settings)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/loader.py", line 51, in parse_xml
    docinfo = elementtree.getroottree().docinfo
AttributeError: NoneType object has no attribute getroottree
```

* port

* Revert "port"

This reverts commit 4693f3f33a.

* misfire
2023-04-29 21:23:16 -04:00
J. Nick Koston
24b851c184 Auto repair incorrect collation on MySQL schema (#92270)
* Auto repair incorrect collation on MySQL schema

As we do more union queries in 2023.5.x if there is a mismatch
between collations on tables, they will fail with an error
that is hard for the user to figure out how to fix

`Error executing query: (MySQLdb.OperationalError) (1271, "Illegal mix of collations for operation UNION")`

This was reported in the #beta channel and by PM from others
so the problem is not isolated to a single user

https://discord.com/channels/330944238910963714/427516175237382144/1100908739910963272

* test with ascii since older maraidb versions may not work otherwise

* Revert "test with ascii since older maraidb versions may not work otherwise"

This reverts commit 787fda1aefcd8418a28a8a8f430e7e7232218ef8.t

* older version need to check collation_server because the collation is not reflected if its the default
2023-04-29 21:23:15 -04:00
Michael
a8539b89e8 Fix call deflection update in Fritz!Tools (#92267)
fix
2023-04-29 21:23:14 -04:00
Jan Bouwhuis
8cf1ed81a8 Fix MQTT certificate files setup (#92266) 2023-04-29 21:23:13 -04:00
Robert Hillis
fe452452e6 Fix Google Mail Sensor key error (#92262)
Fix Google Mail key error
2023-04-29 21:23:13 -04:00
Michael Hansen
c632d27197 Add VoIP error tone (#92260)
* Play error tone when pipeline error occurs

* Play listening tone at the start of each cycle
2023-04-29 21:23:12 -04:00
J. Nick Koston
6a6eba1ca3 Handle onvif errors when detail is returned as bytes (#92259) 2023-04-29 21:23:11 -04:00
J. Nick Koston
a5241b3118 Pin pyasn1 and pysnmplib since pyasn1 0.5.0 has breaking changes and pysnmp-pyasn1 and pyasn1 are both using the pyasn1 namespace (#92254) 2023-04-29 21:23:10 -04:00
J. Nick Koston
193b2694a9 Handle AttributeError from wrong port in ONVIF config flow (#92272)
* Handle AttributeError from wrong port in ONVIF config flow

fixes
```
2023-04-29 19:17:22.289 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/view.py", line 146, in handle
    result = await result
  File "/Users/bdraco/home-assistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/Users/bdraco/home-assistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/Users/bdraco/home-assistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 271, in async_configure
    result = await self._async_handle_step(
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/Users/bdraco/home-assistant/homeassistant/components/onvif/config_flow.py", line 233, in async_step_configure
    errors, description_placeholders = await self.async_setup_profiles()
  File "/Users/bdraco/home-assistant/homeassistant/components/onvif/config_flow.py", line 277, in async_setup_profiles
    await device.update_xaddrs()
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/onvif/client.py", line 433, in update_xaddrs
    capabilities = await devicemgmt.GetCapabilities({"Category": "All"})
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 164, in send_async
    return self.process_reply(client, operation_obj, response)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 204, in process_reply
    doc = parse_xml(content, self.transport, settings=client.settings)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/loader.py", line 51, in parse_xml
    docinfo = elementtree.getroottree().docinfo
AttributeError: NoneType object has no attribute getroottree
```

* port

* Revert "port"

This reverts commit 4693f3f33a.

* misfire
2023-04-29 21:17:56 -04:00
J. Nick Koston
1a82b353e0 Auto repair incorrect collation on MySQL schema (#92270)
* Auto repair incorrect collation on MySQL schema

As we do more union queries in 2023.5.x if there is a mismatch
between collations on tables, they will fail with an error
that is hard for the user to figure out how to fix

`Error executing query: (MySQLdb.OperationalError) (1271, "Illegal mix of collations for operation UNION")`

This was reported in the #beta channel and by PM from others
so the problem is not isolated to a single user

https://discord.com/channels/330944238910963714/427516175237382144/1100908739910963272

* test with ascii since older maraidb versions may not work otherwise

* Revert "test with ascii since older maraidb versions may not work otherwise"

This reverts commit 787fda1aefcd8418a28a8a8f430e7e7232218ef8.t

* older version need to check collation_server because the collation is not reflected if its the default
2023-04-29 21:17:09 -04:00
Franck Nijhof
3a5a9a90b2 Update orjson to 3.8.11 (#92228) 2023-04-29 20:22:33 -04:00
Franck Nijhof
7d518c5484 Update coverage to 7.2.4 (#92229) 2023-04-29 20:22:15 -04:00
Franck Nijhof
3363830ede Fix incorrect entity category for SmartThings sensors (#92232) 2023-04-29 20:21:55 -04:00
Franck Nijhof
ed3c1d9b59 Fix incorrect entity category for huawei_lte sensors (#92235) 2023-04-29 20:21:38 -04:00
Robert Hillis
a5044227a8 Fix Google Mail Sensor key error (#92262)
Fix Google Mail key error
2023-04-29 20:20:43 -04:00
Michael
895c0be82c Fix call deflection update in Fritz!Tools (#92267)
fix
2023-04-29 20:19:41 -04:00
Franck Nijhof
e2636587f8 Add myself as codeowner to Rituals perfume genie (#92261) 2023-04-29 18:49:52 -05:00
Jan Bouwhuis
9468aed689 Fix MQTT certificate files setup (#92266) 2023-04-30 00:01:44 +02:00
Franck Nijhof
bff7119230 Update requests to 2.29.0 (#92231) 2023-04-29 23:44:20 +02:00
Ian
1f2da1217b NextBus: Correct iot_class (#92208) 2023-04-29 21:41:35 +02:00
shbatm
d9e0681123 Remove deprecated ISY994 Insteon and variable sensor entities (#92255) 2023-04-29 21:40:58 +02:00
J. Nick Koston
b0b4134ded Handle onvif errors when detail is returned as bytes (#92259) 2023-04-29 21:33:25 +02:00
J. Nick Koston
f38d45151a Pin pyasn1 and pysnmplib since pyasn1 0.5.0 has breaking changes and pysnmp-pyasn1 and pyasn1 are both using the pyasn1 namespace (#92254) 2023-04-29 21:32:57 +02:00
Michael Hansen
c35aabe497 Add VoIP error tone (#92260)
* Play error tone when pipeline error occurs

* Play listening tone at the start of each cycle
2023-04-29 15:24:56 -04:00
Franck Nijhof
b9f2b0ad8b Update pyfibaro to 0.7.1 (#92248) 2023-04-29 19:06:14 +02:00
Franck Nijhof
3bab40753d Bumped version to 2023.5.0b3 2023-04-29 19:03:08 +02:00
J. Nick Koston
546c68196e Bump pyunifiprotect to 4.8.3 (#92251) 2023-04-29 19:02:59 +02:00
Bouwe Westerdijk
379db033af Bump plugwise to v0.31.1 (#92249) 2023-04-29 19:02:55 +02:00
Franck Nijhof
4b9355e1ca Fix unknown/unavailable source sensor in Filter entities (#92241) 2023-04-29 19:02:52 +02:00
Franck Nijhof
89eca22b93 Fix history YAML deprecation (#92238) 2023-04-29 19:02:48 +02:00
Allen Porter
2cb665a1d9 Add more detail to invalid rrule calendar error message (#92222)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-29 19:02:45 +02:00
Michael Davie
1d54a0ed3d Bump env_canada to 0.5.34 (#92216)
Bump env_canada to v.0.5.34
2023-04-29 19:02:41 +02:00
jjlawren
7af1521812 Bump sonos-websocket to 0.1.0 (#92209)
Bump sonos-websocket to 0.1.0
2023-04-29 19:02:38 +02:00
Tom Harris
c8cc6bfbb7 Fix Insteon scenes with disabled entities (#92137) 2023-04-29 19:02:34 +02:00
Rajeevan
401e61588c Fix solaredge-local protobuf exception (#92090) 2023-04-29 19:02:31 +02:00
Michael
3f948da2af Turn AVM FRITZ!Box Tools call deflection switches into coordinator entities (#91913)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-29 19:02:27 +02:00
Mick Vleeshouwer
aafbc64e02 Revert "Add silent option for DynamicShutter (ogp:Shutter) in Overkiz" (#91354) 2023-04-29 19:02:24 +02:00
rikroe
e460bc7ecb Move BMW Target SoC to number platform (#91081)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-04-29 19:02:19 +02:00
J. Nick Koston
11131070ab Bump pyunifiprotect to 4.8.3 (#92251) 2023-04-29 18:59:44 +02:00
IceBotYT
d23bd2ad68 Add diagnostics to LaCrosse View (#92212) 2023-04-29 18:53:40 +02:00
Michael
ac4d9216d6 Turn AVM FRITZ!Box Tools call deflection switches into coordinator entities (#91913)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-29 18:51:38 +02:00
IceBotYT
d8bc37c695 Bump LaCrosse View to version 1.0.1 (#92213) 2023-04-29 18:50:22 +02:00
Bouwe Westerdijk
e08d5d240d Bump plugwise to v0.31.1 (#92249) 2023-04-29 18:49:15 +02:00
J. Nick Koston
e136070718 Speed up purging the database (#92247) 2023-04-29 18:45:14 +02:00
Mick Vleeshouwer
0e0ab4427b Revert "Add silent option for DynamicShutter (ogp:Shutter) in Overkiz" (#91354) 2023-04-29 18:34:21 +02:00
Diogo Gomes
a48a07bd8d Removing self from SQL sensor CODEOWNERS (#92250) 2023-04-29 18:27:39 +02:00
Franck Nijhof
37723792c7 Fix unknown/unavailable source sensor in Filter entities (#92241) 2023-04-29 17:47:04 +02:00
rikroe
1028841690 Move BMW Target SoC to number platform (#91081)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-04-29 17:41:34 +02:00
Franck Nijhof
acc4b001cd Fix history YAML deprecation (#92238) 2023-04-29 08:02:34 -04:00
Franck Nijhof
06c4da2bb6 Fix incorrect entity category for flux_led sensors (#92234) 2023-04-29 06:11:50 -05:00
Franck Nijhof
f8942e7dcc Fix incorrect entity category for isy994 sensors (#92233) 2023-04-29 06:10:52 -05:00
Rajeevan
44186bb731 Fix solaredge-local protobuf exception (#92090) 2023-04-29 11:33:43 +02:00
epenet
7dfbfd45ae Cleanup onewire tests (#92117) 2023-04-29 11:18:16 +02:00
Tom Harris
58c5d98958 Fix Insteon scenes with disabled entities (#92137) 2023-04-29 11:16:04 +02:00
Allen Porter
282d5f4488 Add more detail to invalid rrule calendar error message (#92222)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-29 09:57:30 +02:00
Michael Davie
4511e91cfd Bump env_canada to 0.5.34 (#92216)
Bump env_canada to v.0.5.34
2023-04-29 07:17:52 +02:00
Raman Gupta
96455c74f0 Use enum sensor device class in Z-Wave (#92029)
* Use enum sensor device class where appropriate

* update docstring
2023-04-28 23:24:35 -04:00
jjlawren
65837c9075 Bump sonos-websocket to 0.1.0 (#92209)
Bump sonos-websocket to 0.1.0
2023-04-28 16:10:48 -05:00
Franck Nijhof
1b39abe3bc Bumped version to 2023.5.0b2 2023-04-28 21:42:27 +02:00
J. Nick Koston
29bff59707 Fix missing preset_mode feature in bond fans (#92202) 2023-04-28 21:42:18 +02:00
Jean-François Roy
faa8f38fa8 Add missing PRESET_MODE feature to BAF fans (#92200) 2023-04-28 21:42:15 +02:00
Paul Bottein
1f6dbe96f6 Update frontend to 20230428.0 (#92190) 2023-04-28 21:42:12 +02:00
Jan Bouwhuis
98075da069 Fix mqtt subscribe debouncer initial delay too long when birth message is disabled (#92188)
Fix mqtt subscribe deboucer initial delay
2023-04-28 21:42:08 +02:00
David F. Mulcahey
652bb8ef95 Fix ZHA device triggers (#92186)
* Fix missing endpoint data on ZHA events

* revert to flat structure

* update test
2023-04-28 21:42:05 +02:00
Nolan Gilley
96d2b53798 Upgrade lakeside to 0.13 (#92173) 2023-04-28 21:42:01 +02:00
Raman Gupta
25d621ab94 Bump pyvizio to 0.1.61 (#92161) 2023-04-28 21:41:58 +02:00
Erik Montnemery
fa3f19e7bf Keep expose setting in sync for assist (#92158)
* Keep expose setting in sync for assist

* Fix initialization, add test

* Fix tests

* Add AgentManager.async_setup

* Fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-28 21:41:53 +02:00
jjlawren
412ea937ff Properly resolve media_source URLs for Sonos announcements (#92154)
Properly resolve media_source URLs for Sonos announcements
2023-04-28 21:41:46 +02:00
Luke
b7f5c144a8 Bump Roborock to 0.8.3 (#92151) 2023-04-28 21:41:42 +02:00
J. Nick Koston
658128c892 Fix ignored apple tvs being scanned over and over (#92150) 2023-04-28 21:41:38 +02:00
J. Nick Koston
ff2f6029ce Ensure purge can cleanup old format detached states in the database (#92145) 2023-04-28 21:41:35 +02:00
puddly
8017a04efe Fix ZHA startup failure with the Konke button (#92144)
* Ensure devices with bad cluster subclasses do not prevent startup

* Explicitly unit test an affected SML001 device

* Do not use invalid `hue_occupancy` attribute name

* Actually remove `hue_occupancy`

* Bump ZHA dependencies
2023-04-28 21:41:31 +02:00
G Johansson
ef350949fd Fix options flow Workday (#92140)
* Fix options flow workday

* simpler
2023-04-28 21:41:26 +02:00
Luke
7b1b3970b1 Bump roborock to 0.8.1 for beta fixes (#92131)
* bump to 0.8.1

* add tests for new config flow errors

* removed logs for known errors
2023-04-28 21:40:35 +02:00
epenet
c483860560 Fix lingering timer in qld_bushfire (#92189) 2023-04-28 21:16:26 +02:00
epenet
c303487c1b Fix lingering timer in feedreader (#92180) 2023-04-28 21:16:08 +02:00
J. Nick Koston
07d1a16efd Add as_dict cache to Context and Event (#92162) 2023-04-28 21:15:39 +02:00
epenet
67a7de1869 Improve init type hints in enocean (#92176) 2023-04-28 21:14:37 +02:00
Sven Serlier
8c64eda58f Update URLs in PR template (#92194) 2023-04-28 21:12:26 +02:00
epenet
397a5ff992 Fix lingering timer in broadlink (#92179) 2023-04-28 21:08:08 +02:00
Sven Serlier
a0cd0b3c6c Fix typo in anova integration (#92191) 2023-04-28 21:07:17 +02:00
epenet
d366b43866 Fix lingering timer in lifx discovery (#92185) 2023-04-28 21:06:32 +02:00
J. Nick Koston
e156d3132e Ensure purge can cleanup old format detached states in the database (#92145) 2023-04-28 21:03:59 +02:00
J. Nick Koston
293fb374ed Fix missing preset_mode feature in bond fans (#92202) 2023-04-28 21:03:16 +02:00
Paul Bottein
75560aab1b Update frontend to 20230428.0 (#92190) 2023-04-28 21:01:28 +02:00
Jean-François Roy
57f41958e6 Add missing PRESET_MODE feature to BAF fans (#92200) 2023-04-28 21:00:54 +02:00
Jan Bouwhuis
cff7829a8d Fix mqtt subscribe debouncer initial delay too long when birth message is disabled (#92188)
Fix mqtt subscribe deboucer initial delay
2023-04-28 18:56:22 +02:00
Erik Montnemery
f8f7de5d5a Remove homeassistant from conversation dependencies (#92170)
* Remove homeassistant from conversation dependencies

* Fix tests
2023-04-28 18:17:48 +02:00
David F. Mulcahey
e6438dabff Fix ZHA device triggers (#92186)
* Fix missing endpoint data on ZHA events

* revert to flat structure

* update test
2023-04-28 11:29:24 -04:00
Erik Montnemery
ebd9cd096a Keep expose setting in sync for assist (#92158)
* Keep expose setting in sync for assist

* Fix initialization, add test

* Fix tests

* Add AgentManager.async_setup

* Fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-28 15:59:21 +02:00
J. Nick Koston
2bfa521068 Fix hassio with python3.11 (#92178) 2023-04-28 15:38:32 +02:00
Nolan Gilley
c3d3bc4b74 Upgrade lakeside to 0.13 (#92173) 2023-04-28 14:30:10 +02:00
Erik Montnemery
ec1ae7e2df Remove homeassistant from cloud dependencies (#92169) 2023-04-28 14:27:06 +02:00
Raman Gupta
6b829ca57b Bump pyvizio to 0.1.61 (#92161) 2023-04-28 11:31:16 +02:00
Robert Svensson
cad0310193 Fix lingering timer in Axis library (#92143) 2023-04-28 11:41:21 +03:00
Franck Nijhof
0411b384dd Fix release build for armhf, exclude pandas (#92159) 2023-04-28 09:53:04 +02:00
J. Nick Koston
3a95a1fd8a Fix ignored apple tvs being scanned over and over (#92150) 2023-04-28 09:52:20 +02:00
Luke
a6a485e59f Bump Roborock to 0.8.3 (#92151) 2023-04-28 09:49:35 +02:00
G Johansson
d648a93dcb Fix options flow Workday (#92140)
* Fix options flow workday

* simpler
2023-04-28 09:44:23 +02:00
jjlawren
4ce1106243 Properly resolve media_source URLs for Sonos announcements (#92154)
Properly resolve media_source URLs for Sonos announcements
2023-04-27 23:51:51 -04:00
puddly
9d0dd0b784 Fix ZHA startup failure with the Konke button (#92144)
* Ensure devices with bad cluster subclasses do not prevent startup

* Explicitly unit test an affected SML001 device

* Do not use invalid `hue_occupancy` attribute name

* Actually remove `hue_occupancy`

* Bump ZHA dependencies
2023-04-27 18:35:07 -04:00
Franck Nijhof
cdbffee781 Remove legacy pip resolver (#92124)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-27 22:39:29 +02:00
J. Nick Koston
89d8bda4ba Bump pyTibber to 0.27.2 (#92136) 2023-04-27 22:00:07 +02:00
Luke
efec50c8f0 Bump roborock to 0.8.1 for beta fixes (#92131)
* bump to 0.8.1

* add tests for new config flow errors

* removed logs for known errors
2023-04-27 21:10:34 +02:00
Franck Nijhof
e03f3c05b3 Bumped version to 2023.5.0b1 2023-04-27 19:59:11 +02:00
Franck Nijhof
3e8e2c68b9 Add add-on discovery URL and title to Wyoming integration (#92129) 2023-04-27 19:58:56 +02:00
J. Nick Koston
54e52182ab Bump sqlalchemy to 2.0.11 to fix a critical regression with postgresql (#92126) 2023-04-27 19:58:53 +02:00
Paul Bottein
c35872531f Update frontend to 20230427.0 (#92123) 2023-04-27 19:58:49 +02:00
Erik Montnemery
7d5c90a81e Add WS command cloud/alexa/entities/get (#92121)
* Add WS command cloud/alexa/entities/get

* Fix bugs, add test
2023-04-27 19:58:46 +02:00
Thijs W
1f52b71477 Fix frontier_silicon not retrying setup and missing strings (#92111)
Address late review comments for frontier_silicon config flow
2023-04-27 19:58:43 +02:00
Erik Montnemery
9a7f7ef35c Avoid exposing unsupported entities to Alexa (#92107)
* Avoid exposing unsupported entities to Alexa

* Update homeassistant/components/cloud/alexa_config.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-27 19:58:39 +02:00
Erik Montnemery
a41128dae3 Avoid exposing unsupported entities to Google Assistant (#92105)
* Avoid exposing unsupported entities to Google Assistant

* Add Google Assistant specific support sets

* Add test
2023-04-27 19:58:36 +02:00
Raman Gupta
5c3094520d Fix vizio integration_type (#92103) 2023-04-27 19:58:32 +02:00
Paulus Schoutsen
8db1d13c71 Use pipeline ID in event (#92100)
* Use pipeline ID in event

* Fix tests
2023-04-27 19:58:28 +02:00
Paulus Schoutsen
47c6cb88a4 Fix capitalization names Assist entities (#92098)
* Fix capitalization names Assist entities

* Adjust names to be 'in progress'

* Update tests/components/esphome/test_binary_sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-27 19:58:25 +02:00
Michael
a1d4740785 Fix reconfigure by SSDP or Zeroconf discovery in Synology DSM (#92088) 2023-04-27 19:58:22 +02:00
Franck Nijhof
b3d685cc31 Update YARL to 1.9.2 (#92086) 2023-04-27 19:58:19 +02:00
avee87
019f26a17c Remove name attribute from transmission services manifest (#92083) 2023-04-27 19:58:15 +02:00
puddly
9970af5fe9 Add a channel changing API to ZHA (#92076)
* Expose channel changing over the websocket API

* Expose channel changing as a service

* Type annotate some existing unit test fixtures

* Add unit tests

* Rename `api.change_channel` to `api.async_change_channel`

* Expand on channel migration in the service description

* Remove channel changing service, we only really need the websocket API

* Update homeassistant/components/zha/websocket_api.py

* Black

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-27 19:58:12 +02:00
Michael Hansen
f7e72ef62b Bump intents to 2023.4.26 (#92070)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-27 19:58:08 +02:00
Jesse Hills
a445e29bca ESPHome voice assistant: Version 2 - Stream raw tts audio back to device for playback (#92052)
* Send raw audio back

* Update tests

* More tests

* Fix docstrings and remove unused patches

* More tests

* MORE

* Only set raw for v2
2023-04-27 19:58:04 +02:00
Jesse Hills
ba69e29e8f Set pipeline_id from pipeline select (#92085) 2023-04-27 19:57:23 +02:00
Franck Nijhof
ac21f69ad0 Add add-on discovery URL and title to Wyoming integration (#92129) 2023-04-27 19:51:26 +02:00
Paul Bottein
52816a8cd4 Update frontend to 20230427.0 (#92123) 2023-04-27 19:07:56 +02:00
J. Nick Koston
47b289b632 Bump sqlalchemy to 2.0.11 to fix a critical regression with postgresql (#92126) 2023-04-27 18:52:43 +02:00
Franck Nijhof
15c2ed7b04 Cleanup pybluez from machine builds (#92122) 2023-04-27 18:02:26 +02:00
Erik Montnemery
2522c6d697 Add WS command cloud/alexa/entities/get (#92121)
* Add WS command cloud/alexa/entities/get

* Fix bugs, add test
2023-04-27 17:10:29 +02:00
Franck Nijhof
3aa82e122c Remove usbutils from machine builds (#91942) 2023-04-27 17:10:07 +02:00
puddly
f9ac1f3839 Add a channel changing API to ZHA (#92076)
* Expose channel changing over the websocket API

* Expose channel changing as a service

* Type annotate some existing unit test fixtures

* Add unit tests

* Rename `api.change_channel` to `api.async_change_channel`

* Expand on channel migration in the service description

* Remove channel changing service, we only really need the websocket API

* Update homeassistant/components/zha/websocket_api.py

* Black

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-27 11:04:22 -04:00
Franck Nijhof
f7f950a273 Update Home Assistant base image to 2023.04.2 - Python 3.11 (#92114) 2023-04-27 14:53:12 +02:00
Doug Hoffman
24acc71519 Resolve warnings due to incorrectly defined entities in airthings_ble (#92097)
* airthings_ble: Define state_class only in SensorEntityDescription

* airthings_ble: Drop incompatible device_class for voc
2023-04-27 13:44:42 +02:00
Joakim Sørensen
0ef29bfc0c Add filters to upcoming launch library launches (#92110)
Add filters to upcoming launches
2023-04-27 13:36:43 +02:00
epenet
7801eeb063 Use snapshot in onewire diagnostics tests (#92112) 2023-04-27 13:34:13 +02:00
epenet
aac750a44f Improve TAI8570 ignore tests in onewire (#92113)
Improve TAI8570 tests in onewire
2023-04-27 13:33:30 +02:00
Erik Montnemery
7215f6320e Avoid exposing unsupported entities to Alexa (#92107)
* Avoid exposing unsupported entities to Alexa

* Update homeassistant/components/cloud/alexa_config.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-27 13:31:24 +02:00
Thijs W
21d887dd04 Fix frontier_silicon not retrying setup and missing strings (#92111)
Address late review comments for frontier_silicon config flow
2023-04-27 13:14:25 +02:00
Erik Montnemery
65c9d4a4ae Avoid exposing unsupported entities to Google Assistant (#92105)
* Avoid exposing unsupported entities to Google Assistant

* Add Google Assistant specific support sets

* Add test
2023-04-27 10:38:21 +02:00
avee87
a164530a64 Remove name attribute from transmission services manifest (#92083) 2023-04-27 09:45:49 +02:00
Franck Nijhof
bd72ea11fc Update sentry-sdk to 1.21.0 (#92087) 2023-04-27 09:43:34 +02:00
Raman Gupta
7d2243344e Fix vizio integration_type (#92103) 2023-04-27 09:22:03 +02:00
Paulus Schoutsen
7c696754ed Use pipeline ID in event (#92100)
* Use pipeline ID in event

* Fix tests
2023-04-26 22:40:17 -04:00
Jesse Hills
32ed45084a ESPHome voice assistant: Version 2 - Stream raw tts audio back to device for playback (#92052)
* Send raw audio back

* Update tests

* More tests

* Fix docstrings and remove unused patches

* More tests

* MORE

* Only set raw for v2
2023-04-26 22:24:29 -04:00
Paulus Schoutsen
ddc2807361 Fix capitalization names Assist entities (#92098)
* Fix capitalization names Assist entities

* Adjust names to be 'in progress'

* Update tests/components/esphome/test_binary_sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-26 22:13:21 -04:00
Franck Nijhof
13fc22aa3c Update syrupy to 4.0.2 (#92089) 2023-04-27 01:39:49 +02:00
Franck Nijhof
9f885a68ff Update YARL to 1.9.2 (#92086) 2023-04-27 01:39:32 +02:00
Michael
4e7f39e3d0 Fix reconfigure by SSDP or Zeroconf discovery in Synology DSM (#92088) 2023-04-27 00:52:17 +02:00
Jesse Hills
29ca43acf6 Set pipeline_id from pipeline select (#92085) 2023-04-27 10:29:08 +12:00
Joakim Sørensen
fdfd567ee5 Bump pylaunches from 1.3.0 to 1.4.0 (#92061) 2023-04-26 23:01:22 +02:00
Franck Nijhof
b5edf47454 Bump version to 2023.6.0dev0 (#92081) 2023-04-26 22:58:26 +02:00
Michael Hansen
929bfd3dfc Bump intents to 2023.4.26 (#92070)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-26 22:31:35 +02:00
Franck Nijhof
45d826c941 Bumped version to 2023.5.0b0 2023-04-26 21:56:02 +02:00
Franck Nijhof
583453f327 Merge branch 'master' into dev 2023-04-26 21:53:40 +02:00
Arturo
75be1b4ff9 Remove bridged matter devices when matter bridge is removed (#91995)
* Removes bridged matter devices when matter bridge is removed

* Didn't have the fetch the config entry since that is already provided to us

* Switched to a safer method of removing the child devices
2023-04-26 21:44:40 +02:00
puddly
2bbebeb925 Add a warning step to ZHA's config flow to advise against some radios (#92078) 2023-04-26 21:40:46 +02:00
puddly
4f660cc5f5 Allow the ZHA default light transition time to be configured as a float (#92075) 2023-04-26 21:24:06 +02:00
Marcel van der Veldt
3c44c7416f Fix Matter cover deviceclass and inverted position (#92063) 2023-04-26 21:21:31 +02:00
Bram Kragten
e7e50243d1 Update frontend to 20230426.0 (#92074) 2023-04-26 21:19:06 +02:00
Franck Nijhof
b6a3ffb20f Revert "Fail TTS tests if default TTS cache dir exists (#92023)" (#92079) 2023-04-26 21:18:17 +02:00
Jan Bouwhuis
5a78684998 Fix large imap_content event warning by truncating the email text body to 2 KiB (#92066) 2023-04-26 18:44:22 +02:00
J. Nick Koston
ead761dfa2 Ensure device_automation can handle RequirementsNotFound (#92037) 2023-04-26 18:43:38 +02:00
Erik Montnemery
330a7afdfc Teach switch_as_x about exposed entities (#92059) 2023-04-26 18:42:49 +02:00
J. Nick Koston
ec5f50913a Retry creating esphome update entities later if dashboard is unavailable (#92042) 2023-04-26 18:41:00 +02:00
J. Nick Koston
f33e8c518f Ensure lutron_caseta logbook platform does not raise when integration is not loaded (#91978) 2023-04-26 18:39:42 +02:00
Bram Kragten
aa4544accb Add assist pipeline and language selectors (#92030) 2023-04-26 18:39:02 +02:00
Jan Bouwhuis
f6d8859dd2 Add codeowner for imap integration (#92067) 2023-04-26 18:21:58 +02:00
Erik Montnemery
ce99319ea5 Add LED settings support to Home Assistant Yellow (#86451)
* Add LED control support to Home Assistant Yellow

* Fix the handlers

* Remove switch platform

* Allow configuring LED settings from the options flow

* Add missing translations

* Add tests

* Add tests
2023-04-26 11:02:52 -04:00
Ondřej Kolenatý
64e4414a5e Add today's remaining production estimate (#91965) 2023-04-26 15:58:28 +02:00
Erik Montnemery
32ffedd365 Fail TTS tests if default TTS cache dir exists (#92023)
Fail tests if default tts cache dir exists
2023-04-26 15:28:48 +02:00
Erik Montnemery
904ce226fb Tweak response of /api/cloud/login (#92058) 2023-04-26 15:28:08 +02:00
Franck Nijhof
565b26e884 Fix tts add-on discovery for Wyoming (#92064) 2023-04-26 08:04:46 -05:00
Matthias Alphart
0b9fbb1800 Fix typo in Nextcloud YAML deprecation message (#92060) 2023-04-26 13:51:47 +02:00
Erik Montnemery
2750a5c3e6 Make assist_pipeline an after dependency of cloud (#92057) 2023-04-26 13:45:32 +02:00
Erik Montnemery
ed737f306b Remove cloud assist pipeline setup from cloud client (#92056) 2023-04-26 06:53:58 -04:00
J. Nick Koston
6b931b208f Small cleanups to bluetooth internals (#92045)
* Small cleanups to bluetooth internals

Improve the performance of _async_on_advertisement

Fixes

```
tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available
tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/homeassistant/components/bluetooth/wrappers.py:226: FutureWarning: This method will be removed future version, pass the callback to the BleakClient constructor instead.
    self._backend.set_disconnected_callback(

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:506: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_proxy_device_no_connection_slot.metadata["delegate"] = 0

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:521: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_proxy_device_has_connection_slot.metadata["delegate"] = 0

tests/components/bluetooth/test_models.py::test_ble_device_with_proxy_client_out_of_connections_uses_best_available_macos
  /Users/bdraco/home-assistant/tests/components/bluetooth/test_models.py:535: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
    switchbot_device.metadata["delegate"] = 0

```

* put back kwargs
2023-04-26 11:16:34 +02:00
Joakim Sørensen
c429bfae3e Bump hass-nabucasa from 0.66.1 to 0.66.2 (#92054) 2023-04-26 10:47:41 +02:00
J. Nick Koston
cf69da40f3 Only check support_entry_unload/support_remove_from_device once (#92041) 2023-04-26 10:23:18 +02:00
Ondřej Kolenatý
5399dfd39d Set forecast-solar energy sensor's units of measurement to Wh (#92022)
* All energy units of measurement changed to Wh.

* All energy units of measurement changed to Wh.
2023-04-26 10:09:30 +02:00
Robert Svensson
09109d093e Allow UniFi control PoE passthrough properly (#92028) 2023-04-26 09:16:18 +02:00
J. Nick Koston
828aed73af Bump zeroconf to 0.58.2 (#92049) 2023-04-26 09:14:34 +02:00
J. Nick Koston
5f1fc3259c Bump aioesphomeapi to 13.7.2 (#92027) 2023-04-26 09:12:52 +02:00
Michael Hansen
8dfecac013 Time out TTS based on audio length (#92032)
* Time out TTS based on audio length

* Use async mock
2023-04-26 00:35:14 -04:00
Michael Hansen
257944c3b7 Allow numbers in TTS engine part of cache key (#92031) 2023-04-26 00:33:45 -04:00
Raman Gupta
3190e5d7cf Add button entities to manually idle zwave notification values (#91446)
* Add button entities to manually idle zwave notification values

* Update discovery.py

* Improve discovery check

* fix tests

* make unique ID more clear
2023-04-25 21:41:29 -04:00
Erik Montnemery
57a59d808b Automaticially create an assist pipeline using cloud stt + tts (#91991)
* Automaticially create an assist pipeline using cloud stt + tts

* Return the id of the cloud enabled pipeline

* Wait for platforms to load

* Fix typing

* Fix startup race

* Update tests

* Create a cloud pipeline only when logging in

* Fix tests

* Tweak _async_resolve_default_pipeline_settings

* Improve assist_pipeline test coverage

* Improve cloud test coverage
2023-04-25 20:40:01 -05:00
J. Nick Koston
74e0341d83 Bump yalexs-ble to 2.1.16 (#92034) 2023-04-25 18:53:08 -05:00
puddly
6842cdcb65 Clean up default ZHA entity names (#91841)
* Always use `Light` for lights, including subclasses

* Clean up other platforms

* Add a unit test to ensure all future entity classes have names

* Remove stale `_name`

* Address review feedback and rename `Open` to `Opening`
2023-04-25 19:51:39 -04:00
shbatm
da05763a5c ISY994 remove value when calling open cover with no position (#92036) 2023-04-25 18:17:11 -05:00
shbatm
969db343bd Invert ISY994 dusk/dawn sensors to match expected state (#92035) 2023-04-25 17:15:48 -05:00
nachonam
2d510bfe0d Add camera platform to Freebox (#88104)
* Add Freebox cameras

* Apply suggestions from code review

add code corrections after PR review

Co-authored-by: Quentame <polletquentin74@me.com>

* Update base_class.py

* add some code syntax corrections add unit tests

* add unit tests

* add syntax changes

* Update homeassistant/components/freebox/router.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/router.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/base_class.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/router.py

Co-authored-by: Quentame <polletquentin74@me.com>

* clear code  and add minor changes

* correct syntax error and check home granted access

* typing functions

* Update tests/components/freebox/conftest.py

don't needed, and will fix tests.

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Rename _volume_micro variable

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Use const not literal

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

set to true not needed

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

use _attr_supported_features instead _supported_features

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

overload the entity with command_flip property and set_flip not needed

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Cameras does not default to False,

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

delete this function because is not needed

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Co-authored-by: Quentame <polletquentin74@me.com>

* consts,  rollback _command flip is protected var

* VALUE_NOT_SET does not exists anymore

* Use HOME_COMPATIBLE_PLATFORMS

* Rename FreeboxHomeBaseClass to FreeboxHomeEntity

* Update Freebox Home comment

* Use CATEGORY_TO_MODEL to set model attr of FreeboxHomeEntity

* Use Home API from the router

* Add SERVICE_FLIP const

* Use SERVICE_FLIP const

* Fix typo in HOME_COMPATIBLE_PLATFORMS

* fix somme code issues

* use SERVICE_FLIP (lost in merge)

* use _attr_device_info

* clear code

* HOME_COMPATIBLE_PLATFORMS is a list

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/config_flow.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* clear config_flow permission

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Co-authored-by: Quentame <polletquentin74@me.com>

* add untested files to. coveragerc

* clear unused attributes

* add not tested file camera.py

* clear unusued const

* add extra_state_attributes

* Update .coveragerc

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Co-authored-by: Quentame <polletquentin74@me.com>

* fetch _flip

* del flip service

* add device_info via_device

* Update .coveragerc

* Update .coveragerc

* Update .coveragerc

* Update .coveragerc

* Remove flip reference

* Fix issue on router without Home API

* Fix "Home access is not granted" log repeats every 30s

* Fix sensor device_info

---------

Co-authored-by: Quentame <polletquentin74@me.com>
2023-04-26 00:03:39 +02:00
Jan Bouwhuis
62bb584522 Add note for using xfail on test for mqtt_statestream (#91999)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-25 22:49:47 +02:00
Jan Bouwhuis
aab7dffdb9 Only expose MQTT advanced settings in advanced mode (#91996) 2023-04-25 22:23:17 +02:00
Martin Hjelmare
0594fefb0c Clean up tts fixtures (#92025) 2023-04-25 22:21:18 +02:00
Maciej Bieniek
5244f5731e Do not reload Shelly TRV config entry (#92000) 2023-04-25 22:20:59 +02:00
Michel van de Wetering
ee3cebe37b Enable open,close,stop device actions for all covers (#92006) 2023-04-25 22:19:37 +02:00
Erik Montnemery
18f7b92438 Fall back to domain for conversation agents without title (#92014) 2023-04-25 22:14:44 +02:00
Raman Gupta
78a49ecbce Bump zwave-js-server-python to 0.48.0 (#91989)
* Bump zwave-js-server-python to 0.48.0

* Add handling of FailedZWaveCommand exception

* Reset mock to avoid unintentional side effects

* Fix bump
2023-04-25 15:41:37 -04:00
Dave T
dedb3f8b6b Fix comment typos (#92021) 2023-04-25 21:04:36 +02:00
Erik Montnemery
64cbc91697 Use addon uuid as wyoming config entry unique id (#92008) 2023-04-25 21:04:11 +02:00
Arjan
74e3cac8b5 Fix timezone issue (#92005) 2023-04-25 21:02:02 +02:00
Joakim Sørensen
083f42cce6 Bump hass-nabucasa from 0.65.0 to 0.66.1 (#92020) 2023-04-25 21:00:23 +02:00
Daniel Hjelseth Høyer
9d3a0d676a Update tibber lib to 0.27.1 (#92016) 2023-04-25 13:40:48 -05:00
J. Nick Koston
2354f8194e Add reauth to onvif (#91957)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-25 12:20:17 -05:00
Erik Montnemery
8e70446ef8 Tweak a couple of stt and tts related asserts (#92012)
Tweak a couple of stt and tts related asserts
2023-04-25 11:50:37 -05:00
Erik Montnemery
933761d425 Fix cloud connected signal only firing once (#92009) 2023-04-25 12:15:27 -04:00
Alberto Geniola
dae05a0c93 Add check on disarm code for Alarm Control Panel - Elmax (#91158) 2023-04-25 17:56:01 +02:00
Erik Montnemery
792ea92e55 Remove fuzzy language matching from stt and tts (#92002)
* Remove fuzzy language matching from stt and tts

* Update tests
2023-04-25 17:54:42 +02:00
Clay Benson
d1e6e4078c Bump asyncsleepiq lib to 1.3.4 (#91860) 2023-04-25 09:54:32 -05:00
J. Nick Koston
e7e7990b60 Bump sqlalchemy to 2.0.10 (#91982) 2023-04-25 09:45:49 -05:00
Alberto Geniola
aa1304e93a Elmax/sensors improvements (#74323)
* Address suggestions in PR #64090

* Remove redundant force-refresh at discovery time

* Improve re-auth UX

* Resolve linting warning

* Cover reauth case when no entry is in place

* Add missing reauth_successful message

* Use ad-hoc schema for reauth flow

* Align test cases with latest modifications

* Improve re-authentication flow, align tests

* Remove None check (as it can never happen)

* Remove panel_id from reauth dialog

* Remove panel_id from reauth dialog

* Simplify try-catch block

* Address suggestions in PR #64090

* Remove redundant force-refresh at discovery time

* Improve re-auth UX

* Resolve linting warning

* Cover reauth case when no entry is in place

* Add missing reauth_successful message

* Use ad-hoc schema for reauth flow

* Align test cases with latest modifications

* Improve re-authentication flow, align tests

* Remove None check (as it can never happen)

* Remove panel_id from reauth dialog

* Remove panel_id from reauth dialog

* Simplify try-catch block

* Improve type handling

* Remove translations

* Add unique-id attribute within context object

* Optimize local variable usage
2023-04-25 15:40:46 +02:00
Diogo Gomes
a3048234d3 Support for multiple contracts in Prosegur (#89097)
* support for multiple contracts - tested live

* update tests

* address review

* address review

* fix
2023-04-25 15:16:51 +02:00
G Johansson
1fa82fa886 Move TriggerBaseEntity into helpers (#91945)
* Move TriggerBaseEntity

* mypy
2023-04-25 09:56:40 +02:00
Stephan Uhle
b56f0ad668 Remove unused attributes in EDL21 integration (#91922) 2023-04-25 09:50:23 +02:00
Diogo Gomes
48546c77b5 Follow the unavailability of the source sensor (#91975) 2023-04-25 09:49:58 +02:00
Erik Montnemery
63f3767a29 Include UUID in hassio discovery data (#91970) 2023-04-25 09:48:47 +02:00
puddly
0b0573c387 Bump ZHA dependencies (#91969) 2023-04-25 09:47:22 +02:00
Michael Hansen
ebabf504da Play pre-recorded message if pipeline is misconfigured (#91985)
* Play pre-recorded message if pipeline is misconfigured

* Use voip_device
2023-04-24 21:48:40 -05:00
J. Nick Koston
5114a1400f Ensure logbook still responds if describe event throws (#91961)
* Ensure logbook still responds if describe event throws

If describe fails, the logbook stream should not collapse

* Ensure logbook still responds if describe event throws

If describe fails, the logbook stream should not collapse
2023-04-24 22:22:53 -04:00
J. Nick Koston
18532e453a Bump home-assistant-bluetooth to 1.10.0 (#91977)
changelog: https://github.com/home-assistant-libs/home-assistant-bluetooth/blob/main/CHANGELOG.md
2023-04-24 22:22:11 -04:00
Robert Svensson
cecd657a09 Bump aiounifi to v47 (#91966) 2023-04-24 18:06:12 -05:00
Luke
b5bf88215c Add mopping abilities to Roborock (#91766)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-24 22:53:45 +02:00
J. Nick Koston
e3a110f04f Bump yalexs to 1.3.2 (#91963) 2023-04-24 22:13:30 +02:00
Michael Hansen
b4bd3b97f8 Use order in preferred regions list (#91959)
* Use order in preferred regions list

* Use float for score (inf = exact match)
2023-04-24 14:12:38 -04:00
Erik Montnemery
b601fb17d3 Create a default assist pipeline on start (#91947)
* Create a default assist pipeline on start

* Minor adjustments

* Address review comments

* Remove tts.async_get_agent

* Fix bugs, improve test coverage
2023-04-24 14:00:52 -04:00
Franck Nijhof
4b619f7251 Relax polling rate on Rituals Perfume Genie (#91949) 2023-04-24 19:28:14 +02:00
Michael Hansen
5a57602163 Wait for TTS before restarting pipeline (#91962) 2023-04-24 13:27:13 -04:00
Ondřej Kolenatý
36f90cda92 Dependency upgrade to forecast-solar 3.0.0 (#91951) 2023-04-24 19:18:18 +02:00
Alberto Geniola
f104bba683 Elmax -Handle 422 busy error with a retry approach (#91926) 2023-04-24 18:51:40 +02:00
J. Nick Koston
e2d2aeadaa Fix typo in powerwall strings (#91956) 2023-04-24 17:54:22 +02:00
Michael
2ba2c6c6ab Correct entity categories in AVM FRITZ!SmartHome (#91073) 2023-04-24 16:57:34 +02:00
Erik Montnemery
a956f16f73 Suppress pylint error related to audioop deprecation (#91950)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-24 16:56:20 +02:00
Michael Hansen
5075281add Fix zh Hant/Hans (#91390)
* Fix zh Hant/Hans

* Fix comments
2023-04-24 16:55:08 +02:00
Luke
1ae7610622 Add Vacuum test for Roborock (#91870) 2023-04-24 16:46:00 +02:00
Jan Bouwhuis
88f0e4000b Cleanup unreachable code where device_entry will never be None on an update event (#91855) 2023-04-24 16:09:36 +02:00
Jan Bouwhuis
3f6541a6db Add cipher list option to IMAP config flow (#91896)
* Add cipher list option to IMAP config flow

* Use client_context to get the ssl_context

* Formatting

* Add ssl error no make error handling more specific

* Make ssl_ciper_list an advanced option
2023-04-24 15:37:21 +02:00
J. Nick Koston
c3262ebdb3 Add rule parser for onvif LineDetector and CountAggregation (#91885) 2023-04-24 15:23:59 +02:00
J. Nick Koston
e25885b943 Improve error reporting in onvif in config flow (#91876) 2023-04-24 15:20:37 +02:00
Erik Montnemery
1c3e1d2e13 Don't resolve default tts engine in assist pipelines (#91943)
* Don't resolve default tts engine in assist pipelines

* Set tts engine when creating default pipeline

* Update tests
2023-04-24 14:40:11 +02:00
J. Nick Koston
392a9f32c9 Add fallback to device zone time or no timezone to onvif when setting time fails (#91882) 2023-04-24 14:37:56 +02:00
J. Nick Koston
ddb3955a23 Add guards to onvif for when the PullPoint to Webhook url changes (#91886) 2023-04-24 14:35:45 +02:00
J. Nick Koston
6c024405a6 Ensure onvif can still be unloaded if camera fails to unsubscribe (#91887) 2023-04-24 14:13:04 +02:00
Erik Montnemery
c5d0c392a9 Don't resolve default stt engine in assist pipelines (#91936)
* Don't resolve default stt engine in assist pipelines

* Apply suggestion from code review

* Add tests

* Tweak

* Add test

* Improve test coverage
2023-04-24 13:37:13 +02:00
Joost Lekkerkerker
0d815a1688 Bump Pylast to 5.1.0 (#91909) 2023-04-24 13:11:14 +02:00
Franck Nijhof
43880ffdc4 Remove unneeded pygatt package from machine builds (#91940) 2023-04-24 12:39:51 +02:00
rubenbe
2f1a5942ab Add MQTT fan direction support (#91700)
* Add MQTT fan direction support

* Add MQTT fan direction abbreviations

* Add MQTT fan direction tests

* Shorten MQTT fan test payloads
2023-04-24 11:48:00 +02:00
J. Nick Koston
739963b5ee Remove deprecated async_setup_platforms (#91929) 2023-04-23 22:38:35 -05:00
Paulus Schoutsen
a203149133 Allow entity names for STT entities (#91932)
* Allow entity names for STT entities

* Fix tests
2023-04-23 23:06:34 -04:00
J. Nick Koston
fba7c6cacd Remove deprecated async_get_registry (#91928)
Deprecated in 2021 via #46265, report was added a year ago in #72088
2023-04-23 23:02:21 -04:00
J. Nick Koston
f3838dde3a Cleanup onvif topic before lookup (#91914)
* Cleanup onvif topic before lookup

Some devices will append . and / to the path. We need
to strip it off to find the correct matcher

fixes #51870

* Update homeassistant/components/onvif/event.py

* Update homeassistant/components/onvif/event.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-23 23:02:08 -04:00
Michael Hansen
5348ea3ac4 Add processing tone (#91931)
* Add processing tone

* Update homeassistant/components/voip/voip.py

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

* Update homeassistant/components/voip/voip.py

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

* Fix linting

* Fix tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-23 21:28:56 -05:00
Paulus Schoutsen
c8c8e4dede Remove duplicate name from Wyoming TTS entity (#91930) 2023-04-23 20:13:32 -05:00
J. Nick Koston
14d2645de2 Avoid creating onvif switches on unsupported devices (#91907)
* Avoid creating onvif switches on unsupported devices

fixes #89064

* cover
2023-04-23 20:56:43 -04:00
J. Nick Koston
0b0c94ee52 Fix migration with negative event type cache (#91910)
* Fix migration with negative event type cache

fixes a regression with #91770

* Update homeassistant/components/recorder/table_managers/event_types.py
2023-04-23 20:56:17 -04:00
J. Nick Koston
c38839d72f Suppress events for tns1:MediaControl/VideoEncoderConfiguration with onvif (#91916)
These events are not useful to the integration and generate a
confusing log message
```
2023-04-23 14:01:21.866 INFO (MainThread) [homeassistant.components.onvif] DS-HD1: No registered handler for event from 80:91:33:88:8d:bd: {
    SubscriptionReference: None,
    Topic: {
        _value_1: tns1:MediaControl/VideoEncoderConfiguration,
        Dialect: http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet,
        _attr_1: {
    }
    },
    ProducerReference: None,
    Message: {
        _value_1: {
            Source: {
                SimpleItem: [
                    {
                        Name: VideoEncoderConfigurationToken,
                        Value: VideoEncoderToken_1
                    }
                ],
                ElementItem: [],
                Extension: None,
                _attr_1: None
            },
            Key: None,
            Data: {
                SimpleItem: [],
                ElementItem: [
                    {
                        _value_1: <Element {http://www.onvif.org/ver10/media/wsdl}Configuration at 0x2a9e103c0>,
                        Name: Config
                    }
                ],
                Extension: None,
                _attr_1: None
            },
            Extension: None,
            UtcTime: datetime.datetime(2023, 4, 23, 20, 1, 17, tzinfo=<isodate.tzinfo.Utc object at 0x1696b1270>),
            PropertyOperation: Initialized,
            _attr_1: {
        }
        }
    }
}

```

We now ignore them
2023-04-23 20:54:37 -04:00
J. Nick Koston
ed468fa390 Bump zeroconf to 0.58.0 (#91917)
* Bump zeroconf to 0.57.0

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.56.0...0.57.0

* again
2023-04-23 20:54:13 -04:00
Franck Nijhof
e795ac5a8e Wheels: Fix typo in env_canada dep for armhf (#91918) 2023-04-23 14:53:42 -05:00
Pablo Estevez
780d0a484d Add NUT device actions (#80986)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-23 14:09:36 -05:00
Michael Hansen
b6f2b29a99 Wyoming tts (#91712)
* Add tts entity

* Add tts entity and tests

* Re-add name to TextToSpeechEntity

* Fix linting

* Fix ruff linting

* Support voice attr (unused)

* Remove async_get_text_to_speech_entity

* Move name property to Wyoming TTS entity

* Fix id

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-23 13:06:56 -05:00
Paulus Schoutsen
f4df0ca50a Assist pipeline to use configured values (#91901)
* Assist pipeline to use configured values

* Include voice in TTS-START event

* Use correct tts language var

* More vars

* Apply suggestions from code review

* Update

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-04-23 12:48:11 -04:00
Franck Nijhof
ec1952b926 Wheels: Disable Pandas for Python 3.11 on armhf (#91898) 2023-04-23 16:42:44 +02:00
Markus
1a14a93df6 HA deconz: Add support for Tuya Smart Air Housekeeper 6in1 Air Quality Monitor (#87866)
* fix check for airquality sensor (was always TRUE)

* import additional const required

* add support for formaldehyd sensor

* add support for co2 sensor

* add support for pm25 sensor

* sort const a-z

* adapt to typo fixed function

* adapt to new key names (formaldehyde)

* adapt co2 sensor to new key names

* Update homeassistant/components/deconz/sensor.py

remove unnecessary code

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* add device_class for air_quality_ppb

* add test_air_quality_sensor_6_in_1

* fix Air quality PPB test to match device_class

* remove device_class of air_quality_ppb

* remove device_class test of airqualityppb

* explicit units

* remove device_class test of airquality_1_ppb

* dependency bump pydeconz to 111

* Update homeassistant/components/deconz/sensor.py

remove unnecessary device_class

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* import formatting

* formatting

* Update homeassistant/components/deconz/sensor.py

change key for pm2_5

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* add airquality co2 ch2o pm25 sensor testdata

* remove test_air_quality_sensor_6_in_1

* formatting

* bump pydeconz for requirements

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-04-23 16:12:52 +02:00
Marc Mueller
06520217bc Update pylint to 2.17.2 (#91894) 2023-04-23 14:46:48 +02:00
J. Nick Koston
1a00644b0a Bump ulid-transform to 0.7.0 (#91888)
changelog: https://github.com/bdraco/ulid-transform/compare/v0.6.3...v0.7.0
2023-04-23 06:53:53 -04:00
Marc Mueller
00e600d406 Improve notion generic typing (#91883) 2023-04-23 11:24:39 +02:00
Paulus Schoutsen
f18056f0a4 Add a VoIP user (#91884)
* Add a VoIP user

* Fix tests
2023-04-22 23:44:13 -04:00
Michael Hansen
7fcf07c964 Ensure .pcm binary files do not have line endings changed (#91881) 2023-04-22 22:22:30 -04:00
Michael Hansen
8abd047e21 Rename raw audio files to .pcm (#91879) 2023-04-22 22:03:08 -04:00
Paulus Schoutsen
1eef4af493 Use configured voice in TTS output for assist pipeline (#91878) 2023-04-22 22:01:32 -04:00
Matthias Alphart
33808cd268 Add entity name translations to KNX system sensors (#91396)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-23 01:31:59 +02:00
J. Nick Koston
82340907c2 Ensure onvif retries setup if camera fails to respond correctly (#91866) 2023-04-23 01:27:54 +02:00
[pʲɵs]
6013584b7b Add balance entity for Sonos speakers (#85205) 2023-04-23 01:18:17 +02:00
J. Nick Koston
942a955a77 Handle 404 for media/ptz/image onvif services to allow setup to proceed (#91875) 2023-04-23 01:16:37 +02:00
J. Nick Koston
e4744199ce Raise an exception when trying to save camera snapshots to a not allowed path (#91869) 2023-04-23 01:15:56 +02:00
Marc Mueller
9ccc0059d2 Add run-name for workflow_dispatch runs [ci] (#91873) 2023-04-23 01:15:09 +02:00
J. Nick Koston
bba225abc5 Mark onvif events as stale when the subscription renewal fails (#91567) 2023-04-23 01:14:22 +02:00
Franck Nijhof
dccef1020c Revert "Update opencv-python-headless to 4.7.0.72" (#91871) 2023-04-23 01:09:35 +02:00
Luke
498e69695b Add Anova integration (#86254)
* init setup of Anova Sous Vide

* bump anova-wifi to 0.2.4

* Removed yaml support

* Bump to anova-wifi 0.2.5

* Added support for adding sous vide while offline

* Added basic test for sensor

* added better tests for sensors and init

* expanded code coverage

* Decreased timedelta to lowest functioning value.

* Updating my username

* migrate to async_forward_entry_setups

* applying pr recommended changes

* bump anova-wifi to 0.2.7

* Improvements to hopefully get this review ready

* formatting changes

* clean ups for pr review

* remove unneeded unique id check.

* bump ao anova_wifi 0.3.0

* rename device_id to device_unique_id

* renamed to 'anova'

* added unique_id to MockConfigEntry

* removed leftover anova sous vides

* added device id to strings

* added error for incorrect device id

* add has_entity_name

* added attr name for tests

* added authentication functionality

* bump to 0.4.3

* split entity into its own class/object

* pulling firmware version out of async_setup

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

* addressed pr changes

* fixed pytest

* added anova data model

* removed unneeded time change

* add logging in package

* rework step_user

* Update homeassistant/components/anova/sensor.py

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

* Removed lower from attr unique id

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

* Removed unneeded member variables in sensor

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

* removed repeated subclass attr

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

* simplify update_failed test

* created descriptionentity

* bump to 0.6.1 limit ws connect

* add translation for sensor entities

* version bump - support pro model

* add anova to strict typing

* fixed sensor not getting datas type

* Apply suggestions from code review

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

* Check for new devices in init

* style changes

* return false instead of config entry not ready

* move serialize_device_list to utils

* move repeating device check into api

* moved unneeded code out of try except

* fixed tests to get 100% cov

* Update homeassistant/components/anova/strings.json

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

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-22 18:05:14 -05:00
Eric Severance
68ce59e9c1 Skip adding WeMo device on failure (#91621)
* Skip adding WeMo device on failure

* Only create a single log entry for each failed device

* Fix typo s/serial_number/serialnumber/

* Discard failed devices on success
2023-04-22 23:10:08 +02:00
Franck Nijhof
66a25a9e72 Wheels: Don't build opencv-python-headless on cp311 (#91872) 2023-04-22 22:44:29 +02:00
cirrusblau
ae91ef8e74 Bump locationsharinglib to 5.0.1 (#91259) 2023-04-22 22:05:23 +02:00
Franck Nijhof
5533eed30c Wheels: Don't build beacontools on cp311 (#91868) 2023-04-22 22:00:32 +02:00
epenet
7906e39df7 Add missing ViCare diagnostics tests (#90821)
Co-authored-by: Hans Oischinger <hans.oischinger@gmail.com>
2023-04-22 21:29:40 +02:00
epenet
98b1005b63 Ensure config entries are unloaded in tests (#90850) 2023-04-22 21:26:07 +02:00
Michael
4ed23b18e3 Add entity name translations to Supervisor (#90937) 2023-04-22 21:17:00 +02:00
epenet
41f8f9fcad Fix lingering timer in yeelight SSDP discovery (#91694) 2023-04-22 21:13:36 +02:00
epenet
102613a1af Fix lingering timer in wiz (#91745) 2023-04-22 21:12:48 +02:00
Michael
957181d38f Correct unit of measurement for Synology DSM sensors (#90633) 2023-04-22 21:11:03 +02:00
Ernst Klamer
328b79a4af Add events to BTHome (#91691)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-22 14:10:27 -05:00
Franck Nijhof
ca76285bcf CI: Cancel concurrent Wheel jobs (#91867) 2023-04-22 20:56:52 +02:00
Franck Nijhof
0f80d0625a Wheels: Don't build azure-servicebus on cp311 (#91862) 2023-04-22 19:29:42 +02:00
Michael
fe2c11a698 Add diagnostics to PI-Hole (#91383) 2023-04-22 19:29:28 +02:00
jjlawren
d5a6840588 Create repair issue if Sonos subscriptions fail (#87437)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-22 19:28:04 +02:00
David Poll
93a87d3c82 Add device_trackers attribute to person entities (#91312) 2023-04-22 19:26:12 +02:00
Tristan Richard
94a1429c65 Update Egardia to support more devices (#91430)
Co-authored-by: Tristan Richard <trichard@jabra.com>
2023-04-22 19:10:17 +02:00
Christopher Bailey
512e03746b Bump pyunifiprotect to 4.8.2 (#91861) 2023-04-22 18:44:27 +02:00
Paulus Schoutsen
d4fb2cdcf7 Conversation list command to support match-all languages agents (#91844)
* Conversation list command to support match-all languages agnets

* Reuse var
2023-04-22 12:43:09 -04:00
Matthias Alphart
95d44e100b Update xknx to 2.9.0 (#91282)
* Update xknx to 2.8.0

* add tests for validators

* Update strings.json

* Update xknx to 2.9.0
2023-04-22 18:25:14 +02:00
András Rutkai
2e9dc209f9 Updated list of supported voices in Watson TTS integration (#91458) 2023-04-22 18:11:18 +02:00
Maciej Bieniek
8389086388 Add new parental control switches for NextDNS (#91507) 2023-04-22 18:09:54 +02:00
MarkGodwin
e19c6ac011 Bump tplink-omada-client to 1.2.4 (#91853) 2023-04-22 18:09:02 +02:00
Jan Bouwhuis
8910afa474 Substate will never be None when subscribing mqtt topics (#91856) 2023-04-22 17:54:39 +02:00
mkmer
cb87942b28 Bump whirlpool-sixth-sense to 0.18.3 (#91859) 2023-04-22 17:53:04 +02:00
J. Nick Koston
3beb6e9718 Add webhook support to onvif (#91485) 2023-04-22 17:49:41 +02:00
Franck Nijhof
a491859875 Several changes to Wheels building for the cp311 ABI (#91850) 2023-04-22 17:23:02 +02:00
epenet
60d7ea6f0d Use SnapshotAssertion in 1-wire tests (#90782) 2023-04-22 17:22:05 +02:00
epenet
b568dd3060 Refactor SnapshotAssertion is SFR Box (#90775) 2023-04-22 17:20:27 +02:00
Maciej Bieniek
ee23d79a00 Add air quality sensors to Accuweather integration (#91516) 2023-04-22 17:19:21 +02:00
Franck Nijhof
20a42c65cf CI: Add automatic retries to codecov upload action (#91857) 2023-04-22 17:16:43 +02:00
starkillerOG
228233ae0c Bump reolink-aio to v0.5.13 (#91550) 2023-04-22 16:14:36 +02:00
Franck Nijhof
f39f07e19b Update YARL to 1.9.1 (#91852) 2023-04-22 09:14:27 -04:00
Lucas
48a2fe9e7a Add more PrusaLink sensors (#80424)
* Add more PrusaLink sensors

* Disable prusalink target temperatures by default, add prusa to brands

* Disable prusalink z-height by default

* Remove uneccessary Prusa from brands

* Move target temperatures to the telemetry section of the sensor

* Fix entity naming for prusalink

* Add tests for new prusalink sensors

* Test fixes, fix rebase errors

* Clean up deprecated unit usage

* Add translations for entity names

* Fix tests for translations

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-22 09:04:10 -04:00
J. Nick Koston
b76551cf35 Reduce number of columns selected for logbook (#91718) 2023-04-22 14:25:22 +02:00
J. Nick Koston
34b824a27b Reduce number of columns when selecting attributes for history (#91717) 2023-04-22 14:21:08 +02:00
J. Nick Koston
6e628d2f06 Add a negative cache to the recorder event type manager (#91770) 2023-04-22 14:09:04 +02:00
starkillerOG
8544d73b88 Reolink doorbell extend features (#90469) 2023-04-22 13:57:10 +02:00
Jan Bouwhuis
9197316b57 Add tests mqtt light with single supported color_mode (#91811) 2023-04-22 13:55:43 +02:00
J. Nick Koston
b5fbbf8410 Speed up processing binary columns on SQLite/MariaDB/MySQL (#91818) 2023-04-22 13:55:11 +02:00
Jan Bouwhuis
fc0c8bf113 Improve comment on patching the _import method in test bootstrap dependencies test (#91848) 2023-04-22 13:40:38 +02:00
Bouwe Westerdijk
624b8d1cbd Bump plugwise to v0.31.0 (#91831) 2023-04-22 12:59:47 +02:00
Jan Bouwhuis
ad355b3396 Remove unreachable code in mqtt integration discovery (#91796) 2023-04-22 12:31:32 +02:00
J. Nick Koston
7a02e992f9 Bump sense_energy to 0.11.2 (#91836) 2023-04-22 12:12:16 +02:00
J. Nick Koston
95fcdc5684 Speed up sql queries where ORM rows are not needed (#91839)
* Speed up logbook and history queries where ORM rows are not needed

This avoids having sqlalchemy wrap Result in ChunkedIteratorResult
which has additional overhead we do not need for these cases

* more places

* anything that uses _sorted_statistics_to_dict does not need orm rows either
2023-04-21 23:28:07 -04:00
J. Nick Koston
2663901603 Speed up LazyEventPartialState for logbook (#91840)
* Speed up LazyEventPartialState for logbook

We should avoid the getattr call since every row would
have to call the sqlalchemy key not found implemention
if we blindly getattr

* Speed up LazyEventPartialState for logbook

We should avoid the getattr call since every row would
have to call the sqlalchemy key not found implemention
if we blindly getattr
2023-04-21 23:27:23 -04:00
Erik Montnemery
9a0de43f98 Add name to tts voices (#91814)
* Add name to tts voices

* Add new file
2023-04-21 20:41:14 -04:00
Paulus Schoutsen
cdbdf1ba4f 2023.4.6 (#91833) 2023-04-21 20:31:05 -04:00
Aaron Bach
c6d846453d Bump aionotion to 2023.04.2 to address imminent API change (#91786)
* Bump `aionotion` to 2023.04.0

* Bump `aionotion` to 2023.04.2 to address imminent API change

* Clean migration

* Reduce blast area

* Fix tests

* Better naming
2023-04-21 19:52:57 -04:00
J. Nick Koston
d58f62cb5e Remove old migration tests that have been replaced (#91842)
These tests were moved to test_migration_from_schema_32.py in `dev`
and have changed. Remove the old tests as they are no longer
correct
2023-04-21 19:12:21 -04:00
Paulus Schoutsen
f1c4605fba Bumped version to 2023.4.6 2023-04-21 14:58:46 -04:00
Paulus Schoutsen
deb55a74da Disallow uploading files to bypass the media dirs (#91817) 2023-04-21 14:58:42 -04:00
Allen Porter
30da629285 Relax the constraint that events must have a consistent timezone for start/end (#91788) 2023-04-21 14:58:41 -04:00
Stephan Uhle
26b28001c5 Bump pysml to 0.0.10 (#91773) 2023-04-21 14:58:40 -04:00
Nathan Spencer
64f8059f00 Bump pylitterbot to 2023.4.0 (#91759) 2023-04-21 14:58:39 -04:00
Jan Bouwhuis
8363183943 Do not wait for mqtt at startup mqtt_statestream (#91721) 2023-04-21 14:58:38 -04:00
Teemu R
e19279fda5 Bump python-songpal dependency (#91708) 2023-04-21 14:58:38 -04:00
J. Nick Koston
591ffe2340 Fallback to generating a new ULID on migraiton if context is missing or invalid (#91704)
* Fallback to generating a new ULID on migraiton if context is missing or invalid

It was discovered that postgresql will do a full scan if
there is a low cardinality on the index because of missing
context ids. We will now generate a ULID for the timestamp
of the row if the context data is missing or invalid

fixes #91514

* tests

* tweak

* tweak

* preen
2023-04-21 14:58:37 -04:00
Shay Levy
fc4e8e5e7b Bump aioshelly to 5.3.2 (#91679) 2023-04-21 14:58:36 -04:00
J. Nick Koston
36d2accb5b Handle long format context UUIDs during migration (#91657)
In https://github.com/home-assistant/core/issues/91514 is was discovered
these exist in older versions
2023-04-21 14:58:07 -04:00
epenet
38de9765df Bump renault-api to 0.1.13 (#91609) 2023-04-21 14:55:51 -04:00
Duco Sebel
6b02892c28 Handle UnsupportedError in HomeWizard (#91608)
* Handle UnsupportedEror

* Make error message more clear

* Remove debug line, whoops
2023-04-21 14:55:50 -04:00
Tom Harris
c544da7426 Fix Insteon thermostat issue (#91568)
* Bump pyinsteon

* Bump pyinsteon

* Bump pyinsteon
2023-04-21 14:55:49 -04:00
Aaron Godfrey
71f0f53ddc Fix tasks with no due date from not triggering on calendar state. (#91196)
Fix tasks with no due date.

Prior to this change we were setting the start date/time to utc rather
than the user's timezone.
2023-04-21 14:55:48 -04:00
Jan Bouwhuis
4de124cdd5 Follow up on comments on changes bootstrap tests (#91803)
* Remove commented code

* Add comment to explain mock

* typo
2023-04-21 21:44:14 +03:00
Franck Nijhof
5e243da470 Clean up gateway logic from Plugwise (#91769) 2023-04-21 21:38:45 +03:00
epenet
33a8eb1716 Add type hints to broadlink device/heartbeat (#91737)
* Add type hints to broadlink device/heartbeat

* Improve

* Force bool

* Revert "Force bool"

This reverts commit 65bce837d0.
2023-04-21 21:36:18 +03:00
CodingSquirrel
6137aeb30a Bump pyeconet to 0.1.20 (#90950)
chore: Bump pyeconet to 0.1.20 to fix reloading values
2023-04-21 19:25:00 +02:00
epenet
24428d98a1 Fix lingering timer in smartthings tests (#91697) 2023-04-21 18:58:07 +02:00
epenet
3d39854ffc Fix lingering timer in traccar (#91812) 2023-04-21 18:49:54 +02:00
epenet
4663ad75a0 Fix lingering timer in tplink (#91806) 2023-04-21 16:52:23 +02:00
epenet
07aef27ea8 Fix lingering timer in todoist (#91808) 2023-04-21 16:41:54 +02:00
Allen Porter
93eac97983 Relax the constraint that events must have a consistent timezone for start/end (#91788) 2023-04-21 10:25:52 -04:00
Paulus Schoutsen
78e29d526c Disallow uploading files to bypass the media dirs (#91817) 2023-04-21 10:21:20 -04:00
epenet
9665bc61f2 Fix lingering timer in usb (#91800) 2023-04-21 13:41:22 +02:00
Kevin Stillhammer
609a7ccda8 Use Selectors for waze_travel_time flows (#91778)
* Use Selectors for waze_travel_time flows

* Use correct selector option in tests

* Remove duplicate option

* Use suggested values
2023-04-21 12:57:45 +02:00
Franck Nijhof
3b0068bc85 Update opencv-python-headless to 4.7.0.72 (#91802) 2023-04-21 12:23:46 +02:00
Franck Nijhof
5b9ad6a6d3 Update psutil to 5.9.5 (#91807) 2023-04-21 12:06:28 +02:00
epenet
459af7f834 Fix lingering timer in discovery (#91804)
* Fix lingering timer in discovery

* type hint
2023-04-21 11:49:10 +02:00
Miroslav Ždrale
2198492f1b Bump openwrt-luci-rpc version to 1.1.16 (#91358) 2023-04-21 11:27:26 +02:00
Eduard van Valkenburg
09517668fe Update pysiaalarm to 3.1.0 (#91500)
* updated sia requirements

* updates because of changes in package

* linting and other small fixes

* linting and other small fixes

* small release on package that fixes issue with autospec
2023-04-21 10:51:49 +02:00
dependabot[bot]
faf78fc6b1 Bump codecov/codecov-action from 3.1.2 to 3.1.3 (#91791)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-21 10:48:28 +02:00
dependabot[bot]
0e2541c843 Bump actions/setup-python from 4.5.0 to 4.6.0 (#91792)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-21 10:47:35 +02:00
Franck Nijhof
7af63c2cdf Remove libexecinfo-dev package from Wheels jobs (#91798) 2023-04-21 10:36:13 +02:00
epenet
79ad9a3646 Shutdown coordinator on entry unload (#91748)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-21 10:07:31 +02:00
Franck Nijhof
a37a87e972 Build wheels for CPython ABI cp311 (#91736) 2023-04-21 09:10:39 +02:00
Jan Bouwhuis
92bb61d25b Let MQTT availability for snips be managed by dependencies (#91790)
MQTT availability for snips via dependencies
2023-04-21 09:05:13 +02:00
Jan Bouwhuis
0552ec834d Do not wait for mqtt at startup mqtt_statestream (#91721) 2023-04-21 09:00:48 +02:00
Jan Bouwhuis
da26b0a930 Ensure dependencies are awaited correctly when setting up integrations (#91454)
* Do not wait

* Correct tests

* Manage after dependencies stage 1

* test bootstrap dependencies

* Assert log the dependenciy is waited for

* Improve docstrings

* Assert outside callback

* Patch async_get_integrations

* Revert changes made to snips integration

* Undo changes to mqtt_statestream
2023-04-21 08:33:50 +02:00
J. Nick Koston
2e18b37291 Bump dbus-fast to 1.85.0 (#91784) 2023-04-21 08:26:44 +02:00
puddly
72414a5864 Load quirks in ZHA unit tests (#91779) 2023-04-21 08:24:39 +02:00
Franck Nijhof
f9416e1c34 Update sentry-sdk to 1.20.0 (#91771) 2023-04-21 08:23:09 +02:00
Stephan Uhle
beb0085b53 Bump pysml to 0.0.10 (#91773) 2023-04-21 08:16:32 +02:00
Franck Nijhof
65d7e48815 Update ruff to v0.0.262 (#91767) 2023-04-21 08:15:41 +02:00
kernelpanic85
7a20335943 Bump arcam-fmj to 1.3.0 (#91747)
Bump arcam-fmj to 1.3.0
2023-04-21 07:08:00 +02:00
Martin Hjelmare
1a18dc7425 Add tts entity (#91692)
* Add tts entity

* Allow passing engine id to url view

* Update async_resolve_engine

* Add and update more tests

* Fix assist pipeline tests temporarily

* Move fixtures

* Update notify platform

* Complete legacy tests

* Update media source tests

* Update async_get_text_to_speech_languages

* Address comment

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-20 22:55:46 -04:00
J. Nick Koston
458276a6a6 Bump aioesphomeapi to 13.7.1 (#91783)
changelog: https://github.com/esphome/aioesphomeapi/compare/v13.7.0...v13.7.1
2023-04-20 16:36:11 -10:00
J. Nick Koston
c407fb0861 Bump recommended esphome version to 2023.4.0 for bluetooth (#91509) 2023-04-20 15:36:12 -10:00
Michael Hansen
5080654776 VoIP listening tone and "not configured" message (#91762)
* Play tone when starting a VoIP call

* Play audio message when call is rejected

* Add option to disable tone for tests

* Send RTP audio in executor to reduce jitter

* Don't start pipeline until speech

* Bump voip utils
2023-04-20 20:30:51 -04:00
Keilin Bickar
f4f3962ee9 Bump asyncsleepiq lib to 1.3.3 (#91772) 2023-04-20 12:01:49 -10:00
epenet
2aa90b1d12 Fix lingering timer in netatmo (#91728) 2023-04-20 21:00:24 +02:00
Teemu R
dcae9a0d02 Bump python-songpal dependency (#91708) 2023-04-20 20:57:45 +02:00
epenet
821b9bdb5f Fix lingering timer in hassio (#91702) 2023-04-20 20:56:45 +02:00
Jannick
cf4c491e79 Update URLs forwarding to HA blog posts (#91698) 2023-04-20 20:55:13 +02:00
epenet
62f76a81bb Fix wallbox tests (#91752) 2023-04-20 08:42:22 -10:00
Franck Nijhof
fd3aa5338c Add Supervisor add-on discovery to Wyoming integration (#91761) 2023-04-20 20:38:39 +02:00
Nathan Spencer
8ac74c5979 Bump pylitterbot to 2023.4.0 (#91759) 2023-04-20 20:29:35 +02:00
Michael Hansen
9fdc794b36 Prefer country over language family + MATCH_ALL (#91753)
* Prefer country over language family

* More test fixes
2023-04-20 13:55:26 -04:00
Kevin McCormack
672fb44041 Add pjlink const (#91749)
* Add pjlink const

This is a precursor

* Use DOMAIN const in pjlink media player

* fixup! Add pjlink const
2023-04-20 19:27:44 +02:00
Erik Montnemery
b3d50e67cd Fix assist_pipeline tests (#91757) 2023-04-20 12:19:31 -04:00
epenet
62d38b49bc Fix lingering timers in bluetooth (part 1) (#91673)
* Fix lingering timers in bluetooth (part 1)

* Use a local var
2023-04-20 18:07:38 +02:00
Erik Montnemery
0525ce59d7 Add additional parameters to assist pipelines (#91619)
* Add additional parameters to assist pipelines

* Improve WS schema validation

* Tweak

* Add test

* Address review comments
2023-04-20 11:02:55 -04:00
Luke
b4e0a1f1fc Add new Roborock Integration (#89456)
* init roborock commit

* init commit of roborock

* removed some non-vacuum related code

* removed some non-needed constants

* removed translations

* removed options flow

* removed manual control

* remove password login

* removed go-to

* removed unneeded function and improved device_stat

* removed utils as it is unused

* typing changes in vacuum.py

* fixed test patch paths

* removed unneeded records

* removing unneeded code in tests

* remove password from strings

* removed maps in code

* changed const, reworked functions

* remove menu

* fixed tests

* 100% code coverage config_flow

* small changes

* removed unneeded patch

* bump to 0.1.7

* removed services

* removed extra functions and mop

* add () to configEntryNotReady

* moved coordinator into seperate file

* update roborock testing

* removed stale options code

* normalize username for unique id

* removed unneeded variables

* fixed linter problems

* removed stale comment

* additional pr changes

* simplify config_flow

* fix config flow test

* Apply suggestions from code review

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* First pass at resolving PR comments

* reworked config flow

* moving vacuum attr

* attempt to clean up conflig flow more

* update package and use offline functionality

* Fixed errors and fan bug

* rework model and some other small changes

* bump version

* used default factory

* moved some client creation into coord

* fixed patch

* Update homeassistant/components/roborock/coordinator.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* moved async functions into gather

* reworked gathers

* removed random line

* error catch if networking doesn't exist or timeout

* bump to 0.6.5

* fixed mocked data reference url

* change checking if we have no network information

Co-authored-by: Allen Porter <allen.porter@gmail.com>

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
Co-authored-by: Allen Porter <allen@thebends.org>
2023-04-20 07:02:58 -07:00
Erik Montnemery
af193094b5 Add WS command for getting an assist pipeline (#91725)
* Add WS command for getting an assist pipeline

* Return preferred pipeline if none is specified
2023-04-20 09:15:19 -04:00
Franck Nijhof
a419c78524 Rename HomeKit to HomeKit Bridge (#91741) 2023-04-20 09:03:12 -04:00
Erik Montnemery
a98be9dc84 Test specifying pipeline in calls to async_pipeline_from_audio_stream (#91739) 2023-04-20 09:01:31 -04:00
Erik Montnemery
0429b321b8 Include matching languages in WS conversation/agent/list (#91730)
* Include matching languages in WS conversation/agent/list

* Allow specifying country
2023-04-20 08:58:43 -04:00
Erik Montnemery
768c499b6f Include matching languages in WS stt/engine/list (#91731)
* Include matching languages in WS stt/engine/list

* Allow specifying country
2023-04-20 08:57:48 -04:00
Erik Montnemery
79de27a4a9 Include matching languages in WS tts/engine/list (#91732)
* Include matching languages in WS tts/engine/list

* Allow specifying country
2023-04-20 08:56:50 -04:00
Erik Montnemery
6d619579b4 Add WS API for listing languages supported by a full assist pipeline (#91669)
* Add WS API for listing languages supported by a full assist pipeline

* Address review comments, change logic
2023-04-20 08:55:17 -04:00
Erik Montnemery
03dcb915e3 Add missing callback decorator on StorageCollectionWebsocket.ws_list_item (#91727) 2023-04-20 07:58:11 -04:00
epenet
bb2461ea93 Fix lingering timers in bluetooth (part 2) (#91674) 2023-04-20 11:04:07 +02:00
Franck Nijhof
d8c9ed3a64 Update Home Assistant base image to 2023.04.0 (#91720) 2023-04-20 10:57:18 +02:00
Jan Bouwhuis
0bcda9fe9c Make sure MQTT client is available when starting depending platforms (#91164)
* Make sure MQTT is available starting mqtt_json

* Wait for mqtt client

* Sync client connect

* Simplify

* Addiitional tests async_wait_for_mqtt_client

* Improve comment waiting for mqtt

* Improve docstr

* Do not wait unless the MQTT client is in setup

* Handle entry errors during setup

* More comments - do not clear event

* Add snips and mqtt_room

* Add manual_mqtt

* Update homeassistant/components/mqtt/__init__.py

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

* Use a fixture, improve tests

* Simplify

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-20 08:07:35 +02:00
J. Nick Koston
adc472862b Fallback to generating a new ULID on migraiton if context is missing or invalid (#91704)
* Fallback to generating a new ULID on migraiton if context is missing or invalid

It was discovered that postgresql will do a full scan if
there is a low cardinality on the index because of missing
context ids. We will now generate a ULID for the timestamp
of the row if the context data is missing or invalid

fixes #91514

* tests

* tweak

* tweak

* preen
2023-04-19 21:56:07 -04:00
J. Nick Koston
56a6244d90 Remove legacy context lookup implementation from logbook (#91710)
* Remove legacy context lookup implemention from logbook

This object can now be replaced with a simple dict

* Remove legacy context lookup implemention from logbook

This object can now be replaced with a simple dict

* scope

* fix order issue
2023-04-19 21:54:34 -04:00
Mike Degatano
24fe6dfc63 Fix from feedback on supervisor issues to repairs (#91680)
* Fix from feedback on supervisor issues to repairs

* Use cls parameter in classmethods
2023-04-20 01:02:40 +02:00
Paulus Schoutsen
6342992791 Detect eero brand for Thread (#91699) 2023-04-19 22:18:09 +02:00
epenet
8d35426c69 Fix lingering timer in ZHA cluster tests (#91693) 2023-04-19 21:04:53 +02:00
epenet
2df5d34374 Fix lingering timer in unifiprotect discovery (#91695) 2023-04-19 21:02:37 +02:00
Shay Levy
54a659c51b Bump aioshelly to 5.3.2 (#91679) 2023-04-19 20:26:45 +03:00
epenet
1797dca0b8 Fix lingering timer in ZHA tests (#91688)
* Fix lingering timer in ZHA discovery tests

* Add type hints

* Also update gateway tests
2023-04-19 13:00:25 -04:00
epenet
d70ae8afc5 Fix lingering timer in ZHA debouncers (#91685) 2023-04-19 18:45:27 +02:00
epenet
ec914815bd Fix lingering timer in ZHA light transition (#91683) 2023-04-19 18:20:17 +02:00
epenet
dace1add1f Fix lingering timer in SinopeTechnologiesThermostat (#91681) 2023-04-19 18:19:58 +02:00
Erik Montnemery
4e0b8a7363 Allow complex schemas for validating WS commands (#91655) 2023-04-19 11:37:09 -04:00
J. Nick Koston
90e92aa9d8 Add test case for matching the shelly button (#91642) 2023-04-19 11:26:21 -04:00
J. Nick Koston
573c15d67a Update bluetooth debug logging for newer bleak (#91643)
fixes

```
homeassistant/components/bluetooth/wrappers.py:268: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead
  rssi = wrapped_backend.device.rssi
```
2023-04-19 11:26:02 -04:00
J. Nick Koston
f8fa382ebc Add test coverage for bluetooth devices being rediscoverable after they go unavailable (#91645)
* Fix bluetooth devices not being discovered after they go unavailable and reavailable

* Update homeassistant/components/bluetooth/manager.py
2023-04-19 11:25:38 -04:00
Erik Montnemery
b5ab83def4 Add test for WS conversation/agent/info (#91652) 2023-04-19 11:15:21 -04:00
Duco Sebel
9092f6a60f Handle UnsupportedError in HomeWizard (#91608)
* Handle UnsupportedEror

* Make error message more clear

* Remove debug line, whoops
2023-04-19 11:14:28 -04:00
epenet
55c723753e Cleanup device handles on ZHA controller shutdown (#91591) 2023-04-19 17:13:58 +02:00
Erik Montnemery
9bd739df82 Add assist_pipeline to default_config (#91651) 2023-04-19 10:59:43 -04:00
Erik Montnemery
eabbe8969d Adjust typing of AbstractConversationAgent.supported_languages (#91648)
* Adjust typing of AbstractConversationAgent.supported_languages

* Update test
2023-04-19 10:53:49 -04:00
Erik Montnemery
5e9bbeb4ad Refactor conversation agent WS API for listing agents (#91590)
* Refactor conversation agent WS API for listing agents

* Add conversation/agent/info back
2023-04-19 10:53:24 -04:00
David F. Mulcahey
9c784ac622 Refactor ZHA (#91476)
* rename channel -> cluster handler

* remove refs to channels and create endpoint class

* remove remaining references to channels

* fix filter

* take in latest changes from #91403

* missed one

* missed a reference
2023-04-19 10:47:07 -04:00
Erik Montnemery
090f59aaa2 Make context a mandatory parameter for async_pipeline_from_audio_stream (#91658) 2023-04-19 09:30:29 -04:00
Tom Harris
ebd20c8a7b Fix Insteon thermostat issue (#91568)
* Bump pyinsteon

* Bump pyinsteon

* Bump pyinsteon
2023-04-19 08:41:32 -04:00
J. Nick Koston
408b2171ae Handle long format context UUIDs during migration (#91657)
In https://github.com/home-assistant/core/issues/91514 is was discovered
these exist in older versions
2023-04-19 08:40:04 -04:00
Joost Lekkerkerker
162c36f108 Move Steam Entity to separate file (#91630) 2023-04-19 14:14:59 +02:00
Joost Lekkerkerker
88f5f04be8 Refactor LastFM to use shorthand attributes (#91606)
* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Apply feedback

* Apply feedback

* Apply feedback

* Apply feedback

* Apply feedback

* Update homeassistant/components/lastfm/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/lastfm/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply feedback

* Apply feedback

* Fix tests

* Update homeassistant/components/lastfm/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Fix tests

* Fix feedback

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-19 14:13:43 +02:00
Erik Montnemery
f3e6d6dfc0 Add async_get_supported_voices to tts.Provider (#91649)
* Add async_get_supported_voices to tts.Provider

* Update WS API
2023-04-19 13:47:49 +02:00
Michael Hansen
85d57a046c Add wyoming integration with stt (#91579)
* Add wyoming integration with stt/tts

* Forward config entry setup

* Use SpeechToTextEntity

* Add strings to config flow

* Move connection into config flow

* Add tests

* On load/unload used platforms

* Tweaks

* Add unload test

* Fix stt

* Add missing file

* Add test for no services

* Improve coverage

* Finish test coverage

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-19 06:10:59 -04:00
G Johansson
f74103c57e Add config flow to Workday (#72558)
* Initial commit Workday Config Flow

* Add tests

* Remove day_to_string

* new entity name, new depr. version, clean

* Use repairs for depr. warning

* Fix issue_registry moved

* tweaks

* hassfest

* Fix CI

* FlowResultType

* breaking version

* remove translation

* Fixes

* naming

* duplicates

* abort entries match

* add_suggested_values_to_schema

* various

* validate country

* abort_entries_match in option flow

* Remove country test

* remove country not exist string

* docstring exceptions

* easier

* break version

* unneeded check

* slim tests

* Fix import test

* Fix province in abort_match

* review comments

* Fix import province

* Add review fixes

* fix reviews

* Review fixes
2023-04-19 11:50:11 +02:00
Mike Degatano
a511e7d6bc Make repairs out of select supervisor issues (#90893)
* Make repairs out of select supervisor issues

* Fix comment formatting

* Add a test case for API error

* Testing and type fix
2023-04-19 08:07:38 +02:00
Michael Hansen
6b5e82ed40 Support both stt entity and legacy providers (#91633) 2023-04-18 16:59:06 -05:00
Erik Montnemery
dc3c47986b Add property supported_languages to AbstractConversationAgent (#91588)
* Add property supported_languages to AbstractConversationAgent

* Fix test

* Use MATCH_ALL for openai supported languages
2023-04-18 15:11:04 -05:00
epenet
d7eb4c4740 Bump renault-api to 0.1.13 (#91609) 2023-04-18 19:33:09 +02:00
epenet
1a787bba3f Remove webhook translation file (#91616) 2023-04-18 19:29:37 +02:00
epenet
ae0cbffdd8 Add ability to shutdown update coordinator (#91456)
* Add ability to shutdown update coordinator

* Adjust nibe_heatpump

* Add tests

* Use async

* Remove duplicate code in update coordinator

* Adjust

* Revert nibe changes - it can now be done in a follow-up PR

* Adjust

* Fix incorrect merge

* async_fire_time_changed
2023-04-18 18:56:43 +02:00
Erik Montnemery
bdffb1f298 Drop language parameter from async_get_pipeline (#91612) 2023-04-18 18:07:20 +02:00
Erik Montnemery
10606c4d1e Use the preferred assist pipeline if none was specified (#91611)
* Use the preferred assist pipeline if none was specified

* Add test
2023-04-18 17:35:33 +02:00
Erik Montnemery
016e051db6 Add timestamp to pipeline runs (#91599)
* Add timestamp to pipeline runs

* Include the timestamp in the list
2023-04-18 10:43:46 -04:00
Jan Bouwhuis
4132f08146 Remove check on remove deprecated call back for mqtt subscribe (#91464)
Remove check on deprecated callback wrapper
2023-04-18 16:02:24 +02:00
Erik Montnemery
5f7d98f15b Improve comment in conversation (#91595) 2023-04-18 09:27:14 -04:00
J. Nick Koston
03c517b066 Add a guard against selecting all entities in state_changes_during_period (#91585)
Add a guard against selecting all entities in state_changes_during_period

This cannot happen in `dev` because we require entity ids
2023-04-18 09:26:41 -04:00
Paulus Schoutsen
f3897d8dae Bump hass-nabucasa to 0.65.0 (#91565) 2023-04-18 08:42:03 -04:00
Jan Bouwhuis
599cc4a5c6 Cleanup MQTT platform set up and discovery start (#91007)
Cleanup platform set up and discovery start
2023-04-18 14:33:58 +02:00
J. Nick Koston
2ec1359063 Dynamically size recorder max backlog based on available memory (#90894)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-18 12:35:49 +02:00
Sander Striker
f49dc65ff2 EasyEnergy: Add two additional sensors to help pick the best hours (#90543) 2023-04-18 10:18:51 +02:00
J. Nick Koston
2530031454 Use cache to lookup event type ids in logbook (#91576)
noticed we can speed this up while looking at
https://github.com/home-assistant/core/issues/91514

Note: this will not fix that issue as there is more going on there
2023-04-17 23:40:03 -04:00
Michael Hansen
f96515b90a Use language util in stt/tts (#91521)
* Use language util in stt/tts

* Test language util in stt/tts

* Fix common in TTS

* Update snapshot
2023-04-17 23:23:43 -04:00
Michael Hansen
95d16c9829 VoIP audio queue (#91577)
* Clear audio queue after every conversation turn

* Stream STT audio when voice command starts
2023-04-17 22:51:14 -04:00
Jesse Hills
aeb19831d2 ESPHome select for assist pipeline selection (#91526)
* ESPHome: Add assist pipeline select entity

* Add translation strings

* Tests
2023-04-17 22:22:11 -04:00
Paulus Schoutsen
b05fcd7904 2023.4.5 (#91544) 2023-04-17 22:20:19 -04:00
shbatm
ef7e3e27ba Remove previously deprecated ISY994 YAML support (#91575) 2023-04-17 15:37:19 -10:00
Jesse Hills
8d201b205f ESPHome binary sensor representing assist pipeline running (#91406)
* ESPHome binary sensor representing assist pipeline running

* Apply suggestions from code review

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

* Rename to call active
Simplify with attrs a little

* Load binary sensor if voice assistant on device

* Add some tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-17 19:52:37 -04:00
epenet
28652345bd Remove duplicate code in update coordinator (#91573) 2023-04-17 13:07:58 -10:00
Bram Kragten
c6b4c88355 Fix pipeline select (#91570)
Fix pipline select
2023-04-17 18:55:38 -04:00
shbatm
c663f7677c Remove previously deprecated ISY994 services (#91569) 2023-04-17 11:43:01 -10:00
J. Nick Koston
da4c144a5e Fix history stats query using incorrect microseconds (#91250) 2023-04-17 11:37:30 -10:00
epenet
81f018b7e5 Make Debouncer shutdown async (#91542)
* Make shutdown async in Debouncer

* Adjust test
2023-04-17 23:31:30 +02:00
Erik Montnemery
e32dacc62d Add WS API to tts (#91330)
* Add WS API to tts

* Use language util, change from entity_id to engine_id

* Fix rebase mistake
2023-04-17 22:52:19 +02:00
Michael Hansen
2819ad9a16 Bump intents dependency (#91556) 2023-04-17 22:13:31 +02:00
Erik Montnemery
b5817e40f7 Add WS API to stt (#91329) 2023-04-17 22:09:30 +02:00
Bram Kragten
e3ff7d048a Make tts/stt/conversation optional on pipeline (#91555) 2023-04-17 20:54:04 +02:00
G Johansson
afc9e4303a Create base TriggerEntity (#91128)
* Trigger entity base class

* mods

* TriggerEntity to CoordinatorTriggerEntity

* variables to variable

* mypy

* unique_id

* Fix

* docstring

* _render_templates

* split manual vs coordinator

* name

* ManualTriggerEntity

* value

* use super

* Remove ManualTriggerEntity

* Use super()
2023-04-17 19:55:54 +02:00
Paulus Schoutsen
bd22e0bd43 Allow picking a pipeline for voip devices (#91524)
* Allow picking a pipeline for voip device

* Add tests

* Fix test

* Adjust on new pipeline data
2023-04-17 12:09:11 -05:00
Martin Hjelmare
9bd12f6503 Move legacy tts (#91538)
* Move legacy tts

* Add error log on unknown platform

* Add legacy tests and delint all tests

* Consolidate log format

* Add more legacy tests

* Test default legacy provider attributes

* Remove test generated files

* Clean up after merge conflict
2023-04-17 13:01:50 -04:00
Erik Montnemery
0ecd23baee Add WS API for debugging previous assist_pipeline runs (#91541)
* Add WS API for debugging previous assist_pipeline runs

* Improve typing
2023-04-17 11:48:02 -04:00
Erik Montnemery
b597415b01 Make it non-optional to implement supported_languages in tts.Provider (#91347) 2023-04-17 10:59:21 -04:00
Erik Montnemery
8c1c7e1e4c Remove PipelineEvent.as_dict (#91546) 2023-04-17 16:33:53 +02:00
Franck Nijhof
940861e2be Bumped version to 2023.4.5 2023-04-17 15:37:08 +02:00
Christopher Bailey
559ce6a275 Bump unifiprotect to 4.8.1 (#91522) 2023-04-17 15:36:51 +02:00
rappenze
273e1fd2be Fix state mapping in fibaro climate (#91505) 2023-04-17 15:36:48 +02:00
Ben Morton
5ddc18f8ed Resolve issue with switchbot blind tilt devices getting stuck in opening/closing state (#91495) 2023-04-17 15:36:44 +02:00
J. Nick Koston
489a6e766b Fix onvif failing to reload (#91482) 2023-04-17 15:36:40 +02:00
starkillerOG
572f2cc167 Reolink ONVIF move read to primary callback (#91478)
* Move read to primary callback

* fix styling

* Do not raise on ConnectionResetError

* Split request.text() to .read() and decode("utf-8")
2023-04-17 15:36:37 +02:00
J. Nick Koston
5321c60058 Handle a few more transient onvif errors (#91473) 2023-04-17 15:36:33 +02:00
J. Nick Koston
00a86757fa Bump onvif-zeep-async to 1.2.11 (#91472) 2023-04-17 15:36:30 +02:00
J. Nick Koston
b06d624d43 Fix creating onvif pull point subscriptions when InitialTerminationTime is required (#91470)
* Fix creating onvif pull point subscriptions when InitialTerminationTime is required

fixes #85902

* Bump again because I got it wrong the first time.. this is why retest is good
2023-04-17 15:36:26 +02:00
Michael Davie
89b1d5bb68 Bump env_canada to v0.5.33 (#91468) 2023-04-17 15:36:22 +02:00
Erik Montnemery
bf389440dc Save Thread dataset store when changing preferred dataset (#91411) 2023-04-17 15:36:18 +02:00
puddly
2b9cc39d2b Fix attribute reporting config failures in ZHA (#91403) 2023-04-17 15:36:15 +02:00
J. Nick Koston
afe3fd5ec0 Bump onvif-zeep-async to 1.2.5 (#91399) 2023-04-17 15:36:11 +02:00
Aidan Timson
e29d5a1356 Fix listener running in foreground for System Bridge integration (#91391)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-17 15:36:08 +02:00
rich-kettlewell
5f7b447d7a Tado set_water_heater_timer should use water_heater domain (#91364) 2023-04-17 15:36:03 +02:00
epenet
0e3f462bfb Add missing mock in sharkiq tests (#91325) 2023-04-17 15:33:52 +02:00
starkillerOG
8feab57d59 Reolink prevent ONVIF push being lost due to ConnectionResetError (#91070)
* Make "Connection lost" error less likely

* Handle connection loss during ONVIF event reading

* tweak

* fix styling

* catch asyncio.CancelledError from request.text()

* missing ()

* re-raise cancelation for proper cleanup

* Simplify

* Also set webhook_reachable if connection lost

* fix styntax

* Send HTTP_OK directly after data read done

* protect agains garbage collection

* Protect shielded task (inner) not shielded future (outer)

* fix black

* Make sure exceptions are logged

* fix spelling

* fix black

* fix spelling

* Simplify using hass.async_create_task

* clarify comment

* Eleborate comment

* Update homeassistant/components/reolink/host.py

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

* Apply suggestions from bdraco

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-17 15:28:25 +02:00
Mark Adkins
2bda40d352 Fix SharkIQ token expiration (#89357) 2023-04-17 15:27:44 +02:00
Meow
47398f03dd Add SetSynchronizationPoint fallback to onvif (#86400)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-17 15:22:17 +02:00
mkmer
799080eb00 Don't reload integration for AuthError in Honeywell (#91228) 2023-04-17 14:55:52 +02:00
epenet
3364f0fce2 Allow config entries unload action to be coroutine (#91531)
* Allow config entries unload action to be coroutine

* Adjust comment
2023-04-17 08:41:25 -04:00
Franck Nijhof
6a80f5fc60 Update cryptography to 40.0.2 (#91528) 2023-04-17 08:36:42 -04:00
Allen Porter
4c5746d6ed Update Todoist all day event handling following best practices (#90491) 2023-04-17 14:21:49 +02:00
J. Nick Koston
9be9defbb8 Add more rule parsers to onvif (#91533) 2023-04-17 13:41:15 +02:00
G Johansson
c3e22cfa63 SQL strings update db_url (#91537) 2023-04-17 13:37:27 +02:00
Franck Nijhof
f1bb4ed0ed Update pip constraint to allow for pip 23.1 (#91535) 2023-04-17 12:39:13 +02:00
epenet
d1b8f2987c Fix incorrect regex in translation script (#91536) 2023-04-17 12:18:34 +02:00
Martin Hjelmare
5c7d124f02 Add core as codeowner to tts (#91539) 2023-04-17 12:05:54 +02:00
krazos
717898fc92 Change entity category of IR light setting from control to config (#91382) 2023-04-17 11:10:06 +02:00
rappenze
a5b863cd75 Fix state mapping in fibaro climate (#91505) 2023-04-17 11:09:11 +02:00
starkillerOG
88bde2a914 Reolink ONVIF move read to primary callback (#91478)
* Move read to primary callback

* fix styling

* Do not raise on ConnectionResetError

* Split request.text() to .read() and decode("utf-8")
2023-04-16 22:48:39 -10:00
epenet
dd7de48efc Fix lingering timers in sia tests (#91407) 2023-04-17 10:36:13 +02:00
epenet
7c9242b4a7 Fix lingering timer in alert integration (#91452) 2023-04-17 10:35:53 +02:00
Erik Montnemery
3367e86686 Enable strict typing of assist_pipeline (#91529) 2023-04-17 10:32:14 +02:00
J. Nick Koston
9985516f80 Build protobuf upb wheels (#90812) 2023-04-17 10:30:22 +02:00
Jeef
752d5958dc Add monessen virtual integration for Intellifire (#89315) 2023-04-17 10:03:37 +02:00
J. Nick Koston
b875706bdd Default homekit to listening on all interfaces to match Home Assistant behavior (#91520) 2023-04-17 09:41:57 +02:00
rappenze
01046b88e5 Update pyfibaro to 0.7.0 (#91510) 2023-04-17 09:39:13 +02:00
jjlawren
c88d4b09c9 Handle invalidated Plex token (#91438) 2023-04-17 09:38:16 +02:00
epenet
d26160a509 Prevent combined translations in strings.json (#91334) 2023-04-17 09:36:25 +02:00
Jesse Hills
42b0602190 ESPHome: Use existing property with generated signal string (#91525) 2023-04-16 18:37:12 -10:00
Christopher Bailey
5dcc4d49c8 Bump unifiprotect to 4.8.1 (#91522) 2023-04-16 17:50:06 -10:00
Christopher Bailey
fdc80e14e6 Remove deprecated set_doorbell_message UniFi Protect service (#91523)
* Removes deprecated service

* Linting

* Linting

* More cleanup

* Linting
2023-04-16 17:30:41 -10:00
Jan Čermák
9680161701 Add RAPT Bluetooth integration (#87872)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 17:19:03 -10:00
Paulus Schoutsen
2b6fd0df6a VoIP: Add is active call binary sensor (#91486)
* Refactor VoIP integration for more entities

* Add active call binary sensor

* Add actually missing binary sensor files

* Improve test coverage
2023-04-16 22:59:05 -04:00
Brett Adams
58ea657fbc Add a data model to Advantage Air (#91519)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 15:04:30 -10:00
Brett Adams
8fe900885a Bump Advantage Air to 0.4.4 (#91147) 2023-04-16 14:56:57 -10:00
Lode Smets
263901841f Add Synology Photos support (#86894)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
Co-authored-by: mib1185 <mail@mib85.de>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 12:29:15 -10:00
Brett Adams
5001a50876 Add MyPlace support to Advantage Air (#91108)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 12:27:37 -10:00
J. Nick Koston
4420201fe6 Use bluetooth data tools for address conversion in esphome (#91443) 2023-04-16 11:55:08 -10:00
J. Nick Koston
ac76a2b1df Bump bluetooth-data-tools to 0.4.0 (#91442) 2023-04-16 11:06:03 -10:00
MarkGodwin
691cd4f2ed Bump TP-Link Omada API to enforce minimum controller version (#91498)
Bump omada API
2023-04-16 16:45:02 -04:00
J. Nick Koston
4d266e99dc Bump aioruuvigateway to 0.1.0 (#91512) 2023-04-16 10:26:08 -10:00
J. Nick Koston
7f7909e0d1 Add dhcp ip update support to onvif (#91474)
* Add dhcp ip update support to onvif

If we know the mac address of the camera we can
update the config entry when the ip changes

* fix lookup

* coverage

* remove unreachable

* remove unreachable

* remove unreachable
2023-04-16 15:55:33 -04:00
Ben Morton
d16e1b4ed0 Resolve issue with switchbot blind tilt devices getting stuck in opening/closing state (#91495) 2023-04-16 09:32:51 -10:00
J. Nick Koston
fdc6cf3472 Continue recording events until final write (#91260) 2023-04-16 09:22:47 -10:00
Jack Boswell
00191ace6c Expose ping drop rate Starlink sensor (#91444) 2023-04-16 08:25:36 -10:00
Franck Nijhof
1dc0870163 Update pytest to 7.3.1 (#91497) 2023-04-16 12:21:10 -04:00
J. Nick Koston
9625444989 Automatically retry lost/timed out LIFX requests (#91157) 2023-04-16 14:27:17 +02:00
epenet
3ff03eef46 Fix lingering timer in buienradar (#91378) 2023-04-16 14:20:54 +02:00
Allen Porter
b0e0ada512 Streamline todoist test fixtures (#91405) 2023-04-16 14:20:07 +02:00
J. Nick Koston
cb6ffa5b03 Handle a few more transient onvif errors (#91473) 2023-04-16 14:06:30 +02:00
J. Nick Koston
e7373d979b Fix onvif failing to reload (#91482) 2023-04-16 14:05:10 +02:00
Mark Adkins
0cf29f0f84 Fix SharkIQ token expiration (#89357) 2023-04-16 14:04:18 +02:00
Maciej Bieniek
9d68cdca18 Remove ozone state attribute and ozone sensors from Accuweather (#91492) 2023-04-16 14:01:22 +02:00
J. Nick Koston
24538a44fc Bump onvif-zeep-async to 1.2.11 (#91472) 2023-04-16 13:56:10 +02:00
Maciej Bieniek
09c41ca2d8 Bump nextdns to version 1.4.0 (#91490) 2023-04-16 13:51:07 +02:00
epenet
bdb55a4262 Fix lingering timer in samsungtv (#91450) 2023-04-16 08:24:04 +02:00
dougiteixeira
dc03a5c81e Fix error for when column does not exist in query to SQL (#91166)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-15 12:54:56 -10:00
Michael
323d16cc21 Add ssl_cipher_list option to rest (#91078) 2023-04-15 11:22:41 -10:00
Michael Davie
59dc0ea2e0 Bump env_canada to v0.5.33 (#91468) 2023-04-15 09:44:07 -10:00
Meow
963648a333 Add SetSynchronizationPoint fallback to onvif (#86400)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-15 09:41:34 -10:00
J. Nick Koston
72dfd95831 Fix creating onvif pull point subscriptions when InitialTerminationTime is required (#91470)
* Fix creating onvif pull point subscriptions when InitialTerminationTime is required

fixes #85902

* Bump again because I got it wrong the first time.. this is why retest is good
2023-04-15 15:34:07 -04:00
Michael
67c4de90f3 Add option to select list of accepted ssl ciphers in httpx client (#91389) 2023-04-15 09:32:30 -10:00
Jan Bouwhuis
f37b1fc9f8 Improve tests subscribe connection for mqtt status (#91463)
Improve test_subscribe_connection_status
2023-04-15 15:29:31 -04:00
epenet
a018ba0696 Improve async_track_point_in_time (#91451)
* Adjust async_track_point_in_time

* Adjust name
2023-04-15 20:28:08 +02:00
Erik Montnemery
8f8a398631 Support marking an assist pipeline as preferred (#91418)
* Support marking an assist pipeline as preferred

* Adjust

* Revert unneeded change

* Send preferred pipeline id in pipeline list

* Don't use property functions for the preferred pipeline
2023-04-15 10:05:46 -04:00
Joost Lekkerkerker
714ec3f023 Update screenshot of featured integrations (#91345) 2023-04-15 15:56:46 +02:00
epenet
d173590477 Remove combined translations in integrations (#91337)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-04-15 15:51:04 +02:00
Aidan Timson
3bc023986c Fix listener running in foreground for System Bridge integration (#91391)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-15 15:49:05 +02:00
puddly
a9db39a833 Fix attribute reporting config failures in ZHA (#91403) 2023-04-15 15:48:34 +02:00
starkillerOG
adc8a13f93 Reolink prevent ONVIF push being lost due to ConnectionResetError (#91070)
* Make "Connection lost" error less likely

* Handle connection loss during ONVIF event reading

* tweak

* fix styling

* catch asyncio.CancelledError from request.text()

* missing ()

* re-raise cancelation for proper cleanup

* Simplify

* Also set webhook_reachable if connection lost

* fix styntax

* Send HTTP_OK directly after data read done

* protect agains garbage collection

* Protect shielded task (inner) not shielded future (outer)

* fix black

* Make sure exceptions are logged

* fix spelling

* fix black

* fix spelling

* Simplify using hass.async_create_task

* clarify comment

* Eleborate comment

* Update homeassistant/components/reolink/host.py

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

* Apply suggestions from bdraco

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-14 21:05:22 -04:00
J. Nick Koston
1379ad60c8 Ensure recorder always attempts clean shutdown if recorder thread raises (#91261)
* Ensure recorder run shutdown if the run loop raises

If anything goes wrong with the recorder we should
still try to shutdown cleanly

* tweak

* tests

* tests

* handle migraiton failure

* tweak comment

* naming

* order

* order

* order

* reword

* adjust test

* fixes

* threading

* failure case

* fix test

* have to wait for stop because the task blocks on thread join
2023-04-14 21:03:24 -04:00
J. Nick Koston
56cc6633f5 Use fast path for track_time_change that fires every second (#91432)
We were missing a check for `*` and were only checking
`None`. Automations use `*`, python code uses `None`.
2023-04-14 21:02:54 -04:00
J. Nick Koston
5ffd833fdf Improve performance of tracking time changes (#91433)
* Improve performance of async_track_time_interval

Uses HassJob internally to avoid looking up the function
target type every time it fires

* name
2023-04-14 21:02:13 -04:00
epenet
19a6530c3c Add ability to shutdown a Debouncer (#91439)
* Add ability to shutdown a Debouncer

* Use async_create_task
2023-04-14 21:01:21 -04:00
J. Nick Koston
698345e88b Bump yalexs to 1.3.0 (#91431)
changelog: https://github.com/bdraco/yalexs/compare/v1.2.7...v1.3.0

fixes for missing user ids
2023-04-14 20:02:09 -04:00
Harvey
bf4559719a History API entity_id validation (#90067)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-14 09:41:54 -10:00
rlippmann
f5911bcad6 Add slots to dataclasses in default_config (#91410)
* add dataclass slots to default config items

* remove slots from sun mixing
2023-04-14 14:22:39 -04:00
PatrickGlesner
f65e06dc26 Delete obsolete lines and add some missing type hints in OpenTherm Gateway integration (#90530) 2023-04-14 15:28:26 +02:00
epenet
f52fd13d6d Remove duplicate webhook test (#91420)
Fix webhook test
2023-04-14 14:52:28 +02:00
Maciej Bieniek
808830b90e Bump accuweather to version 0.5.1 (#91412)
Bump accuweather
2023-04-14 08:31:33 -04:00
Eric Severance
94f35ea968 Add webhook trigger allowed_methods/local_only options (#66494)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-14 12:49:12 +02:00
Erik Montnemery
b23cedeae9 Save Thread dataset store when changing preferred dataset (#91411) 2023-04-14 11:48:03 +02:00
Jarek Świerczyński
47f5160154 Allow GET in webhook triggers (#56446) 2023-04-14 09:46:00 +02:00
Franck Nijhof
ce16d8eeac Rename Particulate matter sensors to PM (#91384) 2023-04-14 09:43:15 +02:00
Jan Bouwhuis
fc8c5f1bbd Do not allow mqtt lights to set brightness to zero (#91296)
* Do not allow mqtt lights to set brightness to zero

* Loglevel to debug

* Typo
2023-04-14 09:01:29 +02:00
J. Nick Koston
025e1792db Bump onvif-zeep-async to 1.2.5 (#91399) 2023-04-14 08:37:12 +02:00
jjlawren
27f3b53872 Support Sonos announcements using websockets (#91145) 2023-04-13 20:08:53 -10:00
epenet
a061f56833 Fix lingering timer in EntityRegistryDisabledHandler (#91376)
Mark EntityRegistryDisabledHandler as cancellable
2023-04-14 06:37:49 +02:00
epenet
e39f0320df Fix lingering timers in analytics (#91363) 2023-04-14 06:37:22 +02:00
Aaron Godfrey
7061b104a9 Fix tasks with no due date from not triggering on calendar state. (#91196)
Fix tasks with no due date.

Prior to this change we were setting the start date/time to utc rather
than the user's timezone.
2023-04-13 21:12:58 -07:00
Jesse Hills
0ddccb26fa ESPHome voice assistant (#90691)
* Add ESPHome push-to-talk

* Send pipeline events to device

* Bump aioesphomeapi to 13.7.0

* Log error instead of print

* Rename variable

* lint

* Rename

* Fix type and cast

* Move event data manipulation into voice_assistant callback
Process full url

* Add a test?

* Remove import

* More tests

* Update import

* Update manifest

* fix tests

* Ugh

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-13 19:18:56 -04:00
epenet
1c0b2630da Fix lingering timers in flux_led (#91379) 2023-04-13 11:54:29 -10:00
J. Nick Koston
e1a5ad069c Improve performance of sums in the energy dashboard (#91342) 2023-04-13 11:52:38 -10:00
Erik Montnemery
4e80154ebe Rename voice_assistant to assist_pipeline (#91371)
* Rename voice_assistant to assist_pipeline

* Fix tests

* Fix voip test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-04-13 17:25:38 -04:00
Franck Nijhof
32344a8488 Fix incorrect warn of async_update_ha_state use (#91387) 2023-04-13 22:39:03 +02:00
dependabot[bot]
b7b22b79d1 Bump actions/checkout from 3.5.0 to 3.5.2 (#91373)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 22:11:47 +02:00
epenet
9744e72d5a Add ability to auto-cancel track_time_interval (#91381) 2023-04-13 21:31:16 +02:00
Joost Lekkerkerker
77a445ee16 Add entity name translations to Picnic (#91362)
* Add translatable entities for Picnic

* Apply fixes
2023-04-13 20:27:33 +02:00
Martin Hjelmare
473cbf7f9b Add stt entity (#91230)
* Add stt entity

* Update demo platform

* Rename ProviderEntity to SpeechToTextEntity

* Fix get method

* Run all init tests for config entry setup

* Fix and test metadata from header

* Test config entry unload

* Rename get provider entity

* Test post for non existing provider

* Test entity name before addition

* Test restore state

* Use register shutdown

* Update deprecation comment
2023-04-13 13:58:35 -04:00
Franck Nijhof
22a1a6846d Warn for unneeded use of async_update_ha_state (#91372) 2023-04-13 13:49:56 -04:00
rich-kettlewell
f2997ce4cc Tado set_water_heater_timer should use water_heater domain (#91364) 2023-04-13 19:49:07 +02:00
epenet
592ac37436 Add missing mock in sharkiq tests (#91325) 2023-04-13 19:33:38 +02:00
Franck Nijhof
445b823232 Avoid task creation when calling schedule_update_ha_state without force update (#91352) 2023-04-13 18:39:03 +02:00
epenet
9e1a670e6e Fail CI on lingering timers (part 2) (#89976)
* Fail CI on lingering timers (part 2)

* Improve error message

* Adjust tts
2023-04-13 17:03:52 +02:00
Joost Lekkerkerker
a272f8dfb2 Move picnic sensor definitions (#91367)
* Move types and mixin to sensor

* Move types and mixin to sensor
2023-04-13 16:46:10 +02:00
Franck Nijhof
3f0f5dc303 2023.4.4 (#91356) 2023-04-13 15:32:45 +02:00
epenet
c40836b49f Fix lingering timers in tts (#90834)
* Fix lingering timers in tts

* Improve

* Use HassJob with cancel_on_shutdown
2023-04-13 15:27:13 +02:00
epenet
c1b7aa084c Fix race condition in deconz (#91328)
* Fix race condition in deconz

* Use a new separate test
2023-04-13 15:04:21 +02:00
Franck Nijhof
b5ac3ee288 Bumped version to 2023.4.4 2023-04-13 13:50:25 +02:00
Bram Kragten
51c99d26b4 Update frontend to 20230411.1 (#91344) 2023-04-13 13:50:10 +02:00
J. Nick Koston
f77ce413be Bump aiolifx to 0.8.10 (#91324) 2023-04-13 13:50:06 +02:00
Duco Sebel
7a8159052e Bump python-homewizard-energy to 2.0.1 (#91097) 2023-04-13 13:50:02 +02:00
Duco Sebel
8ca3440f33 Bump python-homewizard-energy to 2.0.1 (#91097) 2023-04-13 13:42:35 +02:00
J. Nick Koston
274a6fd3d7 Bump aiolifx to 0.8.10 (#91324) 2023-04-13 13:38:27 +02:00
Bram Kragten
8527048f07 Update frontend to 20230411.1 (#91344) 2023-04-13 13:37:37 +02:00
Franck Nijhof
d320c73fb7 Use async_write_ha_state in tests (#91333) 2023-04-13 12:36:36 +02:00
Franck Nijhof
208a44e437 Use async_write_ha_state in generic hygrostat (#91331) 2023-04-13 09:42:12 +02:00
epenet
4a0988eb5d Adjust shutdown registration in EntityComponent (#90938)
* Adjust shutdown registration in EntityComponent

* Adjust

* Make it more explicit

* docstring
2023-04-13 08:47:04 +02:00
J. Nick Koston
6dbe67e909 Bump httpx to 0.24.0 and httpcore to 0.17.0 (#91308) 2023-04-12 20:11:59 -10:00
Paulus Schoutsen
c9d81bd217 Pipelines to default to Home Assistant agent (#91321)
* Pipelines to default to Home Assistant agent

* Tests fix
2023-04-13 00:34:19 -04:00
Paulus Schoutsen
0678ab4e45 Add VoIP entities (#91320)
* WIP

* Add VoIP entities to enable calls

* Mark voip entities as config only

* Remove commented code
2023-04-12 23:23:20 -04:00
Paulus Schoutsen
8ec6afb85a 2023.4.3 (#91316) 2023-04-12 21:50:11 -04:00
Michael Hansen
f0c625b2ad Add language util (#91290)
* Add language util

* Add no match tests

* Update tests/util/test_language.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-12 20:27:09 -05:00
Franck Nijhof
bbf2d0e6ad Remove codecov from Python test requirements (#91295) 2023-04-12 20:51:59 -04:00
tronikos
c073cee049 Google Assistant SDK: Fix broadcast command for Portuguese (#91293)
Fix broadcast command for pt
2023-04-12 20:51:58 -04:00
epenet
687c035bb2 Make auth test fixtures async (#91263)
Make auth fixtures async in tests
2023-04-12 20:43:50 -04:00
Franck Nijhof
e4d2409ca4 Update debugpy to 1.6.7 (#91267) 2023-04-12 20:43:26 -04:00
tronikos
27dd4cd261 Google Assistant SDK: Fix broadcast command for Portuguese (#91293)
Fix broadcast command for pt
2023-04-12 20:42:51 -04:00
Franck Nijhof
355404a959 Raise HomeAssistant error on failed Spotify service calls (#91299) 2023-04-12 20:42:33 -04:00
Franck Nijhof
99afab723b Fix combined translation in Pi-hole strings (#91305) 2023-04-12 20:41:27 -04:00
Franck Nijhof
02e79cf7e6 Update coverage to 7.2.3 (#91309) 2023-04-12 20:40:31 -04:00
Franck Nijhof
b2416a4020 Update sentry-sdk to 1.19.1 (#91310) 2023-04-12 20:40:19 -04:00
Paulus Schoutsen
e9f1148c0a Bumped version to 2023.4.3 2023-04-12 20:35:59 -04:00
J. Nick Koston
a420007e80 Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313)
* Use local timezone for recorder connection

The fix in #90335 had an unexpected side effect of
using UTC for the timezone since all recorder operations
use UTC. Since only sqlite much use the database executor
we can use a seperate connection pool which uses local time

This also ensures that the engines are disposed of
when Home Assistant is shutdown as previously we
did not cleanly disconnect

* coverage

* fix unclean shutdown in config flow

* tweaks
2023-04-12 20:35:50 -04:00
puddly
64a9bfcc22 Bump ZHA dependencies (#91291) 2023-04-12 20:35:49 -04:00
codyhackw
fd53eda5c6 Update Inovelli Blue Series switch support in ZHA (#91254)
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
2023-04-12 20:35:49 -04:00
Erik Montnemery
d6574b4a2e Fix switch_as_x name (#91232) 2023-04-12 20:35:48 -04:00
Bram Kragten
8eb75beb96 Update frontend to 20230411.0 (#91219) 2023-04-12 20:35:47 -04:00
Erik Montnemery
68920a12aa Flush conversation name cache when an entity is renamed (#91214) 2023-04-12 20:35:46 -04:00
Aaron Bach
a806e070a2 Bump pytile to 2023.04.0 (#91191) 2023-04-12 20:35:45 -04:00
David F. Mulcahey
a87c78ca20 Cleanup ZHA from Zigpy deprecated property removal (#91180) 2023-04-12 20:35:44 -04:00
Aidan Timson
48df638f5d Reduce startup time for System Bridge integration (#91171) 2023-04-12 20:35:43 -04:00
Allen Porter
c601266f9c Fix all day event coercion logic (#91169) 2023-04-12 20:35:42 -04:00
starkillerOG
30d615f206 Reolink config flow fix custom port when USE_HTTPS not selected (#91137)
give USE_HTTPS a default
2023-04-12 20:35:41 -04:00
J. Nick Koston
2db8d70c2f Fix false positive in SQL sensor full table scan check (#91134) 2023-04-12 20:35:40 -04:00
J. Nick Koston
3efffe7688 Bump ulid-transform to 0.6.3 (#91133)
* Bump ulid-transform to 0.6.2

changelog: https://github.com/bdraco/ulid-transform/compare/v0.6.0...v0.6.2

32bit fixes

fixes #91092

* 0.6.3
2023-04-12 20:35:39 -04:00
Allen Porter
dc777f78b8 Relax calendar event validation to allow existing zero duration events (#91129)
Relax event valudation to allow existing zero duration events
2023-04-12 20:35:38 -04:00
Michael Davie
4cd00da319 Bump env_canada to 0.5.32 (#91126) 2023-04-12 20:35:37 -04:00
Robert Hillis
3f6486db3e Bump aiopyarr to 23.4.0 (#91110) 2023-04-12 20:35:36 -04:00
Diogo Gomes
2d41fe837c Track availability of source sensor in utility meter (#91035)
* track availability of source sensor

* address review comments
2023-04-12 20:35:35 -04:00
Pascal Reeb
34394d90c0 Fall back to polling if webhook cannot be registered on Nuki (#91013)
fix(nuki): throw warning if webhook cannot be created
2023-04-12 20:35:34 -04:00
Anthony Mattas
fa29aea68e Fix configuring Flo instances (#90990)
* Update config_flow.py

Used constant string for consistency

* Update config_flow.py

Removed code for location ID and name the integration using the username

* Update manifest.json

Updated codeowners

* Update config_flow.py

* Update config_flow.py

Formatted with black

* Update manifest.json

Updated codeowners

* Update test_config_flow.py

Updated test
2023-04-12 20:35:33 -04:00
J. Nick Koston
4366f83ac8 Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313)
* Use local timezone for recorder connection

The fix in #90335 had an unexpected side effect of
using UTC for the timezone since all recorder operations
use UTC. Since only sqlite much use the database executor
we can use a seperate connection pool which uses local time

This also ensures that the engines are disposed of
when Home Assistant is shutdown as previously we
did not cleanly disconnect

* coverage

* fix unclean shutdown in config flow

* tweaks
2023-04-12 20:24:55 -04:00
Olliver Schinagl
2d1ae6660b Dockerdev: Improve docker caching layers (#85186) 2023-04-13 00:46:54 +02:00
Joakim Sørensen
2c8b704a6d Add certificate status for cloud remote (#91277) 2023-04-13 00:38:32 +02:00
Aidan Timson
d6c954a909 Reduce startup time for System Bridge integration (#91171) 2023-04-13 00:36:51 +02:00
David Poll
ea12d7a86f Add pretty printing, key sorting, and better performance to to_json in Jinja (#91253)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-13 00:32:13 +02:00
J. Nick Koston
9b2e9b8746 Update typing on recorder pool for sqlalchemy 2.0 (#91244) 2023-04-13 00:09:15 +02:00
epenet
d483ad820c Make hass test fixture async (#91264) 2023-04-12 23:55:40 +02:00
Brig Lamoreaux
ff1fd86b91 Clean up srp_energy (#86822)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-12 23:47:37 +02:00
Assaf Inbal
7446ff478f Add h264_v4l2m2m codec and profiles to HomeKit cameras (#91246) 2023-04-12 10:46:21 -10:00
codyhackw
4f507e7f57 Update Inovelli Blue Series switch support in ZHA (#91254)
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
2023-04-12 22:09:16 +02:00
puddly
fd7d0fff1f Bump ZHA dependencies (#91291) 2023-04-12 22:09:03 +02:00
Franck Nijhof
5b389a4dbc Remove codecov from Python test requirements (#91295) 2023-04-12 21:32:32 +02:00
Jan Bouwhuis
722b991234 Support unknown state, position or tilt for template cover (#91172)
* Support unknown state for template cover

* Remove not related changes
2023-04-12 21:23:24 +02:00
dougiteixeira
1ef6391e9c Preserves config flow information in case of error for SQL (#91142) 2023-04-12 09:03:14 -10:00
mkmer
6aa1460143 Add tests to honeywell (#87209)
* lower case aiosomecomfort

* add tests

* Test updates for 0.0.6

* lower case aiosomecomfort

* Missing changes after merge

* Add missing type hints

* Fix tests for PR#89393

* Test hold on when setting temperature

* Remove unnecessary init function

* Remove unnecessary assert

* Address missing tests
Cleanup related to comments for EM

* Move to snapshot for static test

* Updated snapshot

* Remove unnecessary assert
2023-04-12 20:34:32 +02:00
Jan Bouwhuis
e36fd5f222 Allow None device_class and UOM for mqtt entities (#91240)
* Allow None device_class and UOM for mqtt entities

* Rever not needed changes

* Revert another unwanted change
2023-04-12 19:14:16 +02:00
Paulus Schoutsen
325733158d Allow multiple instances for OpenAI (#90609)
* Allow multiple instances for OpenAI

* Add test
2023-04-12 08:29:13 -04:00
Chuck Deal
a4a8f6ebc8 Add platform state tests for vesync integration (#90466)
* Test coverage for init and common

* Update snapshot

* break setup state snapshot test across platforms

* Fix state snapshot test methods

* Remove the test_init snapshot

* Remove test_common and test_init changes

* refactor the request_mock fixture
2023-04-12 14:15:22 +02:00
Mike Knoop
e8fb7b8cf1 Fix Lutron keypad led state always off at startup (#91149) 2023-04-12 12:59:52 +02:00
Joakim Sørensen
8ce17458a9 Bump hass-nabucasa from 0.63.1 to 0.64.1 (#91271) 2023-04-12 12:38:57 +02:00
dependabot[bot]
5b89996476 Bump codecov/codecov-action from 3.1.1 to 3.1.2 (#91258)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-12 11:10:38 +02:00
G Johansson
00847ee4bc Add config flow to Brottsplatskartan (#70233)
* Brottsplatskartan Config Flow

* Fix import

* Modify sensor

* Mod version

* Mod version 2

* has_entity_name

* Fix api constructor

* Switch to issue for depr.

* Fix docstrings

* Minor cleaning

* Fix argument for bpk constructor

* remove translations

* Fix tests

* reset config

* uuid to conftest

* hassfest

* depr version

* unique id

* reset not linked changes

* review comments

* fix area none

* relevant changes

* depr version

* slim test

* unique_id

* create_entry

* review comments and tests

* fix init test

* review comments
2023-04-12 11:05:24 +02:00
Dmitry Vlasov
a409da947f Update zwave-me-ws version to 0.4.2 (#91068) 2023-04-12 10:18:01 +02:00
Matthias Alphart
0ba339e56c Run socket.gethostbyname in executor in Obihai and Sonos (#91190)
* Run  in executor in Obihai and Sonos

* fix Sonos test

* fix sonos test differently (review)
2023-04-12 09:58:27 +02:00
Jan Bouwhuis
bb15923968 Rename MQTT entry mock and cleanup (#91223)
Rename to mqtt_mock_entry and cleanup
2023-04-12 09:43:03 +02:00
G Johansson
b7cc42d135 Use RestoreSensor in derivative (#91071)
RestoreSensor
2023-04-12 08:46:55 +02:00
epenet
e277bbb513 Use tmp_path in tests (#91203)
* Use tmp_path in tests

* Use joinpath

* Prefer / operator

* Cleanup
2023-04-12 08:19:01 +02:00
epenet
4e78bcb236 Suppress CancelledError in zwave-js unload (#91222) 2023-04-12 08:09:00 +02:00
J. Nick Koston
237faf62ac Add a name to the background service call tasks (#91252) 2023-04-11 19:23:25 -10:00
Michael
0916701a0b Catch ssl errors in rest (#91074)
* catch ssl.SSLError

* add test

* fail setup on ssl error

* adjust tests
2023-04-12 06:51:41 +02:00
Erik Montnemery
2c9e9d0fde Allow UI configuration of entities exposed to voice_assistant (#91233)
* Allow UI configuration of entities exposed to voice_assistant

* Invalidate cache when settings change

* Add tests

* Expose entities to conversation by default

* Update tests
2023-04-11 22:39:40 -04:00
J. Nick Koston
e40a373c4b Call sqlite pragma optimize during periodic cleanup task (#91245)
https://www.sqlite.org/pragma.html#pragma_optimize

> To achieve the best long-term query performance without the need to do a detailed engineering analysis of the application schema and SQL, it is recommended that applications run "PRAGMA optimize" (with no arguments) just before closing each database connection. Long-running applications might also benefit from setting a timer to run "PRAGMA optimize" every few hours.

> This pragma is usually a no-op or nearly so and is very fast.

Since we keep the recorder connection open for the entire time HA
is running we fall into the long-running application bucket
2023-04-11 22:39:19 -04:00
J. Nick Koston
4e6937d20f Avoid multiple round trips to the database for history API calls (#91193)
* delete more code

* tweak

* tweak

* wrappers

* restore lost performance

* restore lost performance

* restore lost performance

* compact

* reduce

* fix refactor

* DRY

* tweak

* delete the start time state injector

* move away the legacy code

* tweak

* adjust

* adjust

* tweak

* ignore impossible

* fix a bug where the first start was changed to the start time when there was no previous history recorded before

* avoid the empty scan most cases

* postgresql

* fixes

* workaround for mariadb < 10.4

* remove unused

* remove unused

* adjust

* bail early

* tweak

* tweak

* fix more tests

* fix recorderrun being init in the future in the test

* run history tests on schema 30 as well

* Revert "run history tests on schema 30 as well"

This reverts commit d798b100ac.

* reduce

* cleanup

* tweak

* reduce

* prune

* adjust

* adjust

* adjust

* reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code

* Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code"

This reverts commit bf974e103e.

* fix test

* Revert "Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code""

This reverts commit 119354499e.

* more coverage

* adjust

* fix for table order

* impossible for it to be missing

* remove some more legacy from the all states
2023-04-11 22:38:23 -04:00
epenet
7f62ed15fa Ensure entry is unloaded in azure event hub tests (#91224) 2023-04-11 16:31:05 -10:00
epenet
524832ceaf Fix config entry unload in withings tests (#91210) 2023-04-11 16:29:49 -10:00
Michael Hansen
78fec33b17 Voip integration (#90945)
* Media playback working

* Working on OPUS audio

* Before rollback

* Fix is_end

* First working pipeline

* Clean up

* Remove asserts

* Send HA version in SDP

* Use async_pipeline_from_audio_stream

* Use config flow with allowed IP

* Satisfy ruff

* Remove use of regex for SIP IP

* Use voip-utils

* Fix imports

* Add Pipeline to __all__

* Fix voice assistant tests

* Basic VoIP test

* Run hassfest

* Generate requirements

* Bump voip utils (missing requirement)

* Allow tts_options to be passed in to pipeline run

* Add config flow tests

* Update test snapshots

* More tests

* Remove get_extra_info

* Appeasing the codebot
2023-04-11 20:25:05 -04:00
rlippmann
3a72054f93 Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
Erik Montnemery
eb63bc7967 Fix switch_as_x name (#91232) 2023-04-11 13:54:30 -04:00
Jan Bouwhuis
aa68d1d617 Cleanup mqtt CONFIG_SCHEMA_ENTRY (#90791) 2023-04-11 17:41:38 +02:00
Franck Nijhof
ca101cc7d1 Update Pillow to 9.5.0 (#91218) 2023-04-11 17:01:56 +02:00
Franck Nijhof
e418c66d69 Update spotipy to 2.23.0 (#91217) 2023-04-11 17:01:39 +02:00
Regev Brody
d14e96942d Bump aioswitcher to 3.3.0 (#91215)
fix: #85096 Switcher "No devices found on the network"
2023-04-11 09:16:26 -04:00
Bram Kragten
e65da42a39 Update frontend to 20230411.0 (#91219) 2023-04-11 08:35:08 -04:00
Erik Montnemery
3c8397a7b9 Flush conversation name cache when an entity is renamed (#91214) 2023-04-11 08:33:08 -04:00
Robert Svensson
0d7711f787 Fix UniFi client tracker host_name missing (#91188) 2023-04-11 11:56:55 +02:00
Pascal Reeb
62bc8df964 Fall back to polling if webhook cannot be registered on Nuki (#91013)
fix(nuki): throw warning if webhook cannot be created
2023-04-11 11:13:52 +02:00
Avi Miller
95109072b5 Remove myself as a codeowner of the LIFX integration (#91143) 2023-04-11 10:09:53 +02:00
epenet
7b3a932cd9 Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
epenet
2f7c5a56eb Use tmp_path in recorder tests (#91202) 2023-04-11 09:18:16 +02:00
epenet
a7093d3687 Fix flaky filesize tests (#91200)
* Fix flaky filesize tests

* Adjust constant usage

* Once more

* Use joinpath
2023-04-11 08:57:34 +02:00
Aaron Bach
504cedaa87 Bump pytile to 2023.04.0 (#91191) 2023-04-10 18:06:26 -06:00
Paulus Schoutsen
1aa8e94224 Voice Assistant: Require sample rate as input (#91182)
Require sample rate as input
2023-04-10 18:28:03 -05:00
David F. Mulcahey
0fee49a32e Cleanup ZHA from Zigpy deprecated property removal (#91180) 2023-04-10 14:16:11 -04:00
starkillerOG
e8142987a7 Reolink config flow fix custom port when USE_HTTPS not selected (#91137)
give USE_HTTPS a default
2023-04-10 12:44:25 -04:00
Diogo Gomes
86fe0c9683 Track availability of source sensor in utility meter (#91035)
* track availability of source sensor

* address review comments
2023-04-10 12:37:45 -04:00
Anthony Mattas
ee1644c24e Fix configuring Flo instances (#90990)
* Update config_flow.py

Used constant string for consistency

* Update config_flow.py

Removed code for location ID and name the integration using the username

* Update manifest.json

Updated codeowners

* Update config_flow.py

* Update config_flow.py

Formatted with black

* Update manifest.json

Updated codeowners

* Update test_config_flow.py

Updated test
2023-04-10 12:37:36 -04:00
J. Nick Koston
f2d10473eb Bump orjson to 3.8.10 (#91132)
changelog: https://github.com/ijl/orjson/compare/3.8.9...3.8.10
2023-04-10 12:23:19 -04:00
Allen Porter
cf9ada3b0e Fix all day event coercion logic (#91169) 2023-04-10 12:05:08 -04:00
J. Nick Koston
49079691d4 Reduce overhead of legacy database columns on new installs (#90246)
* Reduce overhead of legacy database columns on new installs

* Reduce overhead of legacy database columns on new installs

* Reduce overhead of legacy database columns on new installs

* Reduce overhead of legacy database columns on new installs

* not working as expected

* override the type compiler

* override the type compiler

* override the type compiler

* override the type compiler

* Apply suggestions from code review

* pgsql char1

* make entity filter test setup with old schema

* fix some more tests that were mutating state

* fix some more tests that were mutating state

* fix some more tests that were mutating state

* fix more dbstate mutations

* add shim for older tests

* split migration tests

* add coverage for purging legacy data

* tweak

* more fixes

* drop some legacy

* fix another test

* fix a few more

* add casts for postgresql in case someone deletes the schema changes table

* dry

* dry

* dry
2023-04-10 10:08:46 -04:00
Allen Porter
14b95ffe3a Relax calendar event validation to allow existing zero duration events (#91129)
Relax event valudation to allow existing zero duration events
2023-04-10 10:04:42 -04:00
J. Nick Koston
6b9d748529 Bump ulid-transform to 0.6.3 (#91133)
* Bump ulid-transform to 0.6.2

changelog: https://github.com/bdraco/ulid-transform/compare/v0.6.0...v0.6.2

32bit fixes

fixes #91092

* 0.6.3
2023-04-10 10:03:21 -04:00
J. Nick Koston
a62ede78ca Reduce space to store state_attributes and event_data for new MariaDB/MySQL databases (#91150)
Since MySQL and MariaDB support unsigned ints we can store the
hashes in 4 bytes instead of 8 bytes
2023-04-10 10:02:42 -04:00
J. Nick Koston
bd0378a961 Bump sqlalchemy to 2.0.9 (#91151)
changes: https://docs.sqlalchemy.org/en/20/changelog/changelog_20.html#change-2.0.9
2023-04-10 10:01:49 -04:00
J. Nick Koston
6e9fcbfec1 Fix false positive in SQL sensor full table scan check (#91134) 2023-04-09 19:45:08 -10:00
Brett Adams
82c80ec8d2 Bump Advantage Air to 0.4.2 (#91144) 2023-04-09 19:04:19 -10:00
hahn-th
a48ede7332 Bump homematicip to 1.0.14 (#91140)
Bump homematicip to 1.0.14
2023-04-09 18:50:34 -04:00
Jörg Thalheim
7e46d7e808 Bump transmission-rpc to 4.1.5 (#91088)
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2023-04-09 16:51:31 -04:00
Robert Hillis
e30c307f9f Bump aiopyarr to 23.4.0 (#91110) 2023-04-09 16:48:37 -04:00
Michael Davie
78cb0cd1e1 Bump env_canada to 0.5.32 (#91126) 2023-04-09 13:35:43 -04:00
Paulus Schoutsen
7928b31087 2023.4.2 (#91111) 2023-04-08 23:41:48 -04:00
J. Nick Koston
e792350be6 Fix fnvhash import in schema 32 test backport (#91112) 2023-04-08 23:41:19 -04:00
J. Nick Koston
66b105fb21 Reduce creation of MQTT related discovery tasks (#90801)
* Reduce creation of MQTT related discovery tasks

Most of the branching can avoid creating a task as it
did not need to await for the majority of cases. We
fallback to creating a task for the cases were we do
need to await.

* comment

* revert
2023-04-08 23:14:22 -04:00
J. Nick Koston
d442f2aedb Add names to homekit tasks to better track startup problems (#90802)
* Add names to homekit tasks to better track startup problems

* fix test
2023-04-08 23:13:47 -04:00
J. Nick Koston
3be3226aaa Convert tasmota discovery callback function to a normal function (#90865)
* Convert tasmota discovery callback function to a normal function

Nothing was being awaited when the payload had not changed.
This allows us to avoid creating a task.

see #90801

* comment
2023-04-08 23:13:22 -04:00
J. Nick Koston
59872f1914 Reduce bond fallback polling interval when BPUP is alive (#90871)
* Reduce bond fallback polling interval when BPUP is alive

If push updates are alive we should not check every
10 seconds.

* tweak

* tweak

* coverage

* coverage

* coverage
2023-04-08 23:12:42 -04:00
J. Nick Koston
8fe597b7c6 Clarify HomeKit include behavior in the config flow (#91106)
* Clarify HomeKit include behavior in the config flow

If a domain is selected to be included and specific entities are
not selected in the domain, all entities will be included in that
domain.

* tweak
2023-04-08 23:12:02 -04:00
Paulus Schoutsen
5f0553dd22 Bumped version to 2023.4.2 2023-04-08 22:58:28 -04:00
J. Nick Koston
8f6b77235e Make the device_tracker more forgiving when passed an empty ip address string (#91101)
This has come up over and over and over again

fixes #87165 fixes #51980
2023-04-08 22:56:49 -04:00
J. Nick Koston
8ababc75d4 Bump flux_led to 0.28.37 (#91099)
changes: https://github.com/Danielhiversen/flux_led/releases/tag/0.28.37
2023-04-08 22:56:48 -04:00
J. Nick Koston
0a8f399655 Fix context_user_id round trip when calling to_native (#91098)
We do not actually use this in the history or logbook
APIs so nothing broke but there was a bug here for anyone
calling this directly

fixes #91090
2023-04-08 22:56:47 -04:00
Michael Davie
19567e7fee Bump env_canada to v0.5.31 (#91094) 2023-04-08 22:56:46 -04:00
Garrett
3a137cb24c Bump subarulink to 0.7.6 (#91064) 2023-04-08 22:56:45 -04:00
Allen Porter
935af6904d Bump gcal_sync to 4.1.4 (#91062) 2023-04-08 22:56:44 -04:00
Allen Porter
4fed5ad21c Make location optional in google calendar create service (#91061) 2023-04-08 22:56:44 -04:00
J. Nick Koston
9dc15687b5 Bump zeroconf to 0.56.0 (#91060) 2023-04-08 22:56:43 -04:00
J. Nick Koston
38a0eca223 Bump zeroconf to 0.55.0 (#90987) 2023-04-08 22:56:42 -04:00
David F. Mulcahey
6836e0b511 Fix Smartthings acceleration sensor in ZHA (#91056) 2023-04-08 22:55:52 -04:00
David F. Mulcahey
cab88b72b8 Bump ZHA quirks lib (#91054) 2023-04-08 22:55:51 -04:00
Steven Looman
07421927ec Make sure upnp-router is also initialized when first seen through an advertisement (#91037) 2023-04-08 22:55:50 -04:00
Diogo Gomes
828a2779a0 Delay utility_meter until HA has started (#91017)
* increase information for end user

* only warn after home assistant has started

* delay utility_meter until HA has startED
2023-04-08 22:55:49 -04:00
Joost Lekkerkerker
7392a5780c Bump roombapy to 1.6.8 (#91012)
* Update roombapy to 1.6.7

* Update roombapy to 1.6.8
2023-04-08 22:55:48 -04:00
Aaron Bach
804270a797 Bump aioambient to 2023.04.0 (#90991) 2023-04-08 22:55:47 -04:00
J. Nick Koston
7f5f286648 Bump vallox-websocket-api to 3.2.1 (#90980)
unblocks https://github.com/home-assistant/core/pull/90901
which will finally fix the races in websockets
2023-04-08 22:55:46 -04:00
J. Nick Koston
0a70a29e92 Resume entity id post migration after a restart (#90973)
* Restart entity id post migration after a restart

If the entity migration finished and Home Assistant was
restarted during the post migration it would never be resumed
which means the old index and space would never be recovered

* add migration resume test
2023-04-08 22:55:46 -04:00
J. Nick Koston
dc2f2e8d3f Raise an issue for legacy SQL queries that will cause full table scans (#90971)
* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Update homeassistant/components/sql/sensor.py

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

* coverage

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-08 22:55:45 -04:00
J. Nick Koston
6522a3ad1b Bump websockets constraint to 11.0.1+ (#90901) 2023-04-08 22:55:44 -04:00
PatrickGlesner
be65d4f33e Fix NMBS AttributeError (#90525)
* Fix NMBS AttributeError (Issue #90505)

* Set and use API_FAILURE

* Configure the logger to track API failures

* Remove broad exceptions and rewite logging
2023-04-08 22:55:43 -04:00
J. Nick Koston
a730ee2c43 Bump flux_led to 0.28.37 (#91099)
changes: https://github.com/Danielhiversen/flux_led/releases/tag/0.28.37
2023-04-08 22:48:01 -04:00
Allen Porter
23af02b941 Make location optional in google calendar create service (#91061) 2023-04-08 22:40:39 -04:00
J. Nick Koston
5f0d983df1 Make the device_tracker more forgiving when passed an empty ip address string (#91101)
This has come up over and over and over again

fixes #87165 fixes #51980
2023-04-08 22:32:56 -04:00
J. Nick Koston
69f751703b Fix context_user_id round trip when calling to_native (#91098)
We do not actually use this in the history or logbook
APIs so nothing broke but there was a bug here for anyone
calling this directly

fixes #91090
2023-04-08 22:31:28 -04:00
J. Nick Koston
3d1556a4a2 Switch back to using call_later for the slow entity update warning (#91067)
* Switch back to using call_later for the slow entity update warning

I had originally changed this to create a task and wait
in #41184 but that does not make sense anymore with newer
cpython as the profile now shows the original method is cheaper
(or I did it wrong the first time)

* fix missing block till done since there is no longer a task being created which would run the event loop once
2023-04-08 22:22:56 -04:00
J. Nick Koston
d0d4ab6056 Require a list of entity ids when fetching history (#90992) 2023-04-08 16:14:44 -10:00
Brett Adams
667a00e7f9 Handle all three operating modes in Advantage Air climate (#91107)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-08 13:50:26 -10:00
Michael Davie
5e2b0b23c9 Bump env_canada to v0.5.31 (#91094) 2023-04-08 09:25:58 -10:00
Diogo Gomes
fe393c84e2 Delay utility_meter until HA has started (#91017)
* increase information for end user

* only warn after home assistant has started

* delay utility_meter until HA has startED
2023-04-08 10:36:34 -04:00
tronikos
6c7f2167ff Android TV Remote: Bump androidtvremote2==0.0.7 (#91001)
* Bump androidtvremote2 to 0.0.5

* Log exception that caused disconnect

* fix test

* Revert "fix test"

This reverts commit 63fbedd208.

* Revert "Log exception that caused disconnect"

This reverts commit 110fa881ff.

* Bump androidtvremote2==0.0.7
2023-04-08 09:50:34 +02:00
Diogo Gomes
b1a23c5f73 Filtered values are no longer rounded if values are not changed/calculated (#76164)
* address 75732

* catchup

* catchup

* catchup

* catchup

* use default if precision is None

* Update homeassistant/components/filter/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix type hint

* in progress

* refactor

* Update homeassistant/components/filter/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* add *

* no need to check - review comment

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-07 23:26:07 -04:00
Allen Porter
96a3e10ff3 Bump gcal_sync to 4.1.4 (#91062) 2023-04-07 22:38:33 -04:00
J. Nick Koston
53d7e33607 Raise an issue for legacy SQL queries that will cause full table scans (#90971)
* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Update homeassistant/components/sql/sensor.py

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

* coverage

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-07 22:32:36 -04:00
J. Nick Koston
dbfd0d50ba Bump zeroconf to 0.56.0 (#91060) 2023-04-07 16:01:53 -10:00
Garrett
77287eb021 Bump subarulink to 0.7.6 (#91064) 2023-04-07 21:56:39 -04:00
David F. Mulcahey
90f857e926 Fix Smartthings acceleration sensor in ZHA (#91056) 2023-04-07 15:55:37 -10:00
Steven Looman
2f4325246b Make sure upnp-router is also initialized when first seen through an advertisement (#91037) 2023-04-07 13:11:31 -10:00
Joost Lekkerkerker
9b95a04c29 Bump roombapy to 1.6.8 (#91012)
* Update roombapy to 1.6.7

* Update roombapy to 1.6.8
2023-04-07 19:02:13 -04:00
David F. Mulcahey
62a6a4cd19 Bump ZHA quirks lib (#91054) 2023-04-07 19:00:03 -04:00
mrwogu
7eccef87c2 Disable lazy discover in xiaomi_miio (#82601)
* Add lazy discover config option to xiaomi_miio (#59215)

* disable lazy_discover for default

* extend tests to support lazy_discover

* revert config option
2023-04-07 16:27:59 +02:00
Joost Lekkerkerker
b8abc1350a Move plant const to separate file (#91008)
* Move plant const to separate file

* Fix feedback

* Fix feedback

* Update homeassistant/components/plant/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-07 13:45:40 +02:00
PatrickGlesner
06e36bcff5 Fix NMBS AttributeError (#90525)
* Fix NMBS AttributeError (Issue #90505)

* Set and use API_FAILURE

* Configure the logger to track API failures

* Remove broad exceptions and rewite logging
2023-04-07 12:13:39 +02:00
epenet
9705607db4 Fix lingering timer in cloud (#90822)
* Fix lingering timer in cloud

* Rename variable

* Improve

* Improve again

* Adjust

* Adjust

* Add property to HassJob instead

* Adjust

* Rename

* Adjust

* Adjust

* Make it read-only

* Add specific test
2023-04-07 11:38:17 +02:00
Aaron Bach
175f38b68a Bump aioambient to 2023.04.0 (#90991) 2023-04-06 19:22:27 -10:00
J. Nick Koston
fabfc59dfb Bump zeroconf to 0.55.0 (#90987) 2023-04-06 18:07:17 -10:00
J. Nick Koston
0fb210b886 Bump websockets constraint to 11.0.1+ (#90901) 2023-04-06 18:03:33 -10:00
Marc Mueller
823eb23600 Improve proxmoxve generic typing (#90948) 2023-04-06 19:32:49 -07:00
J. Nick Koston
9793cae2d3 Bump vallox-websocket-api to 3.2.1 (#90980)
unblocks https://github.com/home-assistant/core/pull/90901
which will finally fix the races in websockets
2023-04-06 21:19:10 -04:00
J. Nick Koston
398762fdd5 Resume entity id post migration after a restart (#90973)
* Restart entity id post migration after a restart

If the entity migration finished and Home Assistant was
restarted during the post migration it would never be resumed
which means the old index and space would never be recovered

* add migration resume test
2023-04-06 21:16:45 -04:00
tronikos
d4c10f0a98 Bump androidtvremote2 to 0.0.5 (#90922) 2023-04-06 17:54:45 -04:00
Paulus Schoutsen
0c15c75781 2023.4.1 (#90956) 2023-04-06 17:52:14 -04:00
Heikki Partanen
2bf51a033b Fix verisure autolock (#90960)
Fix verisure autolock #90959
2023-04-06 20:54:40 +00:00
Heikki Partanen
0b1241cb8f Fix verisure autolock (#90960)
Fix verisure autolock #90959
2023-04-06 16:54:18 -04:00
Steven Rollason
cfd8695aaa Fix command_template sensor value_template not being used if json_attributes set (#90603)
* Allow value_template to be used if json_attributes set

* Set state to None if no value_template and json_attributes used

* Refactor check for no value_template when json_attributes used

* Updated and additional unit test

* Updated to set _attr_native_value and return if value_template is None

* Update unit test docstring

* Updated test docstring based on feedback
2023-04-06 20:49:32 +00:00
Jan Bouwhuis
e8a6a2e105 Fix error after losing an imap connection (#90966)
Cleanup first after losing an imap connection
2023-04-06 20:46:54 +00:00
Jan Bouwhuis
6becf523ec Fix error after losing an imap connection (#90966)
Cleanup first after losing an imap connection
2023-04-06 16:46:32 -04:00
Allen Porter
73a960af34 Bump gcal_sync to 4.1.3 (#90968) 2023-04-06 20:44:52 +00:00
Allen Porter
9f5dfdc67c Bump gcal_sync to 4.1.3 (#90968) 2023-04-06 16:44:34 -04:00
Allen Porter
bbb571fdf8 Coerce previously persisted local calendars to have valid durations (#90970) 2023-04-06 20:42:00 +00:00
Allen Porter
3595e2fd5a Coerce previously persisted local calendars to have valid durations (#90970) 2023-04-06 16:41:38 -04:00
J. Nick Koston
c944be8215 Fix state being cleared on disconnect with deep sleep esphome devices (#90925)
* Fix state being cleared on disconnect with deep sleep esphome devices

fixes #90923

* fix logic
2023-04-06 20:39:04 +00:00
J. Nick Koston
5e903e04cf Avoid writing state to all esphome entities at shutdown (#90555) 2023-04-06 20:39:00 +00:00
J. Nick Koston
87c22c3ad5 Fix state being cleared on disconnect with deep sleep esphome devices (#90925)
* Fix state being cleared on disconnect with deep sleep esphome devices

fixes #90923

* fix logic
2023-04-06 16:32:02 -04:00
J. Nick Koston
20d0362914 Add mysql 8.0.32 to the CI (#90898) 2023-04-06 09:33:08 -10:00
Steven Rollason
2b46734bd3 Fix command_template sensor value_template not being used if json_attributes set (#90603)
* Allow value_template to be used if json_attributes set

* Set state to None if no value_template and json_attributes used

* Refactor check for no value_template when json_attributes used

* Updated and additional unit test

* Updated to set _attr_native_value and return if value_template is None

* Update unit test docstring

* Updated test docstring based on feedback
2023-04-06 21:06:31 +02:00
starkillerOG
6884b0a421 Bump reolink-aio to 0.5.10 (#90963)
* use is_doorbell instead of is_doorbell_enabled

* Bump reolink-aio to 0.5.10
2023-04-06 14:35:39 -04:00
starkillerOG
fca9052430 Bump reolink-aio to 0.5.10 (#90963)
* use is_doorbell instead of is_doorbell_enabled

* Bump reolink-aio to 0.5.10
2023-04-06 14:35:22 -04:00
Aaron Bach
a1c7159304 Bump aioambient to 2022.10.0 (#90940)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-06 14:34:25 -04:00
epenet
d65791027f Fix flaky test in vesync (#90921)
* Fix flaky test in vesync

* Move sorting to the test
2023-04-06 14:34:24 -04:00
Aaron Bach
e9f6a963a0 Bump aioambient to 2022.10.0 (#90940)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-06 14:33:41 -04:00
Paulus Schoutsen
5ffa0cba39 Bumped version to 2023.4.1 2023-04-06 13:21:13 -04:00
Bram Kragten
f5be600383 Update frontend to 20230406.1 (#90951) 2023-04-06 13:21:07 -04:00
Pascal Reeb
9b2e26c270 Handle NoURLAvailableError in Nuki component (#90927)
* fix(nuki): handle NoURLAvailableError

* only try internal URLs
2023-04-06 13:21:06 -04:00
stickpin
e25edea815 Return empty available programs list if an appliance is off during initial configuration (#90905) 2023-04-06 13:21:05 -04:00
J. Nick Koston
849000d5ac Bump aiodiscover to 1.4.16 (#90903) 2023-04-06 13:21:04 -04:00
Aaron Bach
cb06541fda Bump simplisafe-python to 2023.04.0 (#90896)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-06 13:21:03 -04:00
J. Nick Koston
70d1e733f6 Fix entity_id migration query failing with MySQL 8.0.30 (#90895) 2023-04-06 13:21:02 -04:00
J. Nick Koston
0b3012071e Guard against invalid ULIDs in contexts while recording events (#90889) 2023-04-06 13:21:01 -04:00
J. Nick Koston
42b7ed115f Bump ulid-transform 0.6.0 (#90888)
* Bump ulid-transform 0.6.0

changelog: https://github.com/bdraco/ulid-transform/compare/v0.5.1...v0.6.0

to find the source of the invalid ulids in https://github.com/home-assistant/core/issues/90887
2023-04-06 13:21:00 -04:00
J. Nick Koston
513a13f369 Fix missing bluetooth client wrapper in bleak_retry_connector (#90885) 2023-04-06 13:20:59 -04:00
Michael
f341d0787e Migrate entity unique ids in PI-Hole (#90883)
* migrate entity unique ids

* Update homeassistant/components/pi_hole/__init__.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-04-06 13:20:58 -04:00
J. Nick Koston
c8ee45b53c Add MariaDB deadlock retry wrapper to database timestamp column migrations (#90880)
Add deadlock retry wrapper to timestamp column migrations

fixes #90819
2023-04-06 13:20:57 -04:00
J. Nick Koston
b4e2dd4e06 Add constraint for websockets to <11.0 (#90868) 2023-04-06 13:20:56 -04:00
J. Nick Koston
c663d8754b Generate a seperate log message per dumped object for profiler.dump_log_objects (#90867)
Since some objects are very large we can generate overly large log messages
```
Event data for system_log_event exceed maximum size of 32768 bytes. This can cause database performance issues; Event data will not be stored
```

Reported in https://ptb.discord.com/channels/330944238910963714/427516175237382144/1093069996101472306
2023-04-06 13:20:55 -04:00
Tom Harris
968a4e4818 Fix issue with Insteon All-Link Database loading (#90858)
Bump to 1.4.1
2023-04-06 13:20:54 -04:00
saschaabraham
833b95722e Bump fritzconnection to 1.12.0 (#90799) 2023-04-06 13:20:53 -04:00
mkmer
096e814929 Handle Uncaught exceptions in async_update Honeywell (#90746) 2023-04-06 13:20:52 -04:00
Erik Montnemery
44c89a6b6c Refactor handling of exposed entities for cloud Alexa and Google (#89877)
* Refactor handling of exposed entities for cloud Alexa

* Tweak WS API

* Validate assistant parameter

* Address some review comments

* Refactor handling of exposed entities for cloud Google

* Raise when attempting to expose an unknown entity

* Add tests

* Adjust cloud tests

* Allow getting expose new entities flag

* Test Alexa migration

* Test Google migration

* Add WS command cloud/google_assistant/entities/get

* Fix return value

* Update typing

* Address review comments

* Rename async_get_exposed_entities to async_get_assistant_settings
2023-04-06 13:09:45 -04:00
Bram Kragten
0d84106947 Update frontend to 20230406.1 (#90951) 2023-04-06 13:08:52 -04:00
Erik Montnemery
b3b83b7bb2 Add a pipeline store to voice_assistant (#90844)
* Add a pipeline store to voice_assistant

* Improve error handling

* Improve test coverage

* Improve test coverage

* Use StorageCollectionWebsocket

* Correct rebase
2023-04-06 12:55:16 -04:00
Marc Mueller
b2bcdf7c19 Update mypy to 1.2.0 (#90947)
* Update mypy to 1.2.0

* Add type ignore
2023-04-06 12:51:16 -04:00
epenet
385630f9b4 Fix flaky test in vesync (#90921)
* Fix flaky test in vesync

* Move sorting to the test
2023-04-06 12:51:02 -04:00
Paulus Schoutsen
86e9f6643f Allow TTS requests to resolve in the background (#90944) 2023-04-06 10:42:55 -05:00
Erik Montnemery
59a02cd08c Allow storing other items than untyped dict in StorageCollection (#90932)
Allow storing other items than untyped dict in StorageCollection
2023-04-06 10:57:00 -04:00
Erik Montnemery
8025fbf398 Remove the coronavirus integration (#90934)
* Remove the coronavirus integration

* Run hassfest and gen_requirements_all
2023-04-06 10:43:09 -04:00
Pascal Reeb
4667b27405 Handle NoURLAvailableError in Nuki component (#90927)
* fix(nuki): handle NoURLAvailableError

* only try internal URLs
2023-04-06 13:51:37 +02:00
epenet
842d89f419 Rewrite mailbox tests (#90906)
* Rewrite mailbox tests

* Use some bytes for get_media

* Split __init__ method

* Cleanup lingering timers

* Simplify message text

* Simplify msgtime

* Remove cleanup

* Use a constant
2023-04-06 13:48:19 +02:00
Erik Montnemery
fa308d8e10 Drop unused logger argument for StorageCollection() (#90913) 2023-04-06 13:28:34 +02:00
mkmer
3d426e1e2b Handle Uncaught exceptions in async_update Honeywell (#90746) 2023-04-06 10:44:13 +02:00
Michael
03e9cb233f Add entity name translations to CO2signal (#90877) 2023-04-06 10:39:49 +02:00
stickpin
e8cbf439e5 Return empty available programs list if an appliance is off during initial configuration (#90905) 2023-04-06 10:38:09 +02:00
J. Nick Koston
96c5e845e5 Guard against invalid ULIDs in contexts while recording events (#90889) 2023-04-06 10:34:54 +02:00
J. Nick Koston
19f71b3bb9 Fix entity_id migration query failing with MySQL 8.0.30 (#90895) 2023-04-06 10:34:13 +02:00
J. Nick Koston
571204fa44 Fix missing bluetooth client wrapper in bleak_retry_connector (#90885) 2023-04-06 10:33:00 +02:00
Aaron Bach
de3f25571d Bump simplisafe-python to 2023.04.0 (#90896)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-06 10:32:35 +02:00
saschaabraham
df40b4bf9f Bump fritzconnection to 1.12.0 (#90799) 2023-04-06 10:31:43 +02:00
J. Nick Koston
e5931dfce2 Bump aiodiscover to 1.4.16 (#90903) 2023-04-06 10:30:29 +02:00
Franck Nijhof
823c506296 Merge branch 'master' into dev 2023-04-06 10:26:34 +02:00
J. Nick Koston
479a35c499 Revert "Move local calendar diagnostics to pytest.mark.freezetime" (#90899)
Revert "Move local calendar diagnostics to pytest.mark.freezetime (#90886)"

This reverts commit a01952981f.
2023-04-05 22:12:21 -07:00
Allen Porter
a01952981f Move local calendar diagnostics to pytest.mark.freezetime (#90886) 2023-04-05 19:57:09 -07:00
Jesse Hills
eb469d6a2f Move enum mapper to own file to prevent circular dependency (#90890)
* Move enum_mapper to own file to prevent circular dependency

* Add enum mapper test
2023-04-05 22:55:51 -04:00
J. Nick Koston
2fc34e7cce Bump ulid-transform 0.6.0 (#90888)
* Bump ulid-transform 0.6.0

changelog: https://github.com/bdraco/ulid-transform/compare/v0.5.1...v0.6.0

to find the source of the invalid ulids in https://github.com/home-assistant/core/issues/90887
2023-04-05 22:19:43 -04:00
Ernst Klamer
96ed4a1be1 Bump xiaomi-ble to 0.17.0 (#90806)
Add support for new Xiaomi BLE sensors
2023-04-05 22:14:21 -04:00
epenet
aa218e6f9c Fix lingering timer in device_tracker (#90824) 2023-04-05 21:12:26 -04:00
Paul Bottein
71697df3c2 Add device name fallback if no hostname in PrusaLink (#90831)
Device name fallback if no hostname in PrusaLink
2023-04-05 21:03:39 -04:00
tronikos
49468ef5d0 Android TV Remote integration (#89935)
* Android TV Remote integration

* Add diagnostics

* Remove test pem files from when api was not mocked

* Address review comments

* Remove hass.data call in test

* Store the certificate and key in /config/.storage

* update comments

* Update homeassistant/components/androidtv_remote/__init__.py

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

* import callback

* use async_generate_cert_if_missing

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-04-05 21:00:40 -04:00
Tom Harris
a6c5b5e238 Fix issue with Insteon All-Link Database loading (#90858)
Bump to 1.4.1
2023-04-05 20:53:44 -04:00
J. Nick Koston
4c767b2f72 Generate a seperate log message per dumped object for profiler.dump_log_objects (#90867)
Since some objects are very large we can generate overly large log messages
```
Event data for system_log_event exceed maximum size of 32768 bytes. This can cause database performance issues; Event data will not be stored
```

Reported in https://ptb.discord.com/channels/330944238910963714/427516175237382144/1093069996101472306
2023-04-05 20:53:19 -04:00
Michael
397fbc0e41 Migrate entity unique ids in PI-Hole (#90883)
* migrate entity unique ids

* Update homeassistant/components/pi_hole/__init__.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-04-05 20:52:37 -04:00
J. Nick Koston
b4fec762bc Switch to fnv-hash-fast from fnvhash (#90761)
* Switch to fnv-hash-fast from fnvhash

Replaces the pure python implemention with a fast cpp one
when available (with fallback to pure python)

changelog: https://github.com/bdraco/fnv-hash-fast/releases/tag/v0.3.1
source: https://github.com/bdraco/fnv-hash-fast/tree/main/src/fnv_hash_fast

* Apply suggestions from code review

* lint
2023-04-05 20:52:23 -04:00
J. Nick Koston
a8f1d033a0 Add MariaDB deadlock retry wrapper to database timestamp column migrations (#90880)
Add deadlock retry wrapper to timestamp column migrations

fixes #90819
2023-04-05 20:46:56 -04:00
epenet
60692bcfdb Fix lingering timers in calendar tests (#90845) 2023-04-05 20:46:05 -04:00
Erik Montnemery
4276ce96ea Use send_json_auto_id in voice_assistant tests (#90857) 2023-04-05 19:07:42 -05:00
Erik Montnemery
4104659986 Allow import of deprecated audioop module (#90869) 2023-04-05 19:03:46 -05:00
J. Nick Koston
ef5d8d83cb Add constraint for websockets to <11.0 (#90868) 2023-04-05 08:03:47 -10:00
epenet
19ab76dad9 Fix lingering timers in sensor tests (#90856) 2023-04-05 19:52:30 +02:00
shbatm
04cfd7b41d Use built-in percentage unit for ISY994 relative humidity (#90863) 2023-04-05 07:50:06 -10:00
Stackie Jia
5c2af99520 Improve the HomeKit (de)humidifier min/max humidity handling (#90854) 2023-04-05 06:35:47 -10:00
Tom Puttemans
3538844181 Support entity name translation in DSMR Reader component (#90836)
* Use translation_key instead of name for the entity names and enum values

This change allows for the translation of entity names and their values based on a key, instead of having the English text in the code

* Adjusted tariff options order

Not really wrong, but this way it is consistent with all other entities
2023-04-05 10:59:07 -04:00
epenet
c01b1eb013 Adjust async_track_time_interval name argument (#90838)
Adjust async_track_time_interval naming
2023-04-05 10:58:02 -04:00
Bram Kragten
0f8060fd00 Bump frontend to 20230405.0 (#90841) 2023-04-05 16:41:24 +02:00
Erik Montnemery
bff5b75377 Adjust OTBR channel conflict URL (#90847) 2023-04-05 16:06:00 +02:00
epenet
acec2fd7db Fix lingering timers in mailbox tests (#90830) 2023-04-05 14:09:51 +02:00
epenet
84f58543ef Fix lingering timers in image processing tests (#90829) 2023-04-05 14:09:15 +02:00
epenet
35b642c6c8 Improve type hints in calendar trigger tests (#90827) 2023-04-05 14:08:55 +02:00
J. Nick Koston
7cf1926081 Fix BLEDevice not getting updated when details change for remote scanners (#90815) 2023-04-05 12:19:37 +02:00
Penny Wood
3ddfe027fd Master RAS zone (#90825)
Fixes issue in some systems with different numbering systems
2023-04-05 12:18:54 +02:00
Jan Bouwhuis
94817f61e5 Suppress imap logging on reconnect and presume state (#90826) 2023-04-05 12:18:16 +02:00
Paul Bottein
58ac8404ef Add entity name translations to prusalink entities (#90833) 2023-04-05 12:17:00 +02:00
andarotajo
08dd0a5efa Move dwd_weather_warnings constants to separate file (#90810)
* Move constants to seperate file

* Use __package__ for the logger name

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-05 09:16:17 +02:00
J. Nick Koston
5eb0c35a97 Add names to common helper tasks (#90803) 2023-04-05 08:41:15 +02:00
Hans Oischinger
21a873f0af Remove myself from vicare codeowners (#90755) 2023-04-05 08:29:57 +02:00
mletenay
83704f0334 Update to goodwe v0.2.31 (#90808) 2023-04-05 07:52:05 +03:00
J. Nick Koston
02c749a111 Bump aioesphomeapi to 10.6.1 (#90816) 2023-04-04 17:22:01 -10:00
Mark Adkins
1f7ebe9249 SharkIQ Hotfix - Handle current installations by using default REGION (#90741)
* Add default region on async_setup_entry

* Move logic to migration function

* Move update logic back to setup function, but updates the config if needed.

* Remove commented out code

* Update Tests & Config setting method

* Update homeassistant/components/sharkiq/__init__.py

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

* Update homeassistant/components/sharkiq/__init__.py

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

* Accept Suggestions & Formatting

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-04 21:06:24 -04:00
Fabio De Simone
8495da1af0 Fix bluetooth_le_tracker reporting devices Home when they leave (#90641)
* fix bluetooth_le_tracker reporting devices Home when they leave

* refactor

* implement tests for BLE service_info.time check

* update bluetooth_le_tracker tests

* tweaks

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-04 20:59:57 -04:00
Vincent Knoop Pathuis
03caf63ec2 Remove getattr for Landis+Gyr Heat Meter (#90637)
* Remove getattr and update tests

* Apply suggestion for test from PR review

* Make constants capitalized
2023-04-04 22:01:35 +02:00
Patrick ZAJDA
e748f0c623 Add entity name translations to Broadlink sensors (#90783)
* Add entity name translations to Broadlink sensors

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Update tests

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-04 15:18:41 -04:00
Guy Khmelnitsky
22a1c8f00f Bump locationsharinglib to 5.0.0 (#90790)
* Update GoogleMaps intergration dependency

* Update requirements_all.txt
2023-04-04 11:43:20 -07:00
Jan Bouwhuis
4a0d3e881a Rework MQTT config merging and adding defaults (#90529)
* Cleanup config merging and adding defaults

* Optimize and update tests

* Do not mix entry and yaml config

* Make sure hass.data is initilized

* remove check on get_mqtt_data

* Tweaks to MQTT client

* Remove None assigment mqtt client and fix mock
2023-04-04 18:12:18 +02:00
Erik Montnemery
690a0f34e5 Fix glob expansion for partial prettier run (#90787) 2023-04-04 17:27:15 +02:00
Erik Montnemery
6642db917f Remove legacy services from lock/services.yaml (#90779) 2023-04-04 17:03:43 +02:00
Erik Montnemery
28d85bc405 Run prettier on matter fixture (#90784) 2023-04-04 16:13:08 +02:00
Matija Kovacic
e7c5325ba8 Extract Supla base entity into its own file (#90781)
* Extracting Supla base entity

* Fix improper import

* Making Black happy.

* Use set for membership check

* Making ruff happy.
2023-04-04 16:11:27 +02:00
J. Nick Koston
5e3796c333 Prevent legacy device tracker from creating hundreds of executor jobs (#90690)
* Prevent legacy device tracker from creating hundreds of executor jobs

The legacy device tracker would create an executor job for
each set of extra state attributes and device name lookup.

For routers this meant hundreds of jobs

* Prevent legacy device tracker from creating hundreds of executor jobs

The legacy device tracker would create an executor job for
each set of extra state attributes and device name lookup.

For routers this meant hundreds of jobs

* tweak

* simplify
2023-04-04 08:55:25 -04:00
Martin Hjelmare
535fb34207 Move legacy stt (#90776)
* Move legacy stt to separate module

* Remove case for None as provider

* Add error log for unknown platform

* Add some tests
2023-04-04 14:52:36 +02:00
epenet
584066b809 Rename renault coordinator and base entity (#90760)
Refactor renault coordinator and base entity
2023-04-04 14:38:52 +02:00
epenet
f24634e198 Use domain constants in rest tests (#90765) 2023-04-04 14:33:41 +02:00
Martin Hjelmare
3b2127b1dc Add core as codeowner for stt integration (#90777) 2023-04-04 08:28:34 -04:00
hidaris
a9e14cd8d7 Preliminary support for Matter cover (#90262)
Preliminary support for Matter cover, curtain tilt support has not been added yet.
2023-04-04 14:16:11 +02:00
Patrick ZAJDA
e962dd64cf Add translations for Nuki entity name and battery critical state attribute (#90772)
* Add translations for Nuki entity name and battery critical state attribute

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Remove door sensor name

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

---------

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
2023-04-04 13:43:51 +02:00
Jan Bouwhuis
9b03d331ca Fix recovering imap connection triggers re-auth (#90762) 2023-04-04 12:59:57 +02:00
Michael
b4e12d34f6 Add entity name translations to SMS (#90727) 2023-04-04 12:58:42 +02:00
Maciej Bieniek
2f22613cf9 Address late review for NextDNS entity name translations (#90771) 2023-04-04 12:56:39 +02:00
J. Nick Koston
b66a99fe8a Bump sqlalchemy to 2.0.8 (#90756) 2023-04-04 12:47:54 +02:00
J. Nick Koston
0cc9b2e803 Use slots for discovery dataclasses (#90751) 2023-04-04 12:44:59 +02:00
Raman Gupta
bfea1367a7 Add ms to units comment for duration sensor device class (#90757) 2023-04-04 12:42:33 +02:00
starkillerOG
a05fbdeedb Add async_write_ha_state to Reolink select (#90764)
Add async_write_ha_state to select
2023-04-04 11:48:14 +02:00
epenet
dfa0b5439b Add myself to rest code owners (#90770) 2023-04-04 11:36:36 +02:00
Erik Montnemery
37661fe79f Update template environment from the event loop (#90758) 2023-04-04 09:52:47 +02:00
J. Nick Koston
edd93e989e Add render count to templates repr (#90753) 2023-04-03 19:38:15 -10:00
J. Nick Koston
a4bf71b655 Bump aiohomekit to 2.6.3 (#90752) 2023-04-03 19:38:04 -10:00
Paulus Schoutsen
79101b31d5 Fix frontend test again (#90754) 2023-04-04 00:11:20 -04:00
Paulus Schoutsen
6e4c78686e Run pipeline from audio stream function (#90748)
* Run pipeline from audio stream function

* Fix tests

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2023-04-04 00:06:51 -04:00
J. Nick Koston
4f1574b859 Prevent overly large event data from being stored in the database (#90747)
This is the same change as #87105 for events
2023-04-04 00:02:49 -04:00
J. Nick Koston
6dc55e4a3a Bump zeroconf to 0.54.0 (#90744)
* Bump zeroconf to 0.54.0

fixes incorrect addresses when the server name changes

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.53.0...0.54.0

* fix
2023-04-04 00:02:07 -04:00
Maciej Bieniek
a854a5620f Add entity name translations to Tractive (#90738)
Add entity name translations
2023-04-04 00:01:46 -04:00
Maciej Bieniek
449f18c9c1 Add entity name translations to NextDNS (#90743)
Add entity name translations
2023-04-04 00:01:04 -04:00
Avi Miller
5e7e96c5da Remove the LIFX sensor update coordinator (#90740) 2023-04-03 17:48:32 -10:00
TheJulianJES
a58b3721ed Restore state for ZHA OnOff binary sensors (#90749)
* Restore state for ZHA OnOff binary sensors

* Let `Motion` extend `Opening`

`Motion` is just a specified version of `Opening` that only changes the device class for some motion sensors.
Since we have more "special code" in the OnOff/Opening sensor now, we also want to make sure that gets applied to `Motion` binary sensors.

* Improve comment and type

* Add test to verify that binary sensors restore last HA state
2023-04-03 22:27:57 -04:00
Erik Montnemery
59511cc3f7 Make service field filter parameters exclusive (#90728) 2023-04-03 21:46:23 +02:00
Michael
d4d77d9395 Add sort list service to Shopping List (#90671) 2023-04-03 21:34:44 +02:00
Bram Kragten
8c621699af Update frontend to 20230403.0 (#90735) 2023-04-03 21:32:40 +02:00
Emory Penney
7c6a32ebb5 Add DHCP discovery to Obihai (#88984)
* Add DHCP discovery to Obihai

* Unique ID is MAC

* Move try blocks, cleanup

* Migrate existing unique_ids

* Use PyObihai to update Unique ID

* Auth then use get_device_mac

* Config flow changes

* Reworking flow according to feedback

* Cleanup
2023-04-03 21:17:56 +02:00
Michael
fa332668d6 Add entity name translations to sun (#90732) 2023-04-03 21:15:44 +02:00
Matthias Alphart
edaee89e34 Use entity name translations in Fronius (#90463) 2023-04-03 20:05:52 +02:00
Michael
682ebbd4d5 Add entity name translations to Luftdaten (#90725) 2023-04-03 19:55:54 +02:00
Michael
7e543882fc Add entity name translations to Synology DSM (#90706)
* add entity name translation

* sort strings

* sort and capitalize strings
2023-04-03 13:08:22 -04:00
epenet
2d1bb6135c Use entity name translations in 1-wire (#90696)
* Use entity name translations in onewire

* Adjust binary sensors

* Adjust switches

* Cleanup
2023-04-03 13:07:02 -04:00
Michael
9d508ac7ae Add entity name translations to AVM Fritz!SmartHome (#90707)
* add entity name translation

* sort and capitalize

* adjust tests

* sort entities
2023-04-03 13:04:09 -04:00
Erik Montnemery
d52ef83899 Bump pychromecast to 13.0.7 (#90724) 2023-04-03 13:02:36 -04:00
Erik Montnemery
c3091fad4c Raise repair issue if OTBR and ZHA are on different channels (#90494)
* Raise repair issue if OTBR and ZHA are on different channels

* Update issues after creating or setting dataset

* Explain impact

* Add link to documentation, adjust language

* Update homeassistant/components/otbr/strings.json

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-03 13:02:10 -04:00
epenet
73d0124c98 Use entity name translations in Renault (#90697) 2023-04-03 18:20:11 +02:00
Michael
1cce55d176 Add entity name translations to NUT (#90709) 2023-04-03 18:18:23 +02:00
Aaron Bach
ba58fc25bd Fix missing battery sensors for SimpliSafe locks (#90722) 2023-04-03 16:42:24 +02:00
Michael
aeeadb570a Fix translation of status binary sensor in PI-Hole (#90719) 2023-04-03 16:38:54 +02:00
Patrick ZAJDA
4456557a02 Add entity name translations to Switchbot (#90600)
* Add entity name translations to Switchbot

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Apply suggestions from code review

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Fix tests

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Update homeassistant/components/switchbot/strings.json

Co-authored-by: Patrick ZAJDA <patrick@zajda.fr>

---------

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-04-03 10:10:30 -04:00
Franck Nijhof
186f47ba46 Add entity name translations to Plugwise (#90537)
* Add entity name translations to Plugwise

* Re-use extisting translation where possible
2023-04-03 09:25:02 -04:00
Pascal Reeb
e72c2029cb Add Warning in the issue registry if a HTTPS webhook is used for Nuki (#90718)
feat(nuki): create issue when https webhook URL was created
2023-04-03 14:49:15 +02:00
Felix Rotthowe
bacbe4aa58 Fix Livisi climate min/max temperature (#90712)
* Correctly set livisi climate min/max temp

* fix imports
2023-04-03 14:17:57 +02:00
epenet
45038bac16 Use entity name translations in SFR Box (#90698) 2023-04-03 14:04:02 +02:00
Michael
628142527d Add entity name translations to Pi-hole (#90713) 2023-04-03 14:00:27 +02:00
Matija Kovacic
34245a6b3d Add support for Supla garage doors (#90593)
* Adding support for additional Supla channel types

Newly supported channel types are - CONTROLLINGTHEGARAGEDOOR, DIMMER, RGBLIGHTING.

* Remove light platform additions

* Remove light devices

* Update homeassistant/components/supla/cover.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Removing some Black automatic formatting.

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-03 13:56:40 +02:00
Maciej Bieniek
1eadc63cd5 Add entity name translations to BraviaTV (#90702)
Add entity name translations
2023-04-03 07:40:52 -04:00
Michael
33a4c2c162 Add entity name translations to AVM Fritz!Tools (#90703)
* add entity name translation

* apply suggestions

* sort strings
2023-04-03 07:35:35 -04:00
Maciej Bieniek
eb748416ed Use the default entity names in GIOS (#90700) 2023-04-03 12:42:55 +02:00
Maciej Bieniek
34041c7564 Add entity name translations to NAM (#90681) 2023-04-03 12:37:01 +02:00
andarotajo
37556a57af Upgrade dwd_weather_warnings dependency dwdwfsapi to 1.0.6 (#90683) 2023-04-03 11:12:35 +02:00
Maciej Bieniek
cacd6708f0 Use the default entity names in Airly (#90693) 2023-04-03 10:50:24 +02:00
Stephan Uhle
3c536e31eb Fix ha version in EDL21 deprecation warning (#90699)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-03 10:48:06 +02:00
G Johansson
724eb7f2bd Remove Darksky integration (#90322) 2023-04-03 10:34:36 +02:00
Nerdix
d539bddabc Correct handling if WIFI combine suffix is "None" (#90528)
* Correct handling of "None" WIFI combine suffix

* Update tests/components/unifi/test_config_flow.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Update tests/components/unifi/test_config_flow.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-04-03 09:47:08 +02:00
Jan Bouwhuis
580b20b0a8 Deprecate imap_content_sensor (#90429)
* Deprecate imap_content_sensor

* Rename unique_id to issue_id

* Migrate config to imap entry

* Improve dialogs

* Improve dialog texts

* Add repairs.py to .coveragerc

* Test the integration component setup

* Text tweak

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

* Use flow for creating entries

* Rename schema add tests

* Patch client instead

* Add tests repairs - refactor async_step_confirm

* Comments test, correct calling next step

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-03 07:27:41 +02:00
starkillerOG
ddb1610e90 Reolink late review comments (#90668)
review comments
2023-04-03 07:22:38 +02:00
J. Nick Koston
73714a6656 Ensure system log does not raise while processing logger messages (#90652) 2023-04-02 15:18:50 -10:00
J. Nick Koston
51ff027fce Add object source logger to profiler (#90650)
* Add object source logger to profiler

* fixes

* cleanup

* tweaks

* logging

* logging

* too intensive

* adjust

* Update homeassistant/bootstrap.py

* fixes

* fixes

* coverage
2023-04-02 20:54:21 -04:00
Maciej Bieniek
2229a63acd Fix default sensor entity name for PM1 (#90684)
Fix PM1 text
2023-04-02 20:53:00 -04:00
J. Nick Koston
17719663f0 Fix memory churn in state templates (#90685)
* Fix memory churn in state templates

The LRU for state templates was limited to 512 states. As soon
as it was exaused, system performance would tank as each template
that iterated all states would have to create and GC any state
> 512

* does it scale?

* avoid copy on all

* comment

* preen

* cover

* cover

* comments

* comments

* comments

* preen

* preen
2023-04-02 20:51:25 -04:00
mletenay
0198c751b4 Update goodwe library to v0.2.30 (#90607) 2023-04-02 20:25:29 -04:00
Michael Davie
6a6b6cf826 Bump env_canada to v0.5.30 (#90644) 2023-04-02 20:20:11 -04:00
Patrick ZAJDA
22fd6138bd Add entity name translations for Nest sensors (#90677)
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
2023-04-02 20:19:03 -04:00
J. Nick Koston
368d1c9b54 Bump zeroconf to 0.53.0 (#90682) 2023-04-02 13:32:00 -10:00
Paulus Schoutsen
c5a87addc1 Fix frontend test (#90679) 2023-04-02 14:28:52 -04:00
Maciej Bieniek
fc81b82932 Add entity name translations to GIOS (#90655)
* Add entity name translations

* Update tests
2023-04-02 14:25:38 -04:00
Maciej Bieniek
d32fb7c22f Add entity name translations to Airly (#90656)
Add entity name translations
2023-04-02 14:24:40 -04:00
tronikos
b52fab0f6d Rename Android TV to Android Debug Bridge (#90657)
* Rename Android TV to Android debug bridge

* More renaming
2023-04-02 14:22:16 -04:00
J. Nick Koston
17270979e6 Bump zeroconf to 0.52.0 (#90660)
* Bump zeroconf to 0.52.0

Switch to using the new ip_addresses_by_version which avoids
all the ip address conversions

* updates
2023-04-02 14:09:44 -04:00
Paulus Schoutsen
4a4d3201f5 Fix voice assistant error variable (#90658) 2023-04-01 22:34:52 -05:00
J. Nick Koston
84292d4797 Cleanup some duplicate code in recorder statistics (#90549)
* Cleanup some duplicate code in recorder statistics

* more cleanup

* reduce

* reduce
2023-04-01 21:40:14 -04:00
Maciej Bieniek
5fc103947f Add entity name translations to Brother (#90634)
* Add entity name translations

* Fix sensor name

* Update tests

* Suggested change
2023-04-01 21:39:46 -04:00
Bram Kragten
2852fe6786 Update frontend to 20230401.0 (#90646) 2023-04-01 15:21:51 -04:00
Jan Bouwhuis
9965d9d81d Fix mqtt device_tracker is not reloading yaml (#90639) 2023-04-01 15:17:53 -04:00
J. Nick Koston
8263c3de23 Bump zeroconf to 0.51.0 (#90622)
* Bump zeroconf to 0.50.0

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.47.4...0.50.0

* bump to 51
2023-04-01 15:15:17 -04:00
J. Nick Koston
00a4279d64 Speed up backups (#90613) 2023-04-01 15:14:59 -04:00
starkillerOG
b47ac524ea Use async_timeout instead of asyncio.wait_for (#90496)
* Use async_timeout instead of asyncio.wait_for

* fix imports

* fix imports

* break out Event.wait patch

* Update tests/components/reolink/conftest.py

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

* Simplify

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-01 17:47:31 +02:00
nono
9cab05c4b9 Fix Rest switch init was not retrying if unreachable at setup (#90627)
* Fix Rest switch init was not retrying if unreachable at setup

* pass error log to platformnotready
prevents spamming the same message in logs.
2023-04-01 17:45:24 +02:00
J. Nick Koston
f1fa63281e Adjust context id variable names in the logbook processor to improve readability (#90617)
Adjust some variable names in the logbook process to improve readablity

There were some places were we used context_id that should have been context_id_bin
2023-04-01 10:24:02 -04:00
J. Nick Koston
e94c11371d Bump securetar to 2023.3.0 (#90612)
changelog: https://github.com/pvizeli/securetar/compare/2022.02.0...2023.3.0
2023-04-01 10:22:26 -04:00
Michael Hansen
90d81e9844 Use webrcvad to detect silence in pipelines (#90610)
* Add webrtcvad requirement

* Use webrcvad for voice command segmenting

* Add vad test
2023-03-31 23:55:07 -04:00
J. Nick Koston
44b35fea47 Speed up entity filter when there are many glob matchers (#90615)
* Speed up entity filter when there are many glob matchers

Since we do no care about which glob matches we can
combine all the translated globs into a single regex
which reduces the overhead

* delete unused code

* preen
2023-03-31 21:18:29 -04:00
J. Nick Koston
3e94f2a502 Small speed up to _collection_changed (#90621)
attrgetter builds a fast method which happens in native code
4664a7cf68/Modules/_operator.c (L1413)
2023-03-31 21:15:36 -04:00
Joakim Sørensen
3e59687902 Only limit stats to started add-ons (#90611) 2023-03-31 23:57:39 +02:00
J. Nick Koston
f4c341253b Avoid sorting domain/all states in templates (#90608) 2023-03-31 11:27:55 -10:00
Raman Gupta
6db96847d5 Bump zwave-js-server-python to 0.47.3 (#90606)
* Bump zwave-js-server-python to 0.47.2

* Bump zwave-js-server-python to 0.47.3
2023-03-31 15:39:08 -04:00
puddly
3f398818c5 Perform an energy scan when downloading ZHA diagnostics (#90605) 2023-03-31 15:37:00 -04:00
Paulus Schoutsen
01a05340c6 Voice Assistant: improve error handling (#90541)
Co-authored-by: Michael Hansen <mike@rhasspy.org>
2023-03-31 14:04:22 -05:00
puddly
84eb9c5f97 Fix ZHA definition error on received command (#90602)
* Fix use of deprecated command schema access

* Add a unit test
2023-03-31 14:53:42 -04:00
Paulus Schoutsen
ad26317b75 Conversation: allow getting agent info (#90540)
* Conversation: allow getting agent info

* Add unset agenet back
2023-03-31 14:36:39 -04:00
Paulus Schoutsen
8018be28ee TTS: allow resolving engine and test supported options (#90539)
TTS: allow resolving engine
2023-03-31 13:34:42 -05:00
J. Nick Koston
44eaf70625 Make sonos activity check a background task (#90553)
Ensures the task is canceled at shutdown if the device
is offline and the ping is still in progress
2023-03-31 14:33:44 -04:00
starkillerOG
09d54428c9 Bump reolink-aio to 0.5.9 (#90590) 2023-03-31 14:31:04 -04:00
Martin Hjelmare
8256d9b472 Remove xbox_live integration (#90592) 2023-03-31 14:30:04 -04:00
epenet
611d4135fd Add ComponentProtocol to improve type checking (#90586) 2023-03-31 14:19:58 -04:00
Bram Kragten
03137feba5 Update frontend to 20230331.0 (#90594) 2023-03-31 14:15:49 -04:00
J. Nick Koston
c566303edb Avoid writing state to all esphome entities at shutdown (#90555) 2023-03-31 18:23:05 +02:00
Erik Montnemery
149e610bca Drop __eq__ dunder method from Entity (#90585) 2023-03-31 17:03:02 +02:00
Franck Nijhof
469321157d Raise on invalid (dis)arm code in manual alarm (#90579) 2023-03-31 16:08:16 +02:00
Franck Nijhof
8e77d215e7 Raise on invalid (dis)arm code in manual mqtt alarm (#90584) 2023-03-31 16:08:02 +02:00
Erik Montnemery
9a17c437ad Remove some dead code from google_assistant (#90581) 2023-03-31 15:59:48 +02:00
Erik Montnemery
3467f4674e Remove unnecessary calls to async_update_entry from async_migrate_entry (#90575) 2023-03-31 15:53:35 +02:00
Erik Montnemery
1ca7f0dc6a Tweak yalexs_ble translations (#90582) 2023-03-31 15:50:49 +02:00
Franck Nijhof
23372e8bc4 Add arming/disarming state to Verisure (#90577) 2023-03-31 14:55:48 +02:00
epenet
4f54e33f67 Allow removal of sensor settings in scrape (#90412)
* Allow removal of sensor settings in scrape

* Adjust

* Adjust

* Add comment

* Simplify

* Simplify

* Adjust

* Don't allow empty string

* Only allow None

* Use default as None

* Use sentinel "none"

* Not needed

* Adjust unit of measurement

* Add translation keys for "none"

* Use translations

* Sort

* Add enum and timestamp

* Use translation references

* Remove default and set suggested_values

* Disallow enum device class

* Adjust tests

* Adjust _strip_sentinel
2023-03-31 14:34:20 +02:00
Hans Oischinger
ea32cc5d92 Refactor vicare config_flow tests (#90568)
* Refactor vicare config_flow tests

* Address review comments

* Remove unused parameters
2023-03-31 14:33:58 +02:00
Rami Mosleh
8cbe394028 Use get_ha_sensor_data method to update glances sensors (#83983)
* Use `get_ha_sensor_data` method to update sensor state

* update tests

* Use `get_ha_sensor_data` to validate connection

* Update test_sensor.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-31 14:27:37 +02:00
epenet
a616ac2b60 Move attribution constants to entity attributes (#90519)
* Move attribution constants to entity attributes

* Adjust meteo france

* Adjust meteoclimatic

* Adjust nws
2023-03-31 14:25:49 +02:00
epenet
ab699d17a5 Ensure numeric sensors have a valid value (#85605)
* Ensure numeric sensors have a valid value

* Flake8
2023-03-31 14:12:51 +02:00
Timm Schäuble
2e26b6e0cc Add attachments to simplepush (#81033)
* Add attachments

* Fix looking for attachment keywords in values

* Improve attachment input format

* Implement better approach to attachment parsing

* Make ruff happy

* Adjust attachment format and implementation according to comment from emontnemery
2023-03-31 14:10:12 +02:00
Franck Nijhof
28736e2ce4 Update orjson to 3.8.9 (#90570) 2023-03-31 13:59:49 +02:00
Franck Nijhof
6153f17155 Update sentry-sdk to 1.18.0 (#90571) 2023-03-31 13:58:53 +02:00
luar123
c7e8fc9f9d Use more meaningful states for snapcast groups and clients (#77449)
* Show muted snapcast groups as idle and use playing/idle state instead of on state for clients

* New module constant STREAM_STATUS

* Fix return type hint in snapcast

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-31 12:38:23 +02:00
Franck Nijhof
6bad5f02c6 Update black to 23.3.0 (#90569) 2023-03-31 12:20:08 +02:00
Franck Nijhof
b24a5750c3 Add CI timeout to codecov job (#90572) 2023-03-31 12:19:45 +02:00
Franck Nijhof
b9f0701336 Update ruff to v0.0.260 (#90566) 2023-03-31 11:43:28 +02:00
Hans Oischinger
b3887a633d Bump PyVicare to 2.25.0 (#90536) 2023-03-31 09:44:30 +02:00
epenet
d0c38c1e12 Move icon constants to entity attributes (#90518)
* Move icon constants to attribute

* Adjust test
2023-03-31 09:34:17 +02:00
J. Nick Koston
2e0ecf9bd9 Avoid more task creation in the discovery helper (#90552)
* Avoid more task creation in the discovery helper

There is no longer a reason to awaiti the jobs being dispatched
since nothing was using the result and there is no risk of
job being garbage collected prematurely anymore since
the task revamp

* Update homeassistant/helpers/discovery.py
2023-03-31 09:10:55 +02:00
J. Nick Koston
ed673a1b35 Avoid creating a task on callback in owntracks when using mqtt (#90548)
Nothing was being awaited in the callback. It did not
need to be a coro
2023-03-31 09:05:56 +02:00
puddly
3a3c738945 Bump ZHA dependencies (#90547)
* Bump ZHA dependencies

* Ensure the network is formed on channel 15 when multi-PAN is in use
2023-03-30 20:55:01 -04:00
Franck Nijhof
47af325a88 Add entity name translations to LaMetric (#90538)
* Add entity name translations to LaMetric

* Consistency
2023-03-30 20:54:31 -04:00
J. Nick Koston
a2efe2445a Fix migration when encountering a NULL entity_id/event_type (#90542)
* Fix migration when encountering a NULL entity_id/event_type

reported in #beta on discord

* simplify
2023-03-30 20:54:13 -04:00
J. Nick Koston
6b0c98045e Handle garbage in the context_id column during migration (#90544)
* Handle garbage in the context_id column during migration

* Update homeassistant/components/recorder/migration.py

* lint
2023-03-30 20:53:47 -04:00
Bram Kragten
6f89390251 Update frontend to 20230330.0 (#90524) 2023-03-30 13:48:21 -04:00
rikroe
565f311f5c Add EV charging remote services for BMW/Mini (#88759)
* Add select for EV charging to bmw_connected_drive

* Use snapshot for select tests, split select_option tests

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Further adjustments from code review

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-30 19:37:03 +02:00
TheJulianJES
fd55d0f2dd Migrate old ZHA IasZone sensor state to zigpy cache (#90508)
* Migrate old ZHA IasZone sensor state to zigpy cache

* Use correct type for ZoneStatus

* Test that migration happens

* Test that migration only happens once

* Fix parametrize
2023-03-30 11:15:12 -04:00
Franck Nijhof
cf628dbf23 Add a device to the sun (#90517) 2023-03-30 10:38:35 -04:00
Paulus Schoutsen
87c4659520 Unregister webhook when registering webhook with nuki fials (#90514) 2023-03-30 15:23:13 +02:00
Paulus Schoutsen
0b72cc9f5e OpenAI to rely on built-in areas variable (#90481) 2023-03-30 15:21:45 +02:00
Erik Montnemery
976efb437b Include channel in response to WS thread/list_datasets (#90493) 2023-03-30 09:16:27 -04:00
Petro31
642984a042 Fix for is_hidden_entity when using it in select, selectattr, reject, and rejectattr (#90512)
fix
2023-03-30 09:14:58 -04:00
Maciej Bieniek
8d21e2b168 Use metric units internally in Accuweather integration (#90444)
* Use metric units internally

* Remove unnecessary code

* Simplify sensor classes

* Remove AccuWeatherForecastSensor class

* Update wind speed value in test

* Return suggested_unit_of_measurement for wind entities

* Clean test

* Use _attr_suggested_unit_of_measurement

* Remove _get_suggested_unit()

* Remove unnecessarey code
2023-03-30 13:11:33 +02:00
Erik Montnemery
ead88cc3f8 Add preferred wind speed unit to unit systems (#90504)
* Add preferred wind speed unit to unit systems

* Tweak

* Update tests
2023-03-30 12:54:12 +02:00
Erik Montnemery
b316ffff9b Rename hassfest _validate_dependencies_exist (#90503) 2023-03-30 12:05:11 +02:00
Aarni Koskela
196f5702b8 Make hassfest.dependencies faster with multiprocessing (#81486)
* hassfest.dependencies: split to two loops

* hassfest.dependencies: use multiprocessing for import scan
2023-03-30 11:25:14 +02:00
Nalin Mahajan
0e7d7f32c1 Add new control4 helper function (#90234)
* Add new helper function to retrieve device variables and update light platform

* seperate try catch from helper function and fix typing

* Change helper function name

* Remove unnecessary forced type changes

* More type changes
2023-03-30 10:33:01 +02:00
epenet
3599515325 Add missing strings to sensor integration (#90475)
* Add missing strings to sensor integration

* Enumeration

* Apply suggestion

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

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-30 10:21:11 +02:00
Vincent Knoop Pathuis
a7040a0487 Add Landis+Gyr MWh-readings from ultraheat-api (#89937)
* Use mwh values from ultraheat api when available

Remove manifest cleanup from PR

Remove added device class from this PR

Restore entity registry fixture

Replace filter by attr_entity_registry_enabled_default

* Catchup with #90182 and #90183

* Add comment explaining disabling some entities

* Add parameterisation of test cases
2023-03-30 09:07:47 +02:00
jellenijhof12
ba32e28fc6 Add dimmable lights support to niko home control (#90141)
* added support for dimmable lights and auto host discover

* split up merge request

* fixed feedback brightness support

* fixed feedback

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* resolved feedback

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-30 08:59:29 +02:00
Thijs W
053ed3cfdc Add reauth to frontier_silicon config flow (#90443)
* Add reauth to frontier_silicon config flow

* Update patch target

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Add reauth_successful to strings.json

* Don't manually set "title_placeholders"

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-30 08:49:46 +02:00
Thijs W
40cb0eeb68 Add missing strings in frontier_silicon (#90446)
Improve confirm message for ssdp flow
2023-03-30 08:05:24 +02:00
luar123
f0710bae06 Add config-flow to Snapcast (#80288)
* initial stab at snapcast config flow

* fix linting errors

* Fix linter errors

* Add import flow, support unloading

* Add test for import flow

* Add dataclass and remove unique ID in config-flow

* remove translations

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Refactor config flow and terminate connection

* Rename test_config_flow.py

* Fix tests

* Minor fixes

* Make mock_create_server a fixture

* Combine tests

* Abort if entry already exists

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Move HomeAssistantSnapcast to own file. Clean-up last commit

* Split import flow from user flow. Fix tests.

* Use explicit asserts. Add default values to dataclass

* Change entry title to Snapcast

---------

Co-authored-by: Barrett Lowe <barrett.lowe@gmail.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-30 07:42:09 +02:00
Raman Gupta
fc78290e2f Remove callback decorators where unneeded (#90478)
* Remove callback decorators where unneeded

* revert extra replace
2023-03-30 00:04:39 +02:00
RenierM26
93d1961aae Use auth token in Ezviz (#54663)
* Initial commit

* Revert "Initial commit"

This reverts commit 452027f1a3c1be186cedd4115cea6928917c9467.

* Change ezviz to token auth

* Bump API version.

* Add fix for token expired. Fix options update and unload.

* Fix tests (PLATFORM to PLATFORM_BY_TYPE)

* Uses and stores token only, added reauth step when token expires.

* Add tests MFA code exceptions.

* Fix tests.

* Remove redundant try/except blocks.

* Rebase fixes.

* Fix errors in reauth config flow

* Implement recommendations

* Fix typing error in config_flow

* Fix tests after rebase, readd camera check on init

* Change to platform setup

* Cleanup init.

* Test for MFA required under user form

* Remove useless if block.

* Fix formating after rebase

* Fix formating.

* No longer stored in the repository

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-03-29 17:43:54 -04:00
J. Nick Koston
4c21caa917 Fix filesize doing blocking I/O in the event loop (#90479)
Fix filesize doing I/O in the event loop
2023-03-29 17:26:28 -04:00
starkillerOG
1023628821 Bump reolink-aio to 0.5.8 (#90467) 2023-03-29 17:26:05 -04:00
Guido Schmitz
706e6597d8 Add entity name translations for devolo Home Network (#90471) 2023-03-29 17:25:33 -04:00
J. Nick Koston
3bebd4318e Bump yalexs-ble to 2.1.14 (#90474)
changelog: https://github.com/bdraco/yalexs-ble/compare/v2.1.13...v2.1.14

reduces ble traffic (fixes a bug were we were checking when we did not need to be)
2023-03-29 17:24:47 -04:00
puddly
d0a492644d Correctly load ZHA settings from API when integration is not running (#90476)
Correctly load settings from the zigpy database when ZHA is not running
2023-03-29 17:24:26 -04:00
dougiteixeira
43a7247dde Move ProxmoxEntity to entity.py (#90480)
* Move ProxmoxEntity to entity.py

* Update homeassistant/components/proxmoxve/entity.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/proxmoxve/entity.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/proxmoxve/entity.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/proxmoxve/entity.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/proxmoxve/binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-29 23:04:37 +02:00
Franck Nijhof
7010447b04 Bump version to 2023.5.0dev0 (#90477) 2023-03-29 16:46:32 -04:00
Chris Xiao
7c778847e7 Add config flow to qBittorrent (#82560)
* qbittorrent: implement config_flow

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: add English translations

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: create sensors with config_flow

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: set unique_id and icon

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: add tests for config_flow

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: detect duplicate config entries

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: import YAML config

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: update coveragerc

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: delete translations file

* create `deprecated_yaml` issue in `setup_platform`

* move qbittorrent test fixtures to conftest.py

* improve code quality & remove wrong unique_id

* keep PLATFORM_SCHEMA until YAML support is removed

* remove CONF_NAME in config entry, fix setup_entry

* improve test suite

* clean up QBittorrentSensor class

* improve user flow tests

* explicit result assertion & minor tweaks in tests

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

* implement entry unloading

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

* add type hints

* tweak config_flow data handling

---------

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>
Co-authored-by: epenet <epenet@users.noreply.github.com>
2023-03-29 22:13:41 +02:00
2762 changed files with 146965 additions and 37520 deletions

View File

@@ -20,6 +20,8 @@ base_platforms: &base_platforms
- homeassistant/components/camera/**
- homeassistant/components/climate/**
- homeassistant/components/cover/**
- homeassistant/components/date/**
- homeassistant/components/datetime/**
- homeassistant/components/device_tracker/**
- homeassistant/components/diagnostics/**
- homeassistant/components/fan/**
@@ -39,6 +41,7 @@ base_platforms: &base_platforms
- homeassistant/components/stt/**
- homeassistant/components/switch/**
- homeassistant/components/text/**
- homeassistant/components/time/**
- homeassistant/components/tts/**
- homeassistant/components/update/**
- homeassistant/components/vacuum/**
@@ -137,7 +140,6 @@ other: &other
requirements: &requirements
- .github/workflows/**
- homeassistant/package_constraints.txt
- script/pip_check
- requirements*.txt
- pyproject.toml

View File

@@ -226,6 +226,8 @@ omit =
homeassistant/components/dublin_bus_transport/sensor.py
homeassistant/components/dunehd/__init__.py
homeassistant/components/dunehd/media_player.py
homeassistant/components/dwd_weather_warnings/const.py
homeassistant/components/dwd_weather_warnings/coordinator.py
homeassistant/components/dwd_weather_warnings/sensor.py
homeassistant/components/dweet/*
homeassistant/components/ebox/sensor.py
@@ -326,9 +328,11 @@ omit =
homeassistant/components/ezviz/binary_sensor.py
homeassistant/components/ezviz/camera.py
homeassistant/components/ezviz/coordinator.py
homeassistant/components/ezviz/number.py
homeassistant/components/ezviz/entity.py
homeassistant/components/ezviz/sensor.py
homeassistant/components/ezviz/switch.py
homeassistant/components/ezviz/update.py
homeassistant/components/faa_delays/__init__.py
homeassistant/components/faa_delays/binary_sensor.py
homeassistant/components/familyhub/camera.py
@@ -385,7 +389,10 @@ omit =
homeassistant/components/foscam/camera.py
homeassistant/components/foursquare/*
homeassistant/components/free_mobile/notify.py
homeassistant/components/freebox/camera.py
homeassistant/components/freebox/device_tracker.py
homeassistant/components/freebox/home_base.py
homeassistant/components/freebox/router.py
homeassistant/components/freebox/sensor.py
homeassistant/components/freebox/switch.py
homeassistant/components/fritz/common.py
@@ -413,7 +420,6 @@ omit =
homeassistant/components/gitlab_ci/sensor.py
homeassistant/components/gitter/sensor.py
homeassistant/components/glances/sensor.py
homeassistant/components/goalfeed/*
homeassistant/components/goodwe/__init__.py
homeassistant/components/goodwe/button.py
homeassistant/components/goodwe/coordinator.py
@@ -479,8 +485,6 @@ omit =
homeassistant/components/homematic/sensor.py
homeassistant/components/homematic/switch.py
homeassistant/components/homeworks/*
homeassistant/components/honeywell/__init__.py
homeassistant/components/honeywell/climate.py
homeassistant/components/horizon/media_player.py
homeassistant/components/hp_ilo/sensor.py
homeassistant/components/huawei_lte/__init__.py
@@ -786,6 +790,7 @@ omit =
homeassistant/components/nibe_heatpump/select.py
homeassistant/components/nibe_heatpump/sensor.py
homeassistant/components/nibe_heatpump/switch.py
homeassistant/components/nibe_heatpump/water_heater.py
homeassistant/components/niko_home_control/light.py
homeassistant/components/nilu/air_quality.py
homeassistant/components/nissan_leaf/*
@@ -831,6 +836,7 @@ omit =
homeassistant/components/onvif/event.py
homeassistant/components/onvif/parsers.py
homeassistant/components/onvif/sensor.py
homeassistant/components/onvif/util.py
homeassistant/components/open_meteo/weather.py
homeassistant/components/opencv/*
homeassistant/components/openevse/sensor.py
@@ -938,6 +944,7 @@ omit =
homeassistant/components/pushover/notify.py
homeassistant/components/pushsafer/notify.py
homeassistant/components/pyload/sensor.py
homeassistant/components/qbittorrent/__init__.py
homeassistant/components/qbittorrent/sensor.py
homeassistant/components/qnap/sensor.py
homeassistant/components/qrcode/image_processing.py
@@ -995,6 +1002,7 @@ omit =
homeassistant/components/ridwell/switch.py
homeassistant/components/ring/camera.py
homeassistant/components/ripple/sensor.py
homeassistant/components/roborock/coordinator.py
homeassistant/components/rocketchat/notify.py
homeassistant/components/roomba/__init__.py
homeassistant/components/roomba/binary_sensor.py
@@ -1100,7 +1108,9 @@ omit =
homeassistant/components/sms/notify.py
homeassistant/components/sms/sensor.py
homeassistant/components/smtp/notify.py
homeassistant/components/snapcast/*
homeassistant/components/snapcast/__init__.py
homeassistant/components/snapcast/media_player.py
homeassistant/components/snapcast/server.py
homeassistant/components/snmp/device_tracker.py
homeassistant/components/snmp/sensor.py
homeassistant/components/snmp/switch.py
@@ -1285,10 +1295,10 @@ omit =
homeassistant/components/toon/switch.py
homeassistant/components/torque/sensor.py
homeassistant/components/totalconnect/__init__.py
homeassistant/components/totalconnect/binary_sensor.py
homeassistant/components/touchline/climate.py
homeassistant/components/tplink_lte/*
homeassistant/components/tplink_omada/__init__.py
homeassistant/components/tplink_omada/binary_sensor.py
homeassistant/components/tplink_omada/controller.py
homeassistant/components/tplink_omada/coordinator.py
homeassistant/components/tplink_omada/entity.py
@@ -1379,7 +1389,6 @@ omit =
homeassistant/components/verisure/sensor.py
homeassistant/components/verisure/switch.py
homeassistant/components/versasense/*
homeassistant/components/vesync/common.py
homeassistant/components/vesync/fan.py
homeassistant/components/vesync/light.py
homeassistant/components/vesync/sensor.py
@@ -1435,7 +1444,6 @@ omit =
homeassistant/components/xbox/media_player.py
homeassistant/components/xbox/remote.py
homeassistant/components/xbox/sensor.py
homeassistant/components/xbox_live/sensor.py
homeassistant/components/xeoma/camera.py
homeassistant/components/xiaomi/camera.py
homeassistant/components/xiaomi_aqara/__init__.py
@@ -1509,7 +1517,7 @@ omit =
homeassistant/components/zeversolar/entity.py
homeassistant/components/zeversolar/sensor.py
homeassistant/components/zha/websocket_api.py
homeassistant/components/zha/core/channels/*
homeassistant/components/zha/core/cluster_handlers/*
homeassistant/components/zha/core/device.py
homeassistant/components/zha/core/gateway.py
homeassistant/components/zha/core/helpers.py
@@ -1530,6 +1538,8 @@ omit =
homeassistant/components/zwave_me/sensor.py
homeassistant/components/zwave_me/siren.py
homeassistant/components/zwave_me/switch.py
homeassistant/components/electrasmart/climate.py
homeassistant/components/electrasmart/__init__.py
[report]
# Regexes for lines to exclude from consideration

1
.gitattributes vendored
View File

@@ -8,5 +8,6 @@
*.png binary
*.zip binary
*.mp3 binary
*.pcm binary
Dockerfile.dev linguist-language=Dockerfile

View File

@@ -104,8 +104,8 @@ To help with the load of incoming pull requests:
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr

View File

@@ -24,12 +24,12 @@ jobs:
publish: ${{ steps.version.outputs.publish }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
with:
fetch-depth: 0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -62,15 +62,16 @@ jobs:
build_python:
name: Build PyPi package
needs: init
environment: ${{ needs.init.outputs.channel }}
needs: ["init", "build_base"]
runs-on: ubuntu-latest
if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -105,7 +106,7 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Download nightly wheels of frontend
if: needs.init.outputs.channel == 'dev'
@@ -123,7 +124,7 @@ jobs:
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
repo: home-assistant/intents
repo: home-assistant/intents-package
branch: main
workflow: nightly.yaml
workflow_conclusion: success
@@ -131,7 +132,7 @@ jobs:
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
if: needs.init.outputs.channel == 'dev'
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -140,7 +141,7 @@ jobs:
shell: bash
run: |
python3 -m pip install packaging tomli
python3 -m pip install --use-deprecated=legacy-resolver .
python3 -m pip install .
version="$(python3 script/version_bump.py nightly)"
if [[ "$(ls home_assistant_frontend*.whl)" =~ ^home_assistant_frontend-(.*)-py3-none-any.whl$ ]]; then
@@ -174,6 +175,18 @@ jobs:
python -m script.gen_requirements_all
fi
- name: Adjustments for armhf
if: matrix.arch == 'armhf'
run: |
# Pandas has issues building on armhf, it is expected they
# will drop the platform in the near future (they consider it
# "flimsy" on 386). The following packages depend on pandas,
# so we comment them out.
sed -i "s|env_canada|# env_canada|g" requirements_all.txt
sed -i "s|noaa-coops|# noaa-coops|g" requirements_all.txt
sed -i "s|pyezviz|# pyezviz|g" requirements_all.txt
sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt
- name: Download Translations
run: python3 -m script.translations download
env:
@@ -249,7 +262,7 @@ jobs:
- yellow
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set build additional args
run: |
@@ -287,12 +300,13 @@ jobs:
publish_ha:
name: Publish version files
environment: ${{ needs.init.outputs.channel }}
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_machine"]
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
@@ -320,6 +334,7 @@ jobs:
publish_container:
name: Publish meta container for ${{ matrix.registry }}
environment: ${{ needs.init.outputs.channel }}
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_base"]
runs-on: ubuntu-latest
@@ -331,7 +346,7 @@ jobs:
- "homeassistant"
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Login to DockerHub
if: matrix.registry == 'homeassistant'

View File

@@ -1,4 +1,5 @@
name: CI
run-name: "${{ github.event_name == 'workflow_dispatch' && format('CI: {0}', github.ref_name) || '' }}"
# yamllint disable-line rule:truthy
on:
@@ -31,7 +32,7 @@ env:
CACHE_VERSION: 5
PIP_CACHE_VERSION: 4
MYPY_CACHE_VERSION: 4
HA_SHORT_VERSION: 2023.4
HA_SHORT_VERSION: 2023.6
DEFAULT_PYTHON: "3.10"
ALL_PYTHON_VERSIONS: "['3.10', '3.11']"
# 10.3 is the oldest supported version
@@ -40,7 +41,9 @@ env:
# - 10.6.10 is the version currently shipped with the Add-on (as of 31 Jan 2023)
# 10.10 is the latest short-term-support
# - 10.10.3 is the latest (as of 6 Feb 2023)
MARIADB_VERSIONS: "['mariadb:10.3.32','mariadb:10.6.10','mariadb:10.10.3']"
# mysql 8.0.32 does not always behave the same as MariaDB
# and some queries that work on MariaDB do not work on MySQL
MARIADB_VERSIONS: "['mariadb:10.3.32','mariadb:10.6.10','mariadb:10.10.3','mysql:8.0.32']"
# 12 is the oldest supported version
# - 12.14 is the latest (as of 9 Feb 2023)
# 15 is the latest version
@@ -79,7 +82,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Generate partial Python venv restore key
id: generate_python_cache_key
run: >-
@@ -203,10 +206,10 @@ jobs:
- info
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -248,9 +251,9 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -294,9 +297,9 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -343,9 +346,9 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -381,9 +384,9 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -434,6 +437,7 @@ jobs:
shell: bash
run: |
. venv/bin/activate
shopt -s globstar
pre-commit run --hook-stage manual prettier --files {homeassistant,tests}/components/${{ needs.info.outputs.integrations_glob }}/{*,**/*}
- name: Register check executables problem matcher
@@ -487,10 +491,10 @@ jobs:
python-version: ${{ fromJSON(needs.info.outputs.python_versions) }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -539,9 +543,9 @@ jobs:
python -m venv venv
. venv/bin/activate
python --version
pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<23.1" setuptools wheel
pip install --cache-dir=$PIP_CACHE -r requirements_all.txt --use-deprecated=legacy-resolver
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt --use-deprecated=legacy-resolver
pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<23.2" setuptools wheel
pip install --cache-dir=$PIP_CACHE -r requirements_all.txt
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt
pip install -e .
hassfest:
@@ -555,10 +559,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -587,10 +591,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -620,10 +624,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -664,10 +668,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -715,42 +719,6 @@ jobs:
python --version
mypy homeassistant/components/${{ needs.info.outputs.integrations_glob }}
pip-check:
runs-on: ubuntu-22.04
if: |
github.event.inputs.pylint-only != 'true'
&& github.event.inputs.mypy-only != 'true'
needs:
- info
- base
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.info.outputs.python_versions) }}
name: Run pip check ${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.3.1
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Run pip check
run: |
. venv/bin/activate
./script/pip_check $PIP_CACHE
pytest:
runs-on: ubuntu-22.04
if: |
@@ -783,10 +751,10 @@ jobs:
bluez \
ffmpeg
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -909,10 +877,10 @@ jobs:
ffmpeg \
libmariadb-dev-compat
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -1017,10 +985,10 @@ jobs:
ffmpeg \
postgresql-server-dev-14
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -1091,19 +1059,28 @@ jobs:
needs:
- info
- pytest
timeout-minutes: 10
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Download all coverage artifacts
uses: actions/download-artifact@v3
- name: Upload coverage to Codecov (full coverage)
if: needs.info.outputs.test_full_suite == 'true'
uses: codecov/codecov-action@v3.1.1
uses: Wandalen/wretry.action@v1.0.36
with:
fail_ci_if_error: true
flags: full-suite
action: codecov/codecov-action@v3.1.3
with: |
fail_ci_if_error: true
flags: full-suite
attempt_limit: 5
attempt_delay: 30000
- name: Upload coverage to Codecov (partial coverage)
if: needs.info.outputs.test_full_suite == 'false'
uses: codecov/codecov-action@v3.1.1
uses: Wandalen/wretry.action@v1.0.36
with:
fail_ci_if_error: true
action: codecov/codecov-action@v3.1.3
with: |
fail_ci_if_error: true
attempt_limit: 5
attempt_delay: 30000

View File

@@ -19,10 +19,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}

View File

@@ -13,6 +13,10 @@ on:
- "requirements.txt"
- "requirements_all.txt"
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name}}
cancel-in-progress: true
jobs:
init:
name: Initialize wheels builder
@@ -22,7 +26,7 @@ jobs:
architectures: ${{ steps.info.outputs.architectures }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Get information
id: info
@@ -72,17 +76,18 @@ jobs:
path: ./requirements_diff.txt
core:
name: Build musllinux wheels with musllinux_1_2 / cp310 at ${{ matrix.arch }} for core
name: Build Core wheels ${{ matrix.abi }} for ${{ matrix.arch }} (musllinux_1_2)
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
abi: ["cp310", "cp311"]
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Download env_file
uses: actions/download-artifact@v3
@@ -95,9 +100,9 @@ jobs:
name: requirements_diff
- name: Build wheels
uses: home-assistant/wheels@2022.10.1
uses: home-assistant/wheels@2023.04.0
with:
abi: cp310
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
@@ -108,18 +113,19 @@ jobs:
requirements-diff: "requirements_diff.txt"
requirements: "requirements.txt"
integrations:
name: Build musllinux wheels with musllinux_1_2 / cp310 at ${{ matrix.arch }} for integrations
integrations_cp310:
name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }}
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
abi: ["cp310"]
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3.5.2
- name: Download env_file
uses: actions/download-artifact@v3
@@ -171,31 +177,168 @@ jobs:
sed -i "/numpy/d" homeassistant/package_constraints.txt
- name: Build wheels (part 1)
uses: home-assistant/wheels@2022.10.1
uses: home-assistant/wheels@2023.04.0
with:
abi: cp310
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "libexecinfo-dev;bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy
legacy: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtaa"
- name: Build wheels (part 2)
uses: home-assistant/wheels@2022.10.1
uses: home-assistant/wheels@2023.04.0
with:
abi: cp310
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "libexecinfo-dev;bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy
legacy: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtab"
# Wheels building for the cp311 ABI is currently split
# This is mainly until we have figured out to get all wheels built.
# Without harming our current workflow.
integrations_cp311:
name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }}
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
abi: ["cp311"]
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
- name: Write alternative env-file for cp311
run: |
(
echo "GRPC_BUILD_WITH_BORING_SSL_ASM=false"
echo "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true"
echo "GRPC_PYTHON_BUILD_WITH_CYTHON=true"
echo "GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=true"
# GRPC on armv7 needed -lexecinfo (issue #56669) since home assistant installed
# execinfo-dev when building wheels. However, this package is no longer available
# Alpine 3.17, which we use for the cp311 ABI, so the flag should no longer be needed.
echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc" # -lexecinfo
# Fix out of memory issues with rust
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true"
# OpenCV headless installation
echo "CI_BUILD=1"
echo "ENABLE_HEADLESS=1"
# Use C-Extension for sqlalchemy
echo "REQUIRE_SQLALCHEMY_CEXT=1"
) > .env_file
- name: Download requirements_diff
uses: actions/download-artifact@v3
with:
name: requirements_diff
- name: (Un)comment packages
run: |
requirement_files="requirements_all.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
# PyBluez no longer compiles. Commented it out for now.
# It need further cleanup down the line, as all machine images
# try to install it.
# sed -i "s|# pybluez|pybluez|g" ${requirement_file}
# beacontools requires PyBluez.
# sed -i "s|# beacontools|beacontools|g" ${requirement_file}
# It doesn't build for some reason, so we skip it for now.
# Bumping to the latest version (4.7.0.72) supporting Python 3.11
# doesn't help. Reverted bump in #91871. There are 8 registered
# instances using this integration according to analytics.
# sed -i "s|# opencv-python-headless|opencv-python-headless|g" ${requirement_file}
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
sed -i "s|# evdev|evdev|g" ${requirement_file}
sed -i "s|# pycups|pycups|g" ${requirement_file}
sed -i "s|# homekit|homekit|g" ${requirement_file}
sed -i "s|# decora_wifi|decora_wifi|g" ${requirement_file}
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
# Some packages are not buildable on armhf anymore
if [ "${{ matrix.arch }}" = "armhf" ]; then
# Pandas has issues building on armhf, it is expected they
# will drop the platform in the near future (they consider it
# "flimsy" on 386). The following packages depend on pandas,
# so we comment them out.
sed -i "s|env_canada|# env_canada|g" ${requirement_file}
sed -i "s|noaa-coops|# noaa-coops|g" ${requirement_file}
sed -i "s|pyezviz|# pyezviz|g" ${requirement_file}
sed -i "s|pykrakenapi|# pykrakenapi|g" ${requirement_file}
fi
done
- name: Split requirements all
run: |
# We split requirements all into two different files.
# This is to prevent the build from running out of memory when
# resolving packages on 32-bits systems (like armhf, armv7).
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 2) requirements_all.txt requirements_all.txt
- name: Adjust build env
run: |
if [ "${{ matrix.arch }}" = "i386" ]; then
echo "NPY_DISABLE_SVML=1" >> .env_file
fi
# Probably not an issue anymore. Removing for now.
# (
# # cmake > 3.22.2 have issue on arm
# # Tested until 3.22.5
# echo "cmake==3.22.2"
# ) >> homeassistant/package_constraints.txt
# Do not pin numpy in wheels building
sed -i "/numpy/d" homeassistant/package_constraints.txt
- name: Build wheels (part 1)
uses: home-assistant/wheels@2023.04.0
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtaa"
- name: Build wheels (part 2)
uses: home-assistant/wheels@2023.04.0
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtab"

View File

@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.256
rev: v0.0.262
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
args:

View File

@@ -49,6 +49,7 @@ homeassistant.components.air_quality.*
homeassistant.components.airly.*
homeassistant.components.airvisual.*
homeassistant.components.airzone.*
homeassistant.components.airzone_cloud.*
homeassistant.components.aladdin_connect.*
homeassistant.components.alarm_control_panel.*
homeassistant.components.alert.*
@@ -57,10 +58,12 @@ homeassistant.components.ambient_station.*
homeassistant.components.amcrest.*
homeassistant.components.ampio.*
homeassistant.components.analytics.*
homeassistant.components.anova.*
homeassistant.components.anthemav.*
homeassistant.components.apcupsd.*
homeassistant.components.aqualogic.*
homeassistant.components.aseko_pool_live.*
homeassistant.components.assist_pipeline.*
homeassistant.components.asuswrt.*
homeassistant.components.auth.*
homeassistant.components.automation.*
@@ -84,6 +87,7 @@ homeassistant.components.camera.*
homeassistant.components.canary.*
homeassistant.components.clickatell.*
homeassistant.components.clicksend.*
homeassistant.components.cloud.*
homeassistant.components.configurator.*
homeassistant.components.cover.*
homeassistant.components.cpuspeed.*
@@ -103,6 +107,7 @@ homeassistant.components.dormakaba_dkey.*
homeassistant.components.dsmr.*
homeassistant.components.dunehd.*
homeassistant.components.efergy.*
homeassistant.components.electrasmart.*
homeassistant.components.elgato.*
homeassistant.components.elkm1.*
homeassistant.components.emulated_hue.*
@@ -137,6 +142,7 @@ homeassistant.components.hardkernel.*
homeassistant.components.hardware.*
homeassistant.components.here_travel_time.*
homeassistant.components.history.*
homeassistant.components.homeassistant.exposed_entities
homeassistant.components.homeassistant.triggers.event
homeassistant.components.homeassistant_alerts.*
homeassistant.components.homeassistant_hardware.*
@@ -163,10 +169,12 @@ homeassistant.components.homekit_controller.utils
homeassistant.components.homewizard.*
homeassistant.components.http.*
homeassistant.components.huawei_lte.*
homeassistant.components.hydrawise.*
homeassistant.components.hyperion.*
homeassistant.components.ibeacon.*
homeassistant.components.image_processing.*
homeassistant.components.image_upload.*
homeassistant.components.imap.*
homeassistant.components.input_button.*
homeassistant.components.input_select.*
homeassistant.components.integration.*
@@ -174,6 +182,7 @@ homeassistant.components.iqvia.*
homeassistant.components.isy994.*
homeassistant.components.jellyfin.*
homeassistant.components.jewish_calendar.*
homeassistant.components.jvc_projector.*
homeassistant.components.kaleidescape.*
homeassistant.components.knx.*
homeassistant.components.kraken.*
@@ -227,6 +236,7 @@ homeassistant.components.oncue.*
homeassistant.components.onewire.*
homeassistant.components.open_meteo.*
homeassistant.components.openexchangerates.*
homeassistant.components.opensky.*
homeassistant.components.openuv.*
homeassistant.components.otbr.*
homeassistant.components.overkiz.*
@@ -281,6 +291,7 @@ homeassistant.components.smhi.*
homeassistant.components.snooz.*
homeassistant.components.sonarr.*
homeassistant.components.speedtestdotnet.*
homeassistant.components.sql.*
homeassistant.components.ssdp.*
homeassistant.components.statistics.*
homeassistant.components.steamist.*

4
.vscode/launch.json vendored
View File

@@ -23,7 +23,7 @@
"preLaunchTask": "Compile English translations"
},
{
// Debug by attaching to local Home Asistant server using Remote Python Debugger.
// Debug by attaching to local Home Assistant server using Remote Python Debugger.
// See https://www.home-assistant.io/integrations/debugpy/
"name": "Home Assistant: Attach Local",
"type": "python",
@@ -38,7 +38,7 @@
]
},
{
// Debug by attaching to remote Home Asistant server using Remote Python Debugger.
// Debug by attaching to remote Home Assistant server using Remote Python Debugger.
// See https://www.home-assistant.io/integrations/debugpy/
"name": "Home Assistant: Attach Remote",
"type": "python",

41
.vscode/tasks.json vendored
View File

@@ -103,7 +103,7 @@
{
"label": "Install all Requirements",
"type": "shell",
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_all.txt",
"command": "pip3 install -r requirements_all.txt",
"group": {
"kind": "build",
"isDefault": true
@@ -117,7 +117,7 @@
{
"label": "Install all Test Requirements",
"type": "shell",
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_test_all.txt",
"command": "pip3 install -r requirements_test_all.txt",
"group": {
"kind": "build",
"isDefault": true
@@ -137,6 +137,26 @@
"kind": "build",
"isDefault": true
}
},
{
"label": "Run scaffold",
"detail": "Add new functionality to a integration using a scaffold.",
"type": "shell",
"command": "python3 -m script.scaffold ${input:scaffoldName} --integration ${input:integrationName}",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Create new integration",
"detail": "Use the scaffold to create a new integration.",
"type": "shell",
"command": "python3 -m script.scaffold integration",
"group": {
"kind": "build",
"isDefault": true
}
}
],
"inputs": [
@@ -144,6 +164,23 @@
"id": "integrationName",
"type": "promptString",
"description": "For which integration should the task run?"
},
{
"id": "scaffoldName",
"type": "pickString",
"options": [
"backup",
"config_flow",
"config_flow_discovery",
"config_flow_helper",
"config_flow_oauth2",
"device_action",
"device_condition",
"device_trigger",
"reproduce_state",
"significant_change"
],
"description": "Which scaffold should be run?"
}
]
}

View File

@@ -59,6 +59,8 @@ build.json @home-assistant/supervisor
/tests/components/airvisual_pro/ @bachya
/homeassistant/components/airzone/ @Noltari
/tests/components/airzone/ @Noltari
/homeassistant/components/airzone_cloud/ @Noltari
/tests/components/airzone_cloud/ @Noltari
/homeassistant/components/aladdin_connect/ @mkmer
/tests/components/aladdin_connect/ @mkmer
/homeassistant/components/alarm_control_panel/ @home-assistant/core
@@ -80,6 +82,10 @@ build.json @home-assistant/supervisor
/tests/components/android_ip_webcam/ @engrbm87
/homeassistant/components/androidtv/ @JeffLIrion @ollo69
/tests/components/androidtv/ @JeffLIrion @ollo69
/homeassistant/components/androidtv_remote/ @tronikos @Drafteed
/tests/components/androidtv_remote/ @tronikos @Drafteed
/homeassistant/components/anova/ @Lash-L
/tests/components/anova/ @Lash-L
/homeassistant/components/anthemav/ @hyralex
/tests/components/anthemav/ @hyralex
/homeassistant/components/apache_kafka/ @bachya
@@ -103,6 +109,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/arris_tg2492lg/ @vanbalken
/homeassistant/components/aseko_pool_live/ @milanmeu
/tests/components/aseko_pool_live/ @milanmeu
/homeassistant/components/assist_pipeline/ @balloob @synesthesiam
/tests/components/assist_pipeline/ @balloob @synesthesiam
/homeassistant/components/asuswrt/ @kennedyshead @ollo69
/tests/components/asuswrt/ @kennedyshead @ollo69
/homeassistant/components/atag/ @MatsNL
@@ -168,6 +176,8 @@ build.json @home-assistant/supervisor
/tests/components/broadlink/ @danielhiversen @felipediel @L-I-Am
/homeassistant/components/brother/ @bieniu
/tests/components/brother/ @bieniu
/homeassistant/components/brottsplatskartan/ @gjohansson-ST
/tests/components/brottsplatskartan/ @gjohansson-ST
/homeassistant/components/brunt/ @eavanvalkenburg
/tests/components/brunt/ @eavanvalkenburg
/homeassistant/components/bsblan/ @liudger
@@ -203,6 +213,8 @@ build.json @home-assistant/supervisor
/tests/components/color_extractor/ @GenericStudent
/homeassistant/components/comfoconnect/ @michaelarnauts
/tests/components/comfoconnect/ @michaelarnauts
/homeassistant/components/command_line/ @gjohansson-ST
/tests/components/command_line/ @gjohansson-ST
/homeassistant/components/compensation/ @Petro31
/tests/components/compensation/ @Petro31
/homeassistant/components/config/ @home-assistant/core
@@ -215,8 +227,6 @@ build.json @home-assistant/supervisor
/tests/components/conversation/ @home-assistant/core @synesthesiam
/homeassistant/components/coolmaster/ @OnFreund
/tests/components/coolmaster/ @OnFreund
/homeassistant/components/coronavirus/ @home-assistant/core
/tests/components/coronavirus/ @home-assistant/core
/homeassistant/components/counter/ @fabaff
/tests/components/counter/ @fabaff
/homeassistant/components/cover/ @home-assistant/core
@@ -228,6 +238,10 @@ build.json @home-assistant/supervisor
/homeassistant/components/cups/ @fabaff
/homeassistant/components/daikin/ @fredrike
/tests/components/daikin/ @fredrike
/homeassistant/components/date/ @home-assistant/core
/tests/components/date/ @home-assistant/core
/homeassistant/components/datetime/ @home-assistant/core
/tests/components/datetime/ @home-assistant/core
/homeassistant/components/debugpy/ @frenck
/tests/components/debugpy/ @frenck
/homeassistant/components/deconz/ @Kane610
@@ -281,7 +295,8 @@ build.json @home-assistant/supervisor
/tests/components/dsmr_reader/ @depl0y @glodenox
/homeassistant/components/dunehd/ @bieniu
/tests/components/dunehd/ @bieniu
/homeassistant/components/dwd_weather_warnings/ @runningman84 @stephan192 @Hummel95
/homeassistant/components/dwd_weather_warnings/ @runningman84 @stephan192 @Hummel95 @andarotajo
/tests/components/dwd_weather_warnings/ @runningman84 @stephan192 @Hummel95 @andarotajo
/homeassistant/components/dynalite/ @ziv1234
/tests/components/dynalite/ @ziv1234
/homeassistant/components/eafm/ @Jc2k
@@ -300,6 +315,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/egardia/ @jeroenterheerdt
/homeassistant/components/eight_sleep/ @mezz64 @raman325
/tests/components/eight_sleep/ @mezz64 @raman325
/homeassistant/components/electrasmart/ @jafar-atili
/tests/components/electrasmart/ @jafar-atili
/homeassistant/components/elgato/ @frenck
/tests/components/elgato/ @frenck
/homeassistant/components/elkm1/ @gwww @bdraco
@@ -442,6 +459,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/google_assistant_sdk/ @tronikos
/tests/components/google_assistant_sdk/ @tronikos
/homeassistant/components/google_cloud/ @lufton
/homeassistant/components/google_generative_ai_conversation/ @tronikos
/tests/components/google_generative_ai_conversation/ @tronikos
/homeassistant/components/google_mail/ @tkdrob
/tests/components/google_mail/ @tkdrob
/homeassistant/components/google_sheets/ @tkdrob
@@ -526,7 +545,7 @@ build.json @home-assistant/supervisor
/tests/components/hunterdouglas_powerview/ @bdraco @kingy444 @trullock
/homeassistant/components/hvv_departures/ @vigonotion
/tests/components/hvv_departures/ @vigonotion
/homeassistant/components/hydrawise/ @ptcryan
/homeassistant/components/hydrawise/ @dknowles2 @ptcryan
/homeassistant/components/hyperion/ @dermotduffy
/tests/components/hyperion/ @dermotduffy
/homeassistant/components/ialarm/ @RyuzakiKK
@@ -544,8 +563,8 @@ build.json @home-assistant/supervisor
/tests/components/image_processing/ @home-assistant/core
/homeassistant/components/image_upload/ @home-assistant/core
/tests/components/image_upload/ @home-assistant/core
/homeassistant/components/imap/ @engrbm87
/tests/components/imap/ @engrbm87
/homeassistant/components/imap/ @engrbm87 @jbouwh
/tests/components/imap/ @engrbm87 @jbouwh
/homeassistant/components/incomfort/ @zxdavb
/homeassistant/components/influxdb/ @mdegat01
/tests/components/influxdb/ @mdegat01
@@ -600,6 +619,8 @@ build.json @home-assistant/supervisor
/tests/components/juicenet/ @jesserockz
/homeassistant/components/justnimbus/ @kvanzuijlen
/tests/components/justnimbus/ @kvanzuijlen
/homeassistant/components/jvc_projector/ @SteveEasley
/tests/components/jvc_projector/ @SteveEasley
/homeassistant/components/kaiterra/ @Michsior14
/homeassistant/components/kaleidescape/ @SteveEasley
/tests/components/kaleidescape/ @SteveEasley
@@ -634,6 +655,8 @@ build.json @home-assistant/supervisor
/tests/components/lametric/ @robbiet480 @frenck @bachya
/homeassistant/components/landisgyr_heat_meter/ @vpathuis
/tests/components/landisgyr_heat_meter/ @vpathuis
/homeassistant/components/lastfm/ @joostlek
/tests/components/lastfm/ @joostlek
/homeassistant/components/launch_library/ @ludeeus @DurgNomis-drol
/tests/components/launch_library/ @ludeeus @DurgNomis-drol
/homeassistant/components/laundrify/ @xLarry
@@ -649,8 +672,8 @@ build.json @home-assistant/supervisor
/tests/components/lidarr/ @tkdrob
/homeassistant/components/life360/ @pnbruckner
/tests/components/life360/ @pnbruckner
/homeassistant/components/lifx/ @bdraco @Djelibeybi
/tests/components/lifx/ @bdraco @Djelibeybi
/homeassistant/components/lifx/ @bdraco
/tests/components/lifx/ @bdraco
/homeassistant/components/light/ @home-assistant/core
/tests/components/light/ @home-assistant/core
/homeassistant/components/linux_battery/ @fabaff
@@ -777,6 +800,7 @@ build.json @home-assistant/supervisor
/homeassistant/components/netdata/ @fabaff
/homeassistant/components/netgear/ @hacf-fr @Quentame @starkillerOG
/tests/components/netgear/ @hacf-fr @Quentame @starkillerOG
/homeassistant/components/netgear_lte/ @tkdrob
/homeassistant/components/network/ @home-assistant/core
/tests/components/network/ @home-assistant/core
/homeassistant/components/nexia/ @bdraco
@@ -819,8 +843,8 @@ build.json @home-assistant/supervisor
/tests/components/numato/ @clssn
/homeassistant/components/number/ @home-assistant/core @Shulyaka
/tests/components/number/ @home-assistant/core @Shulyaka
/homeassistant/components/nut/ @bdraco @ollo69
/tests/components/nut/ @bdraco @ollo69
/homeassistant/components/nut/ @bdraco @ollo69 @pestevez
/tests/components/nut/ @bdraco @ollo69 @pestevez
/homeassistant/components/nws/ @MatthewFlamm @kamiyo
/tests/components/nws/ @MatthewFlamm @kamiyo
/homeassistant/components/nzbget/ @chriscla
@@ -854,6 +878,7 @@ build.json @home-assistant/supervisor
/homeassistant/components/opengarage/ @danielhiversen
/tests/components/opengarage/ @danielhiversen
/homeassistant/components/openhome/ @bazwilliams
/homeassistant/components/opensky/ @joostlek
/homeassistant/components/opentherm_gw/ @mvn23
/tests/components/opentherm_gw/ @mvn23
/homeassistant/components/openuv/ @bachya
@@ -893,8 +918,8 @@ build.json @home-assistant/supervisor
/tests/components/plaato/ @JohNan
/homeassistant/components/plex/ @jjlawren
/tests/components/plex/ @jjlawren
/homeassistant/components/plugwise/ @CoMPaTech @bouwew @brefra @frenck
/tests/components/plugwise/ @CoMPaTech @bouwew @brefra @frenck
/homeassistant/components/plugwise/ @CoMPaTech @bouwew @frenck
/tests/components/plugwise/ @CoMPaTech @bouwew @frenck
/homeassistant/components/plum_lightpad/ @ColinHarrington @prystupa
/tests/components/plum_lightpad/ @ColinHarrington @prystupa
/homeassistant/components/point/ @fredrike
@@ -931,6 +956,7 @@ build.json @home-assistant/supervisor
/homeassistant/components/pvpc_hourly_pricing/ @azogue
/tests/components/pvpc_hourly_pricing/ @azogue
/homeassistant/components/qbittorrent/ @geoffreylagaisse
/tests/components/qbittorrent/ @geoffreylagaisse
/homeassistant/components/qingping/ @bdraco @skgsergio
/tests/components/qingping/ @bdraco @skgsergio
/homeassistant/components/qld_bushfire/ @exxamalte
@@ -947,8 +973,8 @@ build.json @home-assistant/supervisor
/tests/components/radarr/ @tkdrob
/homeassistant/components/radio_browser/ @frenck
/tests/components/radio_browser/ @frenck
/homeassistant/components/radiotherm/ @bdraco @vinnyfuria
/tests/components/radiotherm/ @bdraco @vinnyfuria
/homeassistant/components/radiotherm/ @vinnyfuria
/tests/components/radiotherm/ @vinnyfuria
/homeassistant/components/rainbird/ @konikvranik @allenporter
/tests/components/rainbird/ @konikvranik @allenporter
/homeassistant/components/raincloud/ @vanstinator
@@ -958,6 +984,8 @@ build.json @home-assistant/supervisor
/tests/components/rainmachine/ @bachya
/homeassistant/components/random/ @fabaff
/tests/components/random/ @fabaff
/homeassistant/components/rapt_ble/ @sairon
/tests/components/rapt_ble/ @sairon
/homeassistant/components/raspberry_pi/ @home-assistant/core
/tests/components/raspberry_pi/ @home-assistant/core
/homeassistant/components/rdw/ @frenck
@@ -976,6 +1004,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/repairs/ @home-assistant/core
/tests/components/repairs/ @home-assistant/core
/homeassistant/components/repetier/ @MTrab @ShadowBr0ther
/homeassistant/components/rest/ @epenet
/tests/components/rest/ @epenet
/homeassistant/components/rflink/ @javicalle
/tests/components/rflink/ @javicalle
/homeassistant/components/rfxtrx/ @danielhiversen @elupus @RobBie1221
@@ -986,10 +1016,12 @@ build.json @home-assistant/supervisor
/tests/components/ridwell/ @bachya
/homeassistant/components/risco/ @OnFreund
/tests/components/risco/ @OnFreund
/homeassistant/components/rituals_perfume_genie/ @milanmeu
/tests/components/rituals_perfume_genie/ @milanmeu
/homeassistant/components/rituals_perfume_genie/ @milanmeu @frenck
/tests/components/rituals_perfume_genie/ @milanmeu @frenck
/homeassistant/components/rmvtransport/ @cgtobi
/tests/components/rmvtransport/ @cgtobi
/homeassistant/components/roborock/ @humbertogontijo @Lash-L
/tests/components/roborock/ @humbertogontijo @Lash-L
/homeassistant/components/roku/ @ctalkington
/tests/components/roku/ @ctalkington
/homeassistant/components/roomba/ @pschmitt @cyr-ius @shenxn
@@ -1080,8 +1112,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/sky_hub/ @rogerselwyn
/homeassistant/components/skybell/ @tkdrob
/tests/components/skybell/ @tkdrob
/homeassistant/components/slack/ @bachya @tkdrob
/tests/components/slack/ @bachya @tkdrob
/homeassistant/components/slack/ @tkdrob
/tests/components/slack/ @tkdrob
/homeassistant/components/sleepiq/ @mfugate1 @kbickar
/tests/components/sleepiq/ @mfugate1 @kbickar
/homeassistant/components/slide/ @ualex73
@@ -1102,6 +1134,7 @@ build.json @home-assistant/supervisor
/tests/components/smhi/ @gjohansson-ST
/homeassistant/components/sms/ @ocalvo
/homeassistant/components/snapcast/ @luar123
/tests/components/snapcast/ @luar123
/homeassistant/components/snooz/ @AustinBrunkhorst
/tests/components/snooz/ @AustinBrunkhorst
/homeassistant/components/solaredge/ @frenck
@@ -1130,8 +1163,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/splunk/ @Bre77
/homeassistant/components/spotify/ @frenck
/tests/components/spotify/ @frenck
/homeassistant/components/sql/ @dgomes @gjohansson-ST
/tests/components/sql/ @dgomes @gjohansson-ST
/homeassistant/components/sql/ @gjohansson-ST @dougiteixeira
/tests/components/sql/ @gjohansson-ST @dougiteixeira
/homeassistant/components/squeezebox/ @rajlaud
/tests/components/squeezebox/ @rajlaud
/homeassistant/components/srp_energy/ @briglx
@@ -1153,8 +1186,8 @@ build.json @home-assistant/supervisor
/tests/components/stookwijzer/ @fwestenberg
/homeassistant/components/stream/ @hunterjm @uvjustin @allenporter
/tests/components/stream/ @hunterjm @uvjustin @allenporter
/homeassistant/components/stt/ @pvizeli
/tests/components/stt/ @pvizeli
/homeassistant/components/stt/ @home-assistant/core @pvizeli
/tests/components/stt/ @home-assistant/core @pvizeli
/homeassistant/components/subaru/ @G-Two
/tests/components/subaru/ @G-Two
/homeassistant/components/suez_water/ @ooii
@@ -1173,8 +1206,8 @@ build.json @home-assistant/supervisor
/tests/components/switchbee/ @jafar-atili
/homeassistant/components/switchbot/ @bdraco @danielhiversen @RenierM26 @murtas @Eloston @dsypniewski
/tests/components/switchbot/ @bdraco @danielhiversen @RenierM26 @murtas @Eloston @dsypniewski
/homeassistant/components/switcher_kis/ @tomerfi @thecode
/tests/components/switcher_kis/ @tomerfi @thecode
/homeassistant/components/switcher_kis/ @thecode
/tests/components/switcher_kis/ @thecode
/homeassistant/components/switchmate/ @danielhiversen @qiz-li
/homeassistant/components/syncthing/ @zhulik
/tests/components/syncthing/ @zhulik
@@ -1185,8 +1218,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/synology_srm/ @aerialls
/homeassistant/components/system_bridge/ @timmo001
/tests/components/system_bridge/ @timmo001
/homeassistant/components/tado/ @michaelarnauts
/tests/components/tado/ @michaelarnauts
/homeassistant/components/tado/ @michaelarnauts @chiefdragon
/tests/components/tado/ @michaelarnauts @chiefdragon
/homeassistant/components/tag/ @balloob @dmulcahey
/tests/components/tag/ @balloob @dmulcahey
/homeassistant/components/tailscale/ @frenck
@@ -1220,6 +1253,8 @@ build.json @home-assistant/supervisor
/tests/components/tile/ @bachya
/homeassistant/components/tilt_ble/ @apt-itude
/tests/components/tilt_ble/ @apt-itude
/homeassistant/components/time/ @home-assistant/core
/tests/components/time/ @home-assistant/core
/homeassistant/components/time_date/ @fabaff
/tests/components/time_date/ @fabaff
/homeassistant/components/tmb/ @alemuro
@@ -1249,8 +1284,8 @@ build.json @home-assistant/supervisor
/tests/components/trafikverket_weatherstation/ @endor-force @gjohansson-ST
/homeassistant/components/transmission/ @engrbm87 @JPHutchins
/tests/components/transmission/ @engrbm87 @JPHutchins
/homeassistant/components/tts/ @pvizeli
/tests/components/tts/ @pvizeli
/homeassistant/components/tts/ @home-assistant/core @pvizeli
/tests/components/tts/ @home-assistant/core @pvizeli
/homeassistant/components/tuya/ @Tuya @zlinoliver @frenck
/tests/components/tuya/ @Tuya @zlinoliver @frenck
/homeassistant/components/twentemilieu/ @frenck
@@ -1262,8 +1297,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/unifi/ @Kane610
/tests/components/unifi/ @Kane610
/homeassistant/components/unifiled/ @florisvdk
/homeassistant/components/unifiprotect/ @briis @AngellusMortis @bdraco
/tests/components/unifiprotect/ @briis @AngellusMortis @bdraco
/homeassistant/components/unifiprotect/ @AngellusMortis @bdraco
/tests/components/unifiprotect/ @AngellusMortis @bdraco
/homeassistant/components/upb/ @gwww
/tests/components/upb/ @gwww
/homeassistant/components/upc_connect/ @pvizeli @fabaff
@@ -1299,8 +1334,6 @@ build.json @home-assistant/supervisor
/tests/components/version/ @ludeeus
/homeassistant/components/vesync/ @markperdue @webdjoe @thegardenmonkey
/tests/components/vesync/ @markperdue @webdjoe @thegardenmonkey
/homeassistant/components/vicare/ @oischinger
/tests/components/vicare/ @oischinger
/homeassistant/components/vilfo/ @ManneW
/tests/components/vilfo/ @ManneW
/homeassistant/components/vivotek/ @HarlemSquirrel
@@ -1308,8 +1341,8 @@ build.json @home-assistant/supervisor
/tests/components/vizio/ @raman325
/homeassistant/components/vlc_telnet/ @rodripf @MartinHjelmare
/tests/components/vlc_telnet/ @rodripf @MartinHjelmare
/homeassistant/components/voice_assistant/ @balloob @synesthesiam
/tests/components/voice_assistant/ @balloob @synesthesiam
/homeassistant/components/voip/ @balloob @synesthesiam
/tests/components/voip/ @balloob @synesthesiam
/homeassistant/components/volumio/ @OnFreund
/tests/components/volumio/ @OnFreund
/homeassistant/components/volvooncall/ @molobrakos
@@ -1361,9 +1394,10 @@ build.json @home-assistant/supervisor
/tests/components/worldclock/ @fabaff
/homeassistant/components/ws66i/ @ssaenger
/tests/components/ws66i/ @ssaenger
/homeassistant/components/wyoming/ @balloob @synesthesiam
/tests/components/wyoming/ @balloob @synesthesiam
/homeassistant/components/xbox/ @hunterjm
/tests/components/xbox/ @hunterjm
/homeassistant/components/xbox_live/ @MartinHjelmare
/homeassistant/components/xiaomi_aqara/ @danielhiversen @syssi
/tests/components/xiaomi_aqara/ @danielhiversen @syssi
/homeassistant/components/xiaomi_ble/ @Jc2k @Ernst79
@@ -1388,6 +1422,8 @@ build.json @home-assistant/supervisor
/tests/components/yolink/ @matrixd2
/homeassistant/components/youless/ @gjong
/tests/components/youless/ @gjong
/homeassistant/components/youtube/ @joostlek
/tests/components/youtube/ @joostlek
/homeassistant/components/zamg/ @killer0071234
/tests/components/zamg/ @killer0071234
/homeassistant/components/zengge/ @emontnemery

View File

@@ -132,8 +132,8 @@ For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
[coc-blog]: /blog/2017/01/21/home-assistant-governance/
[coc2-blog]: /blog/2020/05/25/code-of-conduct-updated/
[coc-blog]: https://www.home-assistant.io/blog/2017/01/21/home-assistant-governance/
[coc2-blog]: https://www.home-assistant.io/blog/2020/05/25/code-of-conduct-updated/
[email]: mailto:safety@home-assistant.io
[homepage]: http://contributor-covenant.org
[mozilla]: https://github.com/mozilla/diversity

View File

@@ -18,7 +18,6 @@ RUN \
--no-index \
--only-binary=:all: \
--find-links "${WHEELS_LINKS}" \
--use-deprecated=legacy-resolver \
-r homeassistant/requirements.txt
COPY requirements_all.txt home_assistant_frontend-* home_assistant_intents-* homeassistant/
@@ -43,7 +42,6 @@ RUN \
--no-index \
--only-binary=:all: \
--find-links "${WHEELS_LINKS}" \
--use-deprecated=legacy-resolver \
-r homeassistant/requirements_all.txt
## Setup Home Assistant Core
@@ -54,7 +52,6 @@ RUN \
--no-index \
--only-binary=:all: \
--find-links "${WHEELS_LINKS}" \
--use-deprecated=legacy-resolver \
-e ./homeassistant \
&& python3 -m compileall \
homeassistant/homeassistant

View File

@@ -4,11 +4,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Uninstall pre-installed formatting and linting tools
# They would conflict with our pinned versions
RUN pipx uninstall black
RUN pipx uninstall pydocstyle
RUN pipx uninstall pycodestyle
RUN pipx uninstall mypy
RUN pipx uninstall pylint
RUN \
pipx uninstall black \
&& pipx uninstall pydocstyle \
&& pipx uninstall pycodestyle \
&& pipx uninstall mypy \
&& pipx uninstall pylint
RUN \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
@@ -44,9 +45,9 @@ WORKDIR /workspaces
# Install Python dependencies from requirements
COPY requirements.txt ./
COPY homeassistant/package_constraints.txt homeassistant/package_constraints.txt
RUN pip3 install -r requirements.txt --use-deprecated=legacy-resolver
RUN pip3 install -r requirements.txt
COPY requirements_test.txt requirements_test_pre_commit.txt ./
RUN pip3 install -r requirements_test.txt --use-deprecated=legacy-resolver
RUN pip3 install -r requirements_test.txt
RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/
# Set the default shell to bash instead of sh

View File

@@ -1,11 +1,11 @@
image: homeassistant/{arch}-homeassistant
shadow_repository: ghcr.io/home-assistant
build_from:
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2023.02.0
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2023.02.0
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2023.02.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2023.02.0
i386: ghcr.io/home-assistant/i386-homeassistant-base:2023.02.0
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2023.06.0
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2023.06.0
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2023.06.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2023.06.0
i386: ghcr.io/home-assistant/i386-homeassistant-base:2023.06.0
codenotary:
signer: notary@home-assistant.io
base_image: notary@home-assistant.io

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 164 KiB

View File

@@ -93,7 +93,7 @@ class _PyJWTWithVerify(PyJWT):
# nothing slips through.
assert "exp" in payload, "exp claim is required"
assert "iat" in payload, "iat claim is required"
self._validate_claims( # type: ignore[no-untyped-call]
self._validate_claims(
payload=payload,
options=merged_options,
issuer=issuer,
@@ -102,7 +102,7 @@ class _PyJWTWithVerify(PyJWT):
return payload
_jwt = _PyJWTWithVerify() # type: ignore[no-untyped-call]
_jwt = _PyJWTWithVerify()
verify_and_decode = _jwt.verify_and_decode
unverified_hs256_token_decode = lru_cache(maxsize=JWT_TOKEN_CACHE_SIZE)(
partial(

View File

@@ -46,7 +46,7 @@ CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend(
[
vol.Or(
cv.uuid4_hex,
vol.Schema({vol.Required(CONF_GROUP): cv.uuid4_hex}),
vol.Schema({vol.Required(CONF_GROUP): str}),
)
],
)

View File

@@ -19,6 +19,7 @@ import yarl
from . import config as conf_util, config_entries, core, loader
from .components import http
from .const import (
FORMAT_DATETIME,
REQUIRED_NEXT_PYTHON_HA_RELEASE,
REQUIRED_NEXT_PYTHON_VER,
SIGNAL_BOOTSTRAP_INTEGRATIONS,
@@ -31,6 +32,7 @@ from .helpers import (
entity_registry,
issue_registry,
recorder,
restore_state,
template,
)
from .helpers.dispatcher import async_dispatcher_send
@@ -247,6 +249,7 @@ async def load_registries(hass: core.HomeAssistant) -> None:
issue_registry.async_load(hass),
hass.async_add_executor_job(_cache_uname_processor),
template.async_load_custom_templates(hass),
restore_state.async_load(hass),
)
@@ -347,7 +350,6 @@ def async_enable_logging(
fmt = (
"%(asctime)s.%(msecs)03d %(levelname)s (%(threadName)s) [%(name)s] %(message)s"
)
datefmt = "%Y-%m-%d %H:%M:%S"
if not log_no_color:
try:
@@ -362,7 +364,7 @@ def async_enable_logging(
logging.getLogger().handlers[0].setFormatter(
ColoredFormatter(
colorfmt,
datefmt=datefmt,
datefmt=FORMAT_DATETIME,
reset=True,
log_colors={
"DEBUG": "cyan",
@@ -378,12 +380,18 @@ def async_enable_logging(
# If the above initialization failed for any reason, setup the default
# formatting. If the above succeeds, this will result in a no-op.
logging.basicConfig(format=fmt, datefmt=datefmt, level=logging.INFO)
logging.basicConfig(format=fmt, datefmt=FORMAT_DATETIME, level=logging.INFO)
# Capture warnings.warn(...) and friends messages in logs.
# The standard destination for them is stderr, which may end up unnoticed.
# This way they're where other messages are, and can be filtered as usual.
logging.captureWarnings(True)
# Suppress overly verbose logs from libraries that aren't helpful
logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("aiohttp.access").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.WARNING)
sys.excepthook = lambda *args: logging.getLogger(None).exception(
"Uncaught exception", exc_info=args # type: ignore[arg-type]
@@ -430,7 +438,7 @@ def async_enable_logging(
_LOGGER.error("Error rolling over log file: %s", err)
err_handler.setLevel(logging.INFO if verbose else logging.WARNING)
err_handler.setFormatter(logging.Formatter(fmt, datefmt=datefmt))
err_handler.setFormatter(logging.Formatter(fmt, datefmt=FORMAT_DATETIME))
logger = logging.getLogger("")
logger.addHandler(err_handler)
@@ -629,6 +637,9 @@ async def _async_set_up_integrations(
- stage_1_domains
)
# 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)
@@ -640,7 +651,7 @@ async def _async_set_up_integrations(
except asyncio.TimeoutError:
_LOGGER.warning("Setup timed out for stage 1 - moving forward")
# Enables after dependencies
# Add after dependencies when setting up stage 2 domains
async_set_domains_to_be_loaded(hass, stage_2_domains)
if stage_2_domains:

View File

@@ -0,0 +1,5 @@
{
"domain": "airzone",
"name": "Airzone",
"integrations": ["airzone", "airzone_cloud"]
}

View File

@@ -6,6 +6,7 @@
"google_assistant_sdk",
"google_cloud",
"google_domains",
"google_generative_ai_conversation",
"google_mail",
"google_maps",
"google_pubsub",
@@ -16,6 +17,7 @@
"google",
"nest",
"cast",
"dialogflow"
"dialogflow",
"youtube"
]
}

View File

@@ -10,7 +10,6 @@
"microsoft_face",
"microsoft",
"msteams",
"xbox",
"xbox_live"
"xbox"
]
}

View File

@@ -1,5 +1,5 @@
{
"domain": "yale",
"name": "Yale",
"integrations": ["august", "yale_smart_alarm", "yalexs_ble"]
"integrations": ["august", "yale_smart_alarm", "yalexs_ble", "yale_home"]
}

View File

@@ -12,6 +12,7 @@ from homeassistant.components.sensor import (
SensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import LIGHT_LUX
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@@ -71,7 +72,7 @@ class AbodeSensor(AbodeDevice, SensorEntity):
elif description.key == CONST.HUMI_STATUS_KEY:
self._attr_native_unit_of_measurement = device.humidity_unit
elif description.key == CONST.LUX_STATUS_KEY:
self._attr_native_unit_of_measurement = device.lux_unit
self._attr_native_unit_of_measurement = LIGHT_LUX
@property
def native_value(self) -> float | None:

View File

@@ -10,14 +10,15 @@ from aiohttp import ClientSession
from aiohttp.client_exceptions import ClientConnectorError
from async_timeout import timeout
from homeassistant.components.sensor import DOMAIN as SENSOR_PLATFORM
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_API_KEY, CONF_NAME, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from homeassistant.util.unit_system import METRIC_SYSTEM
from .const import ATTR_FORECAST, CONF_FORECAST, DOMAIN, MANUFACTURER
@@ -49,6 +50,14 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
# Remove ozone sensors from registry if they exist
ent_reg = er.async_get(hass)
for day in range(0, 5):
unique_id = f"{coordinator.location_key}-ozone-{day}"
if entity_id := ent_reg.async_get_entity_id(SENSOR_PLATFORM, DOMAIN, unique_id):
_LOGGER.debug("Removing ozone sensor entity %s", entity_id)
ent_reg.async_remove(entity_id)
return True
@@ -112,16 +121,12 @@ class AccuWeatherDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
async def _async_update_data(self) -> dict[str, Any]:
"""Update data via library."""
forecast: list[dict[str, Any]] = []
try:
async with timeout(10):
current = await self.accuweather.async_get_current_conditions()
forecast = (
await self.accuweather.async_get_forecast(
metric=self.hass.config.units is METRIC_SYSTEM
)
if self.forecast
else {}
)
if self.forecast:
forecast = await self.accuweather.async_get_daily_forecast()
except (
ApiError,
ClientConnectorError,

View File

@@ -20,7 +20,6 @@ from homeassistant.components.weather import (
ATTR_CONDITION_WINDY,
)
API_IMPERIAL: Final = "Imperial"
API_METRIC: Final = "Metric"
ATTRIBUTION: Final = "Data provided by AccuWeather"
ATTR_CATEGORY: Final = "Category"

View File

@@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"loggers": ["accuweather"],
"quality_scale": "platinum",
"requirements": ["accuweather==0.5.0"]
"requirements": ["accuweather==1.0.0"]
}

View File

@@ -16,6 +16,7 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_CUBIC_METER,
PERCENTAGE,
UV_INDEX,
UnitOfIrradiance,
UnitOfLength,
UnitOfSpeed,
UnitOfTemperature,
@@ -26,11 +27,9 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.util.unit_system import METRIC_SYSTEM
from . import AccuWeatherDataUpdateCoordinator
from .const import (
API_IMPERIAL,
API_METRIC,
ATTR_CATEGORY,
ATTR_DIRECTION,
@@ -51,7 +50,7 @@ PARALLEL_UPDATES = 1
class AccuWeatherSensorDescriptionMixin:
"""Mixin for AccuWeather sensor."""
value_fn: Callable[[dict[str, Any], str], StateType]
value_fn: Callable[[dict[str, Any]], StateType]
@dataclass
@@ -61,18 +60,25 @@ class AccuWeatherSensorDescription(
"""Class describing AccuWeather sensor entities."""
attr_fn: Callable[[dict[str, Any]], dict[str, StateType]] = lambda _: {}
metric_unit: str | None = None
us_customary_unit: str | None = None
FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
AccuWeatherSensorDescription(
key="AirQuality",
icon="mdi:air-filter",
name="Air quality",
value_fn=lambda data: cast(str, data[ATTR_CATEGORY]),
device_class=SensorDeviceClass.ENUM,
options=["good", "hazardous", "high", "low", "moderate", "unhealthy"],
translation_key="air_quality",
),
AccuWeatherSensorDescription(
key="CloudCoverDay",
icon="mdi:weather-cloudy",
name="Cloud cover day",
entity_registry_enabled_default=False,
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda data, _: cast(int, data),
value_fn=lambda data: cast(int, data),
),
AccuWeatherSensorDescription(
key="CloudCoverNight",
@@ -80,7 +86,7 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Cloud cover night",
entity_registry_enabled_default=False,
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda data, _: cast(int, data),
value_fn=lambda data: cast(int, data),
),
AccuWeatherSensorDescription(
key="Grass",
@@ -88,15 +94,26 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Grass pollen",
entity_registry_enabled_default=False,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_CUBIC_METER,
value_fn=lambda data, _: cast(int, data[ATTR_VALUE]),
value_fn=lambda data: cast(int, data[ATTR_VALUE]),
attr_fn=lambda data: {ATTR_LEVEL: data[ATTR_CATEGORY]},
translation_key="grass_pollen",
),
AccuWeatherSensorDescription(
key="HoursOfSun",
icon="mdi:weather-partly-cloudy",
name="Hours of sun",
native_unit_of_measurement=UnitOfTime.HOURS,
value_fn=lambda data, _: cast(float, data),
value_fn=lambda data: cast(float, data),
),
AccuWeatherSensorDescription(
key="LongPhraseDay",
name="Condition day",
value_fn=lambda data: cast(str, data),
),
AccuWeatherSensorDescription(
key="LongPhraseNight",
name="Condition night",
value_fn=lambda data: cast(str, data),
),
AccuWeatherSensorDescription(
key="Mold",
@@ -104,16 +121,9 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Mold pollen",
entity_registry_enabled_default=False,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_CUBIC_METER,
value_fn=lambda data, _: cast(int, data[ATTR_VALUE]),
attr_fn=lambda data: {ATTR_LEVEL: data[ATTR_CATEGORY]},
),
AccuWeatherSensorDescription(
key="Ozone",
icon="mdi:vector-triangle",
name="Ozone",
entity_registry_enabled_default=False,
value_fn=lambda data, _: cast(int, data[ATTR_VALUE]),
value_fn=lambda data: cast(int, data[ATTR_VALUE]),
attr_fn=lambda data: {ATTR_LEVEL: data[ATTR_CATEGORY]},
translation_key="mold_pollen",
),
AccuWeatherSensorDescription(
key="Ragweed",
@@ -121,56 +131,69 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Ragweed pollen",
native_unit_of_measurement=CONCENTRATION_PARTS_PER_CUBIC_METER,
entity_registry_enabled_default=False,
value_fn=lambda data, _: cast(int, data[ATTR_VALUE]),
value_fn=lambda data: cast(int, data[ATTR_VALUE]),
attr_fn=lambda data: {ATTR_LEVEL: data[ATTR_CATEGORY]},
translation_key="ragweed_pollen",
),
AccuWeatherSensorDescription(
key="RealFeelTemperatureMax",
device_class=SensorDeviceClass.TEMPERATURE,
name="RealFeel temperature max",
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, _: cast(float, data[ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="RealFeelTemperatureMin",
device_class=SensorDeviceClass.TEMPERATURE,
name="RealFeel temperature min",
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, _: cast(float, data[ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="RealFeelTemperatureShadeMax",
device_class=SensorDeviceClass.TEMPERATURE,
name="RealFeel temperature shade max",
entity_registry_enabled_default=False,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, _: cast(float, data[ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="RealFeelTemperatureShadeMin",
device_class=SensorDeviceClass.TEMPERATURE,
name="RealFeel temperature shade min",
entity_registry_enabled_default=False,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, _: cast(float, data[ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="SolarIrradianceDay",
icon="mdi:weather-sunny",
name="Solar irradiance day",
entity_registry_enabled_default=False,
native_unit_of_measurement=UnitOfIrradiance.WATTS_PER_SQUARE_METER,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="SolarIrradianceNight",
icon="mdi:weather-sunny",
name="Solar irradiance night",
entity_registry_enabled_default=False,
native_unit_of_measurement=UnitOfIrradiance.WATTS_PER_SQUARE_METER,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="ThunderstormProbabilityDay",
icon="mdi:weather-lightning",
name="Thunderstorm probability day",
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda data, _: cast(int, data),
value_fn=lambda data: cast(int, data),
),
AccuWeatherSensorDescription(
key="ThunderstormProbabilityNight",
icon="mdi:weather-lightning",
name="Thunderstorm probability night",
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda data, _: cast(int, data),
value_fn=lambda data: cast(int, data),
),
AccuWeatherSensorDescription(
key="Tree",
@@ -178,25 +201,26 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Tree pollen",
native_unit_of_measurement=CONCENTRATION_PARTS_PER_CUBIC_METER,
entity_registry_enabled_default=False,
value_fn=lambda data, _: cast(int, data[ATTR_VALUE]),
value_fn=lambda data: cast(int, data[ATTR_VALUE]),
attr_fn=lambda data: {ATTR_LEVEL: data[ATTR_CATEGORY]},
translation_key="tree_pollen",
),
AccuWeatherSensorDescription(
key="UVIndex",
icon="mdi:weather-sunny",
name="UV index",
native_unit_of_measurement=UV_INDEX,
value_fn=lambda data, _: cast(int, data[ATTR_VALUE]),
value_fn=lambda data: cast(int, data[ATTR_VALUE]),
attr_fn=lambda data: {ATTR_LEVEL: data[ATTR_CATEGORY]},
translation_key="uv_index",
),
AccuWeatherSensorDescription(
key="WindGustDay",
device_class=SensorDeviceClass.WIND_SPEED,
name="Wind gust day",
entity_registry_enabled_default=False,
metric_unit=UnitOfSpeed.KILOMETERS_PER_HOUR,
us_customary_unit=UnitOfSpeed.MILES_PER_HOUR,
value_fn=lambda data, _: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
value_fn=lambda data: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
attr_fn=lambda data: {"direction": data[ATTR_DIRECTION][ATTR_ENGLISH]},
),
AccuWeatherSensorDescription(
@@ -204,27 +228,24 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
device_class=SensorDeviceClass.WIND_SPEED,
name="Wind gust night",
entity_registry_enabled_default=False,
metric_unit=UnitOfSpeed.KILOMETERS_PER_HOUR,
us_customary_unit=UnitOfSpeed.MILES_PER_HOUR,
value_fn=lambda data, _: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
value_fn=lambda data: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
attr_fn=lambda data: {"direction": data[ATTR_DIRECTION][ATTR_ENGLISH]},
),
AccuWeatherSensorDescription(
key="WindDay",
device_class=SensorDeviceClass.WIND_SPEED,
name="Wind day",
metric_unit=UnitOfSpeed.KILOMETERS_PER_HOUR,
us_customary_unit=UnitOfSpeed.MILES_PER_HOUR,
value_fn=lambda data, _: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
value_fn=lambda data: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
attr_fn=lambda data: {"direction": data[ATTR_DIRECTION][ATTR_ENGLISH]},
),
AccuWeatherSensorDescription(
key="WindNight",
device_class=SensorDeviceClass.WIND_SPEED,
name="Wind night",
metric_unit=UnitOfSpeed.KILOMETERS_PER_HOUR,
us_customary_unit=UnitOfSpeed.MILES_PER_HOUR,
value_fn=lambda data, _: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
value_fn=lambda data: cast(float, data[ATTR_SPEED][ATTR_VALUE]),
attr_fn=lambda data: {"direction": data[ATTR_DIRECTION][ATTR_ENGLISH]},
),
)
@@ -236,9 +257,8 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Apparent temperature",
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="Ceiling",
@@ -246,9 +266,8 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
icon="mdi:weather-fog",
name="Cloud ceiling",
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfLength.METERS,
us_customary_unit=UnitOfLength.FEET,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfLength.METERS,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
suggested_display_precision=0,
),
AccuWeatherSensorDescription(
@@ -258,7 +277,7 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda data, _: cast(int, data),
value_fn=lambda data: cast(int, data),
),
AccuWeatherSensorDescription(
key="DewPoint",
@@ -266,18 +285,16 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Dew point",
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="RealFeelTemperature",
device_class=SensorDeviceClass.TEMPERATURE,
name="RealFeel temperature",
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="RealFeelTemperatureShade",
@@ -285,18 +302,16 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="RealFeel temperature shade",
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="Precipitation",
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
name="Precipitation",
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
us_customary_unit=UnitOfVolumetricFlux.INCHES_PER_HOUR,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
attr_fn=lambda data: {"type": data["PrecipitationType"]},
),
AccuWeatherSensorDescription(
@@ -306,7 +321,7 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Pressure tendency",
options=["falling", "rising", "steady"],
translation_key="pressure_tendency",
value_fn=lambda data, _: cast(str, data["LocalizedText"]).lower(),
value_fn=lambda data: cast(str, data["LocalizedText"]).lower(),
),
AccuWeatherSensorDescription(
key="UVIndex",
@@ -314,7 +329,7 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="UV index",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UV_INDEX,
value_fn=lambda data, _: cast(int, data),
value_fn=lambda data: cast(int, data),
attr_fn=lambda data: {ATTR_LEVEL: data["UVIndexText"]},
),
AccuWeatherSensorDescription(
@@ -323,9 +338,8 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Wet bulb temperature",
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="WindChillTemperature",
@@ -333,18 +347,16 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Wind chill temperature",
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfTemperature.CELSIUS,
us_customary_unit=UnitOfTemperature.FAHRENHEIT,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[API_METRIC][ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="Wind",
device_class=SensorDeviceClass.WIND_SPEED,
name="Wind",
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfSpeed.KILOMETERS_PER_HOUR,
us_customary_unit=UnitOfSpeed.MILES_PER_HOUR,
value_fn=lambda data, unit: cast(float, data[ATTR_SPEED][unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
value_fn=lambda data: cast(float, data[ATTR_SPEED][API_METRIC][ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="WindGust",
@@ -352,9 +364,8 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Wind gust",
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfSpeed.KILOMETERS_PER_HOUR,
us_customary_unit=UnitOfSpeed.MILES_PER_HOUR,
value_fn=lambda data, unit: cast(float, data[ATTR_SPEED][unit][ATTR_VALUE]),
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
value_fn=lambda data: cast(float, data[ATTR_SPEED][API_METRIC][ATTR_VALUE]),
),
)
@@ -374,7 +385,7 @@ async def async_setup_entry(
# Some air quality/allergy sensors are only available for certain
# locations.
sensors.extend(
AccuWeatherForecastSensor(coordinator, description, forecast_day=day)
AccuWeatherSensor(coordinator, description, forecast_day=day)
for day in range(MAX_FORECAST_DAYS + 1)
for description in FORECAST_SENSOR_TYPES
if description.key in coordinator.data[ATTR_FORECAST][0]
@@ -413,34 +424,27 @@ class AccuWeatherSensor(
self._attr_unique_id = (
f"{coordinator.location_key}-{description.key}".lower()
)
self._attr_native_unit_of_measurement = description.native_unit_of_measurement
if self.coordinator.hass.config.units is METRIC_SYSTEM:
self._unit_system = API_METRIC
if metric_unit := description.metric_unit:
self._attr_native_unit_of_measurement = metric_unit
else:
self._unit_system = API_IMPERIAL
if us_customary_unit := description.us_customary_unit:
self._attr_native_unit_of_measurement = us_customary_unit
self._attr_device_info = coordinator.device_info
if forecast_day is not None:
self.forecast_day = forecast_day
self.forecast_day = forecast_day
@property
def native_value(self) -> StateType:
"""Return the state."""
return self.entity_description.value_fn(self._sensor_data, self._unit_system)
return self.entity_description.value_fn(self._sensor_data)
@property
def extra_state_attributes(self) -> dict[str, Any]:
"""Return the state attributes."""
if self.forecast_day is not None:
return self.entity_description.attr_fn(self._sensor_data)
return self.entity_description.attr_fn(self.coordinator.data)
@callback
def _handle_coordinator_update(self) -> None:
"""Handle data update."""
self._sensor_data = _get_sensor_data(
self.coordinator.data, self.entity_description.key
self.coordinator.data, self.entity_description.key, self.forecast_day
)
self.async_write_ha_state()
@@ -458,20 +462,3 @@ def _get_sensor_data(
return sensors["PrecipitationSummary"]["PastHour"]
return sensors[kind]
class AccuWeatherForecastSensor(AccuWeatherSensor):
"""Define an AccuWeather forecast entity."""
@property
def extra_state_attributes(self) -> dict[str, Any]:
"""Return the state attributes."""
return self.entity_description.attr_fn(self._sensor_data)
@callback
def _handle_coordinator_update(self) -> None:
"""Handle data update."""
self._sensor_data = _get_sensor_data(
self.coordinator.data, self.entity_description.key, self.forecast_day
)
self.async_write_ha_state()

View File

@@ -30,6 +30,91 @@
"rising": "Rising",
"falling": "Falling"
}
},
"air_quality": {
"state": {
"good": "Good",
"hazardous": "Hazardous",
"high": "High",
"low": "Low",
"moderate": "Moderate",
"unhealthy": "Unhealthy"
}
},
"grass_pollen": {
"state_attributes": {
"level": {
"name": "Level",
"state": {
"good": "[%key:component::accuweather::entity::sensor::air_quality::state::good%]",
"hazardous": "[%key:component::accuweather::entity::sensor::air_quality::state::hazardous%]",
"high": "[%key:component::accuweather::entity::sensor::air_quality::state::high%]",
"low": "[%key:component::accuweather::entity::sensor::air_quality::state::low%]",
"moderate": "[%key:component::accuweather::entity::sensor::air_quality::state::moderate%]",
"unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::unhealthy%]"
}
}
}
},
"mold_pollen": {
"state_attributes": {
"level": {
"name": "Level",
"state": {
"good": "[%key:component::accuweather::entity::sensor::air_quality::state::good%]",
"hazardous": "[%key:component::accuweather::entity::sensor::air_quality::state::hazardous%]",
"high": "[%key:component::accuweather::entity::sensor::air_quality::state::high%]",
"low": "[%key:component::accuweather::entity::sensor::air_quality::state::low%]",
"moderate": "[%key:component::accuweather::entity::sensor::air_quality::state::moderate%]",
"unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::unhealthy%]"
}
}
}
},
"ragweed_pollen": {
"state_attributes": {
"level": {
"name": "Level",
"state": {
"good": "[%key:component::accuweather::entity::sensor::air_quality::state::good%]",
"hazardous": "[%key:component::accuweather::entity::sensor::air_quality::state::hazardous%]",
"high": "[%key:component::accuweather::entity::sensor::air_quality::state::high%]",
"low": "[%key:component::accuweather::entity::sensor::air_quality::state::low%]",
"moderate": "[%key:component::accuweather::entity::sensor::air_quality::state::moderate%]",
"unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::unhealthy%]"
}
}
}
},
"tree_pollen": {
"state_attributes": {
"level": {
"name": "Level",
"state": {
"good": "[%key:component::accuweather::entity::sensor::air_quality::state::good%]",
"hazardous": "[%key:component::accuweather::entity::sensor::air_quality::state::hazardous%]",
"high": "[%key:component::accuweather::entity::sensor::air_quality::state::high%]",
"low": "[%key:component::accuweather::entity::sensor::air_quality::state::low%]",
"moderate": "[%key:component::accuweather::entity::sensor::air_quality::state::moderate%]",
"unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::unhealthy%]"
}
}
}
},
"uv_index": {
"state_attributes": {
"level": {
"name": "Level",
"state": {
"good": "[%key:component::accuweather::entity::sensor::air_quality::state::good%]",
"hazardous": "[%key:component::accuweather::entity::sensor::air_quality::state::hazardous%]",
"high": "[%key:component::accuweather::entity::sensor::air_quality::state::high%]",
"low": "[%key:component::accuweather::entity::sensor::air_quality::state::low%]",
"moderate": "[%key:component::accuweather::entity::sensor::air_quality::state::moderate%]",
"unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::unhealthy%]"
}
}
}
}
}
},

View File

@@ -1,8 +1,7 @@
"""Support for the AccuWeather service."""
from __future__ import annotations
from statistics import mean
from typing import Any, cast
from typing import cast
from homeassistant.components.weather import (
ATTR_FORECAST_CONDITION,
@@ -28,17 +27,9 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.util.dt import utc_from_timestamp
from homeassistant.util.unit_system import METRIC_SYSTEM
from . import AccuWeatherDataUpdateCoordinator
from .const import (
API_IMPERIAL,
API_METRIC,
ATTR_FORECAST,
ATTRIBUTION,
CONDITION_CLASSES,
DOMAIN,
)
from .const import API_METRIC, ATTR_FORECAST, ATTRIBUTION, CONDITION_CLASSES, DOMAIN
PARALLEL_UPDATES = 1
@@ -66,20 +57,11 @@ class AccuWeatherEntity(
# Coordinator data is used also for sensors which don't have units automatically
# converted, hence the weather entity's native units follow the configured unit
# system
if coordinator.hass.config.units is METRIC_SYSTEM:
self._attr_native_precipitation_unit = UnitOfPrecipitationDepth.MILLIMETERS
self._attr_native_pressure_unit = UnitOfPressure.HPA
self._attr_native_temperature_unit = UnitOfTemperature.CELSIUS
self._attr_native_visibility_unit = UnitOfLength.KILOMETERS
self._attr_native_wind_speed_unit = UnitOfSpeed.KILOMETERS_PER_HOUR
self._unit_system = API_METRIC
else:
self._unit_system = API_IMPERIAL
self._attr_native_precipitation_unit = UnitOfPrecipitationDepth.INCHES
self._attr_native_pressure_unit = UnitOfPressure.INHG
self._attr_native_temperature_unit = UnitOfTemperature.FAHRENHEIT
self._attr_native_visibility_unit = UnitOfLength.MILES
self._attr_native_wind_speed_unit = UnitOfSpeed.MILES_PER_HOUR
self._attr_native_precipitation_unit = UnitOfPrecipitationDepth.MILLIMETERS
self._attr_native_pressure_unit = UnitOfPressure.HPA
self._attr_native_temperature_unit = UnitOfTemperature.CELSIUS
self._attr_native_visibility_unit = UnitOfLength.KILOMETERS
self._attr_native_wind_speed_unit = UnitOfSpeed.KILOMETERS_PER_HOUR
self._attr_unique_id = coordinator.location_key
self._attr_attribution = ATTRIBUTION
self._attr_device_info = coordinator.device_info
@@ -99,16 +81,12 @@ class AccuWeatherEntity(
@property
def native_temperature(self) -> float:
"""Return the temperature."""
return cast(
float, self.coordinator.data["Temperature"][self._unit_system]["Value"]
)
return cast(float, self.coordinator.data["Temperature"][API_METRIC]["Value"])
@property
def native_pressure(self) -> float:
"""Return the pressure."""
return cast(
float, self.coordinator.data["Pressure"][self._unit_system]["Value"]
)
return cast(float, self.coordinator.data["Pressure"][API_METRIC]["Value"])
@property
def humidity(self) -> int:
@@ -118,9 +96,7 @@ class AccuWeatherEntity(
@property
def native_wind_speed(self) -> float:
"""Return the wind speed."""
return cast(
float, self.coordinator.data["Wind"]["Speed"][self._unit_system]["Value"]
)
return cast(float, self.coordinator.data["Wind"]["Speed"][API_METRIC]["Value"])
@property
def wind_bearing(self) -> int:
@@ -130,19 +106,7 @@ class AccuWeatherEntity(
@property
def native_visibility(self) -> float:
"""Return the visibility."""
return cast(
float, self.coordinator.data["Visibility"][self._unit_system]["Value"]
)
@property
def ozone(self) -> int | None:
"""Return the ozone level."""
# We only have ozone data for certain locations and only in the forecast data.
if self.coordinator.forecast and self.coordinator.data[ATTR_FORECAST][0].get(
"Ozone"
):
return cast(int, self.coordinator.data[ATTR_FORECAST][0]["Ozone"]["Value"])
return None
return cast(float, self.coordinator.data["Visibility"][API_METRIC]["Value"])
@property
def forecast(self) -> list[Forecast] | None:
@@ -155,15 +119,10 @@ class AccuWeatherEntity(
ATTR_FORECAST_TIME: utc_from_timestamp(item["EpochDate"]).isoformat(),
ATTR_FORECAST_NATIVE_TEMP: item["TemperatureMax"]["Value"],
ATTR_FORECAST_NATIVE_TEMP_LOW: item["TemperatureMin"]["Value"],
ATTR_FORECAST_NATIVE_PRECIPITATION: self._calc_precipitation(item),
ATTR_FORECAST_PRECIPITATION_PROBABILITY: round(
mean(
[
item["PrecipitationProbabilityDay"],
item["PrecipitationProbabilityNight"],
]
)
),
ATTR_FORECAST_NATIVE_PRECIPITATION: item["TotalLiquidDay"]["Value"],
ATTR_FORECAST_PRECIPITATION_PROBABILITY: item[
"PrecipitationProbabilityDay"
],
ATTR_FORECAST_NATIVE_WIND_SPEED: item["WindDay"]["Speed"]["Value"],
ATTR_FORECAST_WIND_BEARING: item["WindDay"]["Direction"]["Degrees"],
ATTR_FORECAST_CONDITION: [
@@ -172,18 +131,3 @@ class AccuWeatherEntity(
}
for item in self.coordinator.data[ATTR_FORECAST]
]
@staticmethod
def _calc_precipitation(day: dict[str, Any]) -> float:
"""Return sum of the precipitation."""
precip_sum = 0
precip_types = ["Rain", "Snow", "Ice"]
for precip in precip_types:
precip_sum = sum(
[
precip_sum,
day[f"{precip}Day"]["Value"],
day[f"{precip}Night"]["Value"],
]
)
return round(precip_sum, 1)

View File

@@ -7,11 +7,11 @@ from advantage_air import ApiError, advantage_air
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_IP_ADDRESS, CONF_PORT, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .const import ADVANTAGE_AIR_RETRY, DOMAIN
from .models import AdvantageAirData
ADVANTAGE_AIR_SYNC_INTERVAL = 15
PLATFORMS = [
@@ -53,29 +53,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
update_interval=timedelta(seconds=ADVANTAGE_AIR_SYNC_INTERVAL),
)
def error_handle_factory(func):
"""Return the provided API function wrapped.
Adds an error handler and coordinator refresh.
"""
async def error_handle(param):
try:
if await func(param):
await coordinator.async_refresh()
except ApiError as err:
raise HomeAssistantError(err) from err
return error_handle
await coordinator.async_config_entry_first_refresh()
hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN][entry.entry_id] = {
"coordinator": coordinator,
"aircon": error_handle_factory(api.aircon.async_set),
"lights": error_handle_factory(api.lights.async_set),
}
hass.data[DOMAIN][entry.entry_id] = AdvantageAirData(coordinator, api)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

View File

@@ -1,8 +1,6 @@
"""Binary Sensor platform for Advantage Air integration."""
from __future__ import annotations
from typing import Any
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
@@ -14,6 +12,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN as ADVANTAGE_AIR_DOMAIN
from .entity import AdvantageAirAcEntity, AdvantageAirZoneEntity
from .models import AdvantageAirData
PARALLEL_UPDATES = 0
@@ -25,10 +24,10 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir Binary Sensor platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
entities: list[BinarySensorEntity] = []
if aircons := instance["coordinator"].data.get("aircons"):
if aircons := instance.coordinator.data.get("aircons"):
for ac_key, ac_device in aircons.items():
entities.append(AdvantageAirFilter(instance, ac_key))
for zone_key, zone in ac_device["zones"].items():
@@ -48,7 +47,7 @@ class AdvantageAirFilter(AdvantageAirAcEntity, BinarySensorEntity):
_attr_entity_category = EntityCategory.DIAGNOSTIC
_attr_name = "Filter"
def __init__(self, instance: dict[str, Any], ac_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str) -> None:
"""Initialize an Advantage Air Filter sensor."""
super().__init__(instance, ac_key)
self._attr_unique_id += "-filter"
@@ -64,7 +63,7 @@ class AdvantageAirZoneMotion(AdvantageAirZoneEntity, BinarySensorEntity):
_attr_device_class = BinarySensorDeviceClass.MOTION
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize an Advantage Air Zone Motion sensor."""
super().__init__(instance, ac_key, zone_key)
self._attr_name = f'{self._zone["name"]} motion'
@@ -82,7 +81,7 @@ class AdvantageAirZoneMyZone(AdvantageAirZoneEntity, BinarySensorEntity):
_attr_entity_registry_enabled_default = False
_attr_entity_category = EntityCategory.DIAGNOSTIC
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize an Advantage Air Zone MyZone sensor."""
super().__init__(instance, ac_key, zone_key)
self._attr_name = f'{self._zone["name"]} myZone'

View File

@@ -5,6 +5,8 @@ import logging
from typing import Any
from homeassistant.components.climate import (
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
FAN_AUTO,
FAN_HIGH,
FAN_LOW,
@@ -26,24 +28,17 @@ from .const import (
DOMAIN as ADVANTAGE_AIR_DOMAIN,
)
from .entity import AdvantageAirAcEntity, AdvantageAirZoneEntity
from .models import AdvantageAirData
ADVANTAGE_AIR_HVAC_MODES = {
"heat": HVACMode.HEAT,
"cool": HVACMode.COOL,
"vent": HVACMode.FAN_ONLY,
"dry": HVACMode.DRY,
"myauto": HVACMode.AUTO,
"myauto": HVACMode.HEAT_COOL,
}
HASS_HVAC_MODES = {v: k for k, v in ADVANTAGE_AIR_HVAC_MODES.items()}
AC_HVAC_MODES = [
HVACMode.OFF,
HVACMode.COOL,
HVACMode.HEAT,
HVACMode.FAN_ONLY,
HVACMode.DRY,
]
ADVANTAGE_AIR_FAN_MODES = {
"autoAA": FAN_AUTO,
"low": FAN_LOW,
@@ -53,7 +48,14 @@ ADVANTAGE_AIR_FAN_MODES = {
HASS_FAN_MODES = {v: k for k, v in ADVANTAGE_AIR_FAN_MODES.items()}
FAN_SPEEDS = {FAN_LOW: 30, FAN_MEDIUM: 60, FAN_HIGH: 100}
ZONE_HVAC_MODES = [HVACMode.OFF, HVACMode.HEAT_COOL]
ADVANTAGE_AIR_AUTOFAN = "aaAutoFanModeEnabled"
ADVANTAGE_AIR_MYZONE = "MyZone"
ADVANTAGE_AIR_MYAUTO = "MyAuto"
ADVANTAGE_AIR_MYAUTO_ENABLED = "myAutoModeEnabled"
ADVANTAGE_AIR_MYTEMP = "MyTemp"
ADVANTAGE_AIR_MYTEMP_ENABLED = "climateControlModeEnabled"
ADVANTAGE_AIR_HEAT_TARGET = "myAutoHeatTargetTemp"
ADVANTAGE_AIR_COOL_TARGET = "myAutoCoolTargetTemp"
PARALLEL_UPDATES = 0
@@ -67,15 +69,15 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir climate platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
entities: list[ClimateEntity] = []
if aircons := instance["coordinator"].data.get("aircons"):
if aircons := instance.coordinator.data.get("aircons"):
for ac_key, ac_device in aircons.items():
entities.append(AdvantageAirAC(instance, ac_key))
for zone_key, zone in ac_device["zones"].items():
# Only add zone climate control when zone is in temperature control
if zone["type"] != 0:
if zone["type"] > 0:
entities.append(AdvantageAirZone(instance, ac_key, zone_key))
async_add_entities(entities)
@@ -83,24 +85,44 @@ async def async_setup_entry(
class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
"""AdvantageAir AC unit."""
_attr_fan_modes = [FAN_LOW, FAN_MEDIUM, FAN_HIGH]
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_target_temperature_step = PRECISION_WHOLE
_attr_max_temp = 32
_attr_min_temp = 16
_attr_fan_modes = [FAN_AUTO, FAN_LOW, FAN_MEDIUM, FAN_HIGH]
_attr_hvac_modes = AC_HVAC_MODES
_attr_supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
)
def __init__(self, instance: dict[str, Any], ac_key: str) -> None:
_attr_hvac_modes = [
HVACMode.OFF,
HVACMode.COOL,
HVACMode.HEAT,
HVACMode.FAN_ONLY,
HVACMode.DRY,
]
_attr_supported_features = ClimateEntityFeature.FAN_MODE
def __init__(self, instance: AdvantageAirData, ac_key: str) -> None:
"""Initialize an AdvantageAir AC unit."""
super().__init__(instance, ac_key)
if self._ac.get("myAutoModeEnabled"):
self._attr_hvac_modes = AC_HVAC_MODES + [HVACMode.AUTO]
# Set supported features and HVAC modes based on current operating mode
if self._ac.get(ADVANTAGE_AIR_MYAUTO_ENABLED):
# MyAuto
self._attr_supported_features |= (
ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
)
self._attr_hvac_modes += [HVACMode.HEAT_COOL]
elif not self._ac.get(ADVANTAGE_AIR_MYTEMP_ENABLED):
# MyZone
self._attr_supported_features |= ClimateEntityFeature.TARGET_TEMPERATURE
# Add "ezfan" mode if supported
if self._ac.get(ADVANTAGE_AIR_AUTOFAN):
self._attr_fan_modes += [FAN_AUTO]
@property
def target_temperature(self) -> float:
def target_temperature(self) -> float | None:
"""Return the current target temperature."""
return self._ac["setTemp"]
@@ -116,77 +138,71 @@ class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
"""Return the current fan modes."""
return ADVANTAGE_AIR_FAN_MODES.get(self._ac["fan"])
@property
def target_temperature_high(self) -> float | None:
"""Return the temperature cool mode is enabled."""
return self._ac.get(ADVANTAGE_AIR_COOL_TARGET)
@property
def target_temperature_low(self) -> float | None:
"""Return the temperature heat mode is enabled."""
return self._ac.get(ADVANTAGE_AIR_HEAT_TARGET)
async def async_turn_on(self) -> None:
"""Set the HVAC State to on."""
await self.aircon(
{
self.ac_key: {
"info": {
"state": ADVANTAGE_AIR_STATE_ON,
}
}
}
)
await self.async_update_ac({"state": ADVANTAGE_AIR_STATE_ON})
async def async_turn_off(self) -> None:
"""Set the HVAC State to off."""
await self.aircon(
await self.async_update_ac(
{
self.ac_key: {
"info": {
"state": ADVANTAGE_AIR_STATE_OFF,
}
}
"state": ADVANTAGE_AIR_STATE_OFF,
}
)
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
"""Set the HVAC Mode and State."""
if hvac_mode == HVACMode.OFF:
await self.aircon(
{self.ac_key: {"info": {"state": ADVANTAGE_AIR_STATE_OFF}}}
)
await self.async_update_ac({"state": ADVANTAGE_AIR_STATE_OFF})
else:
await self.aircon(
await self.async_update_ac(
{
self.ac_key: {
"info": {
"state": ADVANTAGE_AIR_STATE_ON,
"mode": HASS_HVAC_MODES.get(hvac_mode),
}
}
"state": ADVANTAGE_AIR_STATE_ON,
"mode": HASS_HVAC_MODES.get(hvac_mode),
}
)
async def async_set_fan_mode(self, fan_mode: str) -> None:
"""Set the Fan Mode."""
await self.aircon(
{self.ac_key: {"info": {"fan": HASS_FAN_MODES.get(fan_mode)}}}
)
await self.async_update_ac({"fan": HASS_FAN_MODES.get(fan_mode)})
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set the Temperature."""
temp = kwargs.get(ATTR_TEMPERATURE)
await self.aircon({self.ac_key: {"info": {"setTemp": temp}}})
if ATTR_TEMPERATURE in kwargs:
await self.async_update_ac({"setTemp": kwargs[ATTR_TEMPERATURE]})
if ATTR_TARGET_TEMP_LOW in kwargs and ATTR_TARGET_TEMP_HIGH in kwargs:
await self.async_update_ac(
{
ADVANTAGE_AIR_COOL_TARGET: kwargs[ATTR_TARGET_TEMP_HIGH],
ADVANTAGE_AIR_HEAT_TARGET: kwargs[ATTR_TARGET_TEMP_LOW],
}
)
class AdvantageAirZone(AdvantageAirZoneEntity, ClimateEntity):
"""AdvantageAir Zone control."""
"""AdvantageAir MyTemp Zone control."""
_attr_hvac_modes = [HVACMode.OFF, HVACMode.HEAT_COOL]
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_target_temperature_step = PRECISION_WHOLE
_attr_max_temp = 32
_attr_min_temp = 16
_attr_hvac_modes = ZONE_HVAC_MODES
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize an AdvantageAir Zone control."""
super().__init__(instance, ac_key, zone_key)
self._attr_name = self._zone["name"]
self._attr_unique_id = (
f'{self.coordinator.data["system"]["rid"]}-{ac_key}-{zone_key}'
)
@property
def hvac_mode(self) -> HVACMode:
@@ -196,7 +212,7 @@ class AdvantageAirZone(AdvantageAirZoneEntity, ClimateEntity):
return HVACMode.OFF
@property
def current_temperature(self) -> float:
def current_temperature(self) -> float | None:
"""Return the current temperature."""
return self._zone["measuredTemp"]
@@ -207,23 +223,11 @@ class AdvantageAirZone(AdvantageAirZoneEntity, ClimateEntity):
async def async_turn_on(self) -> None:
"""Set the HVAC State to on."""
await self.aircon(
{
self.ac_key: {
"zones": {self.zone_key: {"state": ADVANTAGE_AIR_STATE_OPEN}}
}
}
)
await self.async_update_zone({"state": ADVANTAGE_AIR_STATE_OPEN})
async def async_turn_off(self) -> None:
"""Set the HVAC State to off."""
await self.aircon(
{
self.ac_key: {
"zones": {self.zone_key: {"state": ADVANTAGE_AIR_STATE_CLOSE}}
}
}
)
await self.async_update_zone({"state": ADVANTAGE_AIR_STATE_CLOSE})
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
"""Set the HVAC Mode and State."""
@@ -235,4 +239,4 @@ class AdvantageAirZone(AdvantageAirZoneEntity, ClimateEntity):
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set the Temperature."""
temp = kwargs.get(ATTR_TEMPERATURE)
await self.aircon({self.ac_key: {"zones": {self.zone_key: {"setTemp": temp}}}})
await self.async_update_zone({"setTemp": temp})

View File

@@ -16,7 +16,8 @@ from .const import (
ADVANTAGE_AIR_STATE_OPEN,
DOMAIN as ADVANTAGE_AIR_DOMAIN,
)
from .entity import AdvantageAirZoneEntity
from .entity import AdvantageAirThingEntity, AdvantageAirZoneEntity
from .models import AdvantageAirData
PARALLEL_UPDATES = 0
@@ -28,15 +29,25 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir cover platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
entities: list[CoverEntity] = []
if aircons := instance["coordinator"].data.get("aircons"):
if aircons := instance.coordinator.data.get("aircons"):
for ac_key, ac_device in aircons.items():
for zone_key, zone in ac_device["zones"].items():
# Only add zone vent controls when zone in vent control mode.
if zone["type"] == 0:
entities.append(AdvantageAirZoneVent(instance, ac_key, zone_key))
if things := instance.coordinator.data.get("myThings"):
for thing in things["things"].values():
if thing["channelDipState"] in [1, 2]: # 1 = "Blind", 2 = "Blind 2"
entities.append(
AdvantageAirThingCover(instance, thing, CoverDeviceClass.BLIND)
)
elif thing["channelDipState"] == 3: # 3 = "Garage door"
entities.append(
AdvantageAirThingCover(instance, thing, CoverDeviceClass.GARAGE)
)
async_add_entities(entities)
@@ -50,7 +61,7 @@ class AdvantageAirZoneVent(AdvantageAirZoneEntity, CoverEntity):
| CoverEntityFeature.SET_POSITION
)
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize an Advantage Air Zone Vent."""
super().__init__(instance, ac_key, zone_key)
self._attr_name = self._zone["name"]
@@ -69,47 +80,52 @@ class AdvantageAirZoneVent(AdvantageAirZoneEntity, CoverEntity):
async def async_open_cover(self, **kwargs: Any) -> None:
"""Fully open zone vent."""
await self.aircon(
{
self.ac_key: {
"zones": {
self.zone_key: {"state": ADVANTAGE_AIR_STATE_OPEN, "value": 100}
}
}
}
await self.async_update_zone(
{"state": ADVANTAGE_AIR_STATE_OPEN, "value": 100},
)
async def async_close_cover(self, **kwargs: Any) -> None:
"""Fully close zone vent."""
await self.aircon(
{
self.ac_key: {
"zones": {self.zone_key: {"state": ADVANTAGE_AIR_STATE_CLOSE}}
}
}
)
await self.async_update_zone({"state": ADVANTAGE_AIR_STATE_CLOSE})
async def async_set_cover_position(self, **kwargs: Any) -> None:
"""Change vent position."""
position = round(kwargs[ATTR_POSITION] / 5) * 5
if position == 0:
await self.aircon(
{
self.ac_key: {
"zones": {self.zone_key: {"state": ADVANTAGE_AIR_STATE_CLOSE}}
}
}
)
await self.async_update_zone({"state": ADVANTAGE_AIR_STATE_CLOSE})
else:
await self.aircon(
await self.async_update_zone(
{
self.ac_key: {
"zones": {
self.zone_key: {
"state": ADVANTAGE_AIR_STATE_OPEN,
"value": position,
}
}
}
"state": ADVANTAGE_AIR_STATE_OPEN,
"value": position,
}
)
class AdvantageAirThingCover(AdvantageAirThingEntity, CoverEntity):
"""Representation of Advantage Air Cover controlled by MyPlace."""
_attr_supported_features = CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE
def __init__(
self,
instance: AdvantageAirData,
thing: dict[str, Any],
device_class: CoverDeviceClass,
) -> None:
"""Initialize an Advantage Air Things Cover."""
super().__init__(instance, thing)
self._attr_device_class = device_class
@property
def is_closed(self) -> bool:
"""Return if cover is fully closed."""
return self._data["value"] == 0
async def async_open_cover(self, **kwargs: Any) -> None:
"""Fully open zone vent."""
return await self.async_turn_on()
async def async_close_cover(self, **kwargs: Any) -> None:
"""Fully close zone vent."""
return await self.async_turn_off()

View File

@@ -1,11 +1,14 @@
"""Advantage Air parent entity class."""
from typing import Any
from advantage_air import ApiError
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
from .models import AdvantageAirData
class AdvantageAirEntity(CoordinatorEntity):
@@ -13,19 +16,34 @@ class AdvantageAirEntity(CoordinatorEntity):
_attr_has_entity_name = True
def __init__(self, instance: dict[str, Any]) -> None:
def __init__(self, instance: AdvantageAirData) -> None:
"""Initialize common aspects of an Advantage Air entity."""
super().__init__(instance["coordinator"])
super().__init__(instance.coordinator)
self._attr_unique_id: str = self.coordinator.data["system"]["rid"]
def update_handle_factory(self, func, *keys):
"""Return the provided API function wrapped.
Adds an error handler and coordinator refresh, and presets keys.
"""
async def update_handle(*values):
try:
if await func(*keys, *values):
await self.coordinator.async_refresh()
except ApiError as err:
raise HomeAssistantError(err) from err
return update_handle
class AdvantageAirAcEntity(AdvantageAirEntity):
"""Parent class for Advantage Air AC Entities."""
def __init__(self, instance: dict[str, Any], ac_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str) -> None:
"""Initialize common aspects of an Advantage Air ac entity."""
super().__init__(instance)
self.aircon = instance["aircon"]
self.ac_key: str = ac_key
self._attr_unique_id += f"-{ac_key}"
@@ -36,6 +54,9 @@ class AdvantageAirAcEntity(AdvantageAirEntity):
model=self.coordinator.data["system"]["sysType"],
name=self.coordinator.data["aircons"][self.ac_key]["info"]["name"],
)
self.async_update_ac = self.update_handle_factory(
instance.api.aircon.async_update_ac, self.ac_key
)
@property
def _ac(self) -> dict[str, Any]:
@@ -45,12 +66,56 @@ class AdvantageAirAcEntity(AdvantageAirEntity):
class AdvantageAirZoneEntity(AdvantageAirAcEntity):
"""Parent class for Advantage Air Zone Entities."""
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize common aspects of an Advantage Air zone entity."""
super().__init__(instance, ac_key)
self.zone_key: str = zone_key
self._attr_unique_id += f"-{zone_key}"
self.async_update_zone = self.update_handle_factory(
instance.api.aircon.async_update_zone, self.ac_key, self.zone_key
)
@property
def _zone(self) -> dict[str, Any]:
return self.coordinator.data["aircons"][self.ac_key]["zones"][self.zone_key]
class AdvantageAirThingEntity(AdvantageAirEntity):
"""Parent class for Advantage Air Things Entities."""
def __init__(self, instance: AdvantageAirData, thing: dict[str, Any]) -> None:
"""Initialize common aspects of an Advantage Air Things entity."""
super().__init__(instance)
self._id = thing["id"]
self._attr_unique_id += f"-{self._id}"
self._attr_device_info = DeviceInfo(
via_device=(DOMAIN, self.coordinator.data["system"]["rid"]),
identifiers={(DOMAIN, self._attr_unique_id)},
manufacturer="Advantage Air",
model="MyPlace",
name=thing["name"],
)
self.async_update_value = self.update_handle_factory(
instance.api.things.async_update_value, self._id
)
@property
def _data(self) -> dict:
"""Return the thing data."""
return self.coordinator.data["myThings"]["things"][self._id]
@property
def is_on(self):
"""Return if the thing is considered on."""
return self._data["value"] > 0
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the thing on."""
await self.async_update_value(True)
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the thing off."""
await self.async_update_value(False)

View File

@@ -7,12 +7,9 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import (
ADVANTAGE_AIR_STATE_OFF,
ADVANTAGE_AIR_STATE_ON,
DOMAIN as ADVANTAGE_AIR_DOMAIN,
)
from .entity import AdvantageAirEntity
from .const import ADVANTAGE_AIR_STATE_ON, DOMAIN as ADVANTAGE_AIR_DOMAIN
from .entity import AdvantageAirEntity, AdvantageAirThingEntity
from .models import AdvantageAirData
async def async_setup_entry(
@@ -22,15 +19,21 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir light platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
entities: list[LightEntity] = []
if my_lights := instance["coordinator"].data.get("myLights"):
if my_lights := instance.coordinator.data.get("myLights"):
for light in my_lights["lights"].values():
if light.get("relay"):
entities.append(AdvantageAirLight(instance, light))
else:
entities.append(AdvantageAirLightDimmable(instance, light))
if things := instance.coordinator.data.get("myThings"):
for thing in things["things"].values():
if thing["channelDipState"] == 4: # 4 = "Light (on/off)""
entities.append(AdvantageAirThingLight(instance, thing))
elif thing["channelDipState"] == 5: # 5 = "Light (Dimmable)""
entities.append(AdvantageAirThingLightDimmable(instance, thing))
async_add_entities(entities)
@@ -39,10 +42,10 @@ class AdvantageAirLight(AdvantageAirEntity, LightEntity):
_attr_supported_color_modes = {ColorMode.ONOFF}
def __init__(self, instance: dict[str, Any], light: dict[str, Any]) -> None:
def __init__(self, instance: AdvantageAirData, light: dict[str, Any]) -> None:
"""Initialize an Advantage Air Light."""
super().__init__(instance)
self.lights = instance["lights"]
self._id: str = light["id"]
self._attr_unique_id += f"-{self._id}"
self._attr_device_info = DeviceInfo(
@@ -52,24 +55,27 @@ class AdvantageAirLight(AdvantageAirEntity, LightEntity):
model=light.get("moduleType"),
name=light["name"],
)
self.async_update_state = self.update_handle_factory(
instance.api.lights.async_update_state, self._id
)
@property
def _light(self) -> dict[str, Any]:
def _data(self) -> dict[str, Any]:
"""Return the light object."""
return self.coordinator.data["myLights"]["lights"][self._id]
@property
def is_on(self) -> bool:
"""Return if the light is on."""
return self._light["state"] == ADVANTAGE_AIR_STATE_ON
return self._data["state"] == ADVANTAGE_AIR_STATE_ON
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the light on."""
await self.lights({"id": self._id, "state": ADVANTAGE_AIR_STATE_ON})
await self.async_update_state(True)
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the light off."""
await self.lights({"id": self._id, "state": ADVANTAGE_AIR_STATE_OFF})
await self.async_update_state(False)
class AdvantageAirLightDimmable(AdvantageAirLight):
@@ -77,14 +83,41 @@ class AdvantageAirLightDimmable(AdvantageAirLight):
_attr_supported_color_modes = {ColorMode.ONOFF, ColorMode.BRIGHTNESS}
def __init__(self, instance: AdvantageAirData, light: dict[str, Any]) -> None:
"""Initialize an Advantage Air Dimmable Light."""
super().__init__(instance, light)
self.async_update_value = self.update_handle_factory(
instance.api.lights.async_update_value, self._id
)
@property
def brightness(self) -> int:
"""Return the brightness of this light between 0..255."""
return round(self._light["value"] * 255 / 100)
return round(self._data["value"] * 255 / 100)
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the light on and optionally set the brightness."""
data: dict[str, Any] = {"id": self._id, "state": ADVANTAGE_AIR_STATE_ON}
if ATTR_BRIGHTNESS in kwargs:
data["value"] = round(kwargs[ATTR_BRIGHTNESS] * 100 / 255)
await self.lights(data)
return await self.async_update_value(round(kwargs[ATTR_BRIGHTNESS] / 2.55))
return await self.async_update_state(True)
class AdvantageAirThingLight(AdvantageAirThingEntity, LightEntity):
"""Representation of Advantage Air Light controlled by myThings."""
_attr_supported_color_modes = {ColorMode.ONOFF}
class AdvantageAirThingLightDimmable(AdvantageAirThingEntity, LightEntity):
"""Representation of Advantage Air Dimmable Light controlled by myThings."""
_attr_supported_color_modes = {ColorMode.ONOFF, ColorMode.BRIGHTNESS}
@property
def brightness(self) -> int:
"""Return the brightness of this light between 0..255."""
return round(self._data["value"] * 255 / 100)
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the light on by setting the brightness."""
await self.async_update_value(round(kwargs.get(ATTR_BRIGHTNESS, 255) / 2.55))

View File

@@ -7,5 +7,5 @@
"iot_class": "local_polling",
"loggers": ["advantage_air"],
"quality_scale": "platinum",
"requirements": ["advantage_air==0.4.1"]
"requirements": ["advantage_air==0.4.4"]
}

View File

@@ -0,0 +1,16 @@
"""The Advantage Air integration models."""
from __future__ import annotations
from dataclasses import dataclass
from advantage_air import advantage_air
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
@dataclass
class AdvantageAirData:
"""Data for the Advantage Air integration."""
coordinator: DataUpdateCoordinator
api: advantage_air

View File

@@ -1,5 +1,4 @@
"""Select platform for Advantage Air integration."""
from typing import Any
from homeassistant.components.select import SelectEntity
from homeassistant.config_entries import ConfigEntry
@@ -8,6 +7,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN as ADVANTAGE_AIR_DOMAIN
from .entity import AdvantageAirAcEntity
from .models import AdvantageAirData
ADVANTAGE_AIR_INACTIVE = "Inactive"
@@ -19,10 +19,10 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir select platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
entities: list[SelectEntity] = []
if aircons := instance["coordinator"].data.get("aircons"):
if aircons := instance.coordinator.data.get("aircons"):
for ac_key in aircons:
entities.append(AdvantageAirMyZone(instance, ac_key))
async_add_entities(entities)
@@ -34,7 +34,7 @@ class AdvantageAirMyZone(AdvantageAirAcEntity, SelectEntity):
_attr_icon = "mdi:home-thermometer"
_attr_name = "MyZone"
def __init__(self, instance: dict[str, Any], ac_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str) -> None:
"""Initialize an Advantage Air MyZone control."""
super().__init__(instance, ac_key)
self._attr_unique_id += "-myzone"
@@ -42,11 +42,12 @@ class AdvantageAirMyZone(AdvantageAirAcEntity, SelectEntity):
self._number_to_name = {0: ADVANTAGE_AIR_INACTIVE}
self._name_to_number = {ADVANTAGE_AIR_INACTIVE: 0}
for zone in instance["coordinator"].data["aircons"][ac_key]["zones"].values():
if zone["type"] > 0:
self._name_to_number[zone["name"]] = zone["number"]
self._number_to_name[zone["number"]] = zone["name"]
self._attr_options.append(zone["name"])
if "aircons" in instance.coordinator.data:
for zone in instance.coordinator.data["aircons"][ac_key]["zones"].values():
if zone["type"] > 0:
self._name_to_number[zone["name"]] = zone["number"]
self._number_to_name[zone["number"]] = zone["name"]
self._attr_options.append(zone["name"])
@property
def current_option(self) -> str:
@@ -55,6 +56,4 @@ class AdvantageAirMyZone(AdvantageAirAcEntity, SelectEntity):
async def async_select_option(self, option: str) -> None:
"""Set the MyZone."""
await self.aircon(
{self.ac_key: {"info": {"myZone": self._name_to_number[option]}}}
)
await self.async_update_ac({"myZone": self._name_to_number[option]})

View File

@@ -19,6 +19,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import ADVANTAGE_AIR_STATE_OPEN, DOMAIN as ADVANTAGE_AIR_DOMAIN
from .entity import AdvantageAirAcEntity, AdvantageAirZoneEntity
from .models import AdvantageAirData
ADVANTAGE_AIR_SET_COUNTDOWN_VALUE = "minutes"
ADVANTAGE_AIR_SET_COUNTDOWN_UNIT = "min"
@@ -34,10 +35,10 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir sensor platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
entities: list[SensorEntity] = []
if aircons := instance["coordinator"].data.get("aircons"):
if aircons := instance.coordinator.data.get("aircons"):
for ac_key, ac_device in aircons.items():
entities.append(AdvantageAirTimeTo(instance, ac_key, "On"))
entities.append(AdvantageAirTimeTo(instance, ac_key, "Off"))
@@ -65,7 +66,7 @@ class AdvantageAirTimeTo(AdvantageAirAcEntity, SensorEntity):
_attr_native_unit_of_measurement = ADVANTAGE_AIR_SET_COUNTDOWN_UNIT
_attr_entity_category = EntityCategory.DIAGNOSTIC
def __init__(self, instance: dict[str, Any], ac_key: str, action: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, action: str) -> None:
"""Initialize the Advantage Air timer control."""
super().__init__(instance, ac_key)
self.action = action
@@ -88,7 +89,7 @@ class AdvantageAirTimeTo(AdvantageAirAcEntity, SensorEntity):
async def set_time_to(self, **kwargs: Any) -> None:
"""Set the timer value."""
value = min(720, max(0, int(kwargs[ADVANTAGE_AIR_SET_COUNTDOWN_VALUE])))
await self.aircon({self.ac_key: {"info": {self._time_key: value}}})
await self.async_update_ac({self._time_key: value})
class AdvantageAirZoneVent(AdvantageAirZoneEntity, SensorEntity):
@@ -98,7 +99,7 @@ class AdvantageAirZoneVent(AdvantageAirZoneEntity, SensorEntity):
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_entity_category = EntityCategory.DIAGNOSTIC
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize an Advantage Air Zone Vent Sensor."""
super().__init__(instance, ac_key, zone_key=zone_key)
self._attr_name = f'{self._zone["name"]} vent'
@@ -126,7 +127,7 @@ class AdvantageAirZoneSignal(AdvantageAirZoneEntity, SensorEntity):
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_entity_category = EntityCategory.DIAGNOSTIC
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize an Advantage Air Zone wireless signal sensor."""
super().__init__(instance, ac_key, zone_key)
self._attr_name = f'{self._zone["name"]} signal'
@@ -160,7 +161,7 @@ class AdvantageAirZoneTemp(AdvantageAirZoneEntity, SensorEntity):
_attr_entity_registry_enabled_default = False
_attr_entity_category = EntityCategory.DIAGNOSTIC
def __init__(self, instance: dict[str, Any], ac_key: str, zone_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
"""Initialize an Advantage Air Zone Temp Sensor."""
super().__init__(instance, ac_key, zone_key)
self._attr_name = f'{self._zone["name"]} temperature'

View File

@@ -1,7 +1,7 @@
"""Switch platform for Advantage Air integration."""
from typing import Any
from homeassistant.components.switch import SwitchEntity
from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@@ -11,7 +11,8 @@ from .const import (
ADVANTAGE_AIR_STATE_ON,
DOMAIN as ADVANTAGE_AIR_DOMAIN,
)
from .entity import AdvantageAirAcEntity
from .entity import AdvantageAirAcEntity, AdvantageAirThingEntity
from .models import AdvantageAirData
async def async_setup_entry(
@@ -21,13 +22,17 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir switch platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
entities: list[SwitchEntity] = []
if aircons := instance["coordinator"].data.get("aircons"):
if aircons := instance.coordinator.data.get("aircons"):
for ac_key, ac_device in aircons.items():
if ac_device["info"]["freshAirStatus"] != "none":
entities.append(AdvantageAirFreshAir(instance, ac_key))
if things := instance.coordinator.data.get("myThings"):
for thing in things["things"].values():
if thing["channelDipState"] == 8: # 8 = Other relay
entities.append(AdvantageAirRelay(instance, thing))
async_add_entities(entities)
@@ -36,8 +41,9 @@ class AdvantageAirFreshAir(AdvantageAirAcEntity, SwitchEntity):
_attr_icon = "mdi:air-filter"
_attr_name = "Fresh air"
_attr_device_class = SwitchDeviceClass.SWITCH
def __init__(self, instance: dict[str, Any], ac_key: str) -> None:
def __init__(self, instance: AdvantageAirData, ac_key: str) -> None:
"""Initialize an Advantage Air fresh air control."""
super().__init__(instance, ac_key)
self._attr_unique_id += "-freshair"
@@ -49,12 +55,14 @@ class AdvantageAirFreshAir(AdvantageAirAcEntity, SwitchEntity):
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn fresh air on."""
await self.aircon(
{self.ac_key: {"info": {"freshAirStatus": ADVANTAGE_AIR_STATE_ON}}}
)
await self.async_update_ac({"freshAirStatus": ADVANTAGE_AIR_STATE_ON})
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn fresh air off."""
await self.aircon(
{self.ac_key: {"info": {"freshAirStatus": ADVANTAGE_AIR_STATE_OFF}}}
)
await self.async_update_ac({"freshAirStatus": ADVANTAGE_AIR_STATE_OFF})
class AdvantageAirRelay(AdvantageAirThingEntity, SwitchEntity):
"""Representation of Advantage Air Thing."""
_attr_device_class = SwitchDeviceClass.SWITCH

View File

@@ -1,5 +1,4 @@
"""Advantage Air Update platform."""
from typing import Any
from homeassistant.components.update import UpdateEntity
from homeassistant.config_entries import ConfigEntry
@@ -9,6 +8,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN as ADVANTAGE_AIR_DOMAIN
from .entity import AdvantageAirEntity
from .models import AdvantageAirData
async def async_setup_entry(
@@ -18,7 +18,7 @@ async def async_setup_entry(
) -> None:
"""Set up AdvantageAir update platform."""
instance = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
instance: AdvantageAirData = hass.data[ADVANTAGE_AIR_DOMAIN][config_entry.entry_id]
async_add_entities([AdvantageAirApp(instance)])
@@ -28,7 +28,7 @@ class AdvantageAirApp(AdvantageAirEntity, UpdateEntity):
_attr_name = "App"
def __init__(self, instance: dict[str, Any]) -> None:
def __init__(self, instance: AdvantageAirData) -> None:
"""Initialize the Advantage Air App."""
super().__init__(instance)
self._attr_device_info = DeviceInfo(

View File

@@ -26,6 +26,7 @@ from aemet_opendata.const import (
AEMET_ATTR_STATION_DATE,
AEMET_ATTR_STATION_HUMIDITY,
AEMET_ATTR_STATION_LOCATION,
AEMET_ATTR_STATION_PRESSURE,
AEMET_ATTR_STATION_PRESSURE_SEA,
AEMET_ATTR_STATION_TEMPERATURE,
AEMET_ATTR_STORM_PROBABILITY,
@@ -318,6 +319,8 @@ class WeatherUpdateCoordinator(DataUpdateCoordinator):
pressure = format_float(
station_data[AEMET_ATTR_STATION_PRESSURE_SEA]
)
elif AEMET_ATTR_STATION_PRESSURE in station_data:
pressure = format_float(station_data[AEMET_ATTR_STATION_PRESSURE])
if AEMET_ATTR_STATION_TEMPERATURE in station_data:
temperature = format_float(
station_data[AEMET_ATTR_STATION_TEMPERATURE]

View File

@@ -150,10 +150,14 @@ class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
self._attr_unique_id = f"{airthings_device.device_id}_{entity_description.key}"
self._id = airthings_device.device_id
self._attr_device_info = DeviceInfo(
configuration_url="https://dashboard.airthings.com/",
configuration_url=(
"https://dashboard.airthings.com/devices/"
f"{airthings_device.device_id}"
),
identifiers={(DOMAIN, airthings_device.device_id)},
name=airthings_device.name,
manufacturer="Airthings",
model=airthings_device.device_type.replace("_", " ").lower().title(),
)
@property

View File

@@ -65,24 +65,28 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
key="temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
name="Temperature",
),
"humidity": SensorEntityDescription(
key="humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
name="Humidity",
),
"pressure": SensorEntityDescription(
key="pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.MBAR,
state_class=SensorStateClass.MEASUREMENT,
name="Pressure",
),
"battery": SensorEntityDescription(
key="battery",
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
name="Battery",
),
@@ -90,12 +94,13 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
key="co2",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
name="co2",
),
"voc": SensorEntityDescription(
key="voc",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
name="VOC",
icon="mdi:cloud",
),
@@ -103,6 +108,7 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
key="illuminance",
device_class=SensorDeviceClass.ILLUMINANCE,
native_unit_of_measurement=LIGHT_LUX,
state_class=SensorStateClass.MEASUREMENT,
name="Illuminance",
),
}
@@ -150,7 +156,6 @@ class AirthingsSensor(
):
"""Airthings BLE sensors for the device."""
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_has_entity_name = True
def __init__(

View File

@@ -380,7 +380,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
)
else:
entry.version = version
hass.config_entries.async_update_entry(entry)
LOGGER.info("Migration to version %s successful", version)

View File

@@ -3,18 +3,26 @@ from __future__ import annotations
from typing import Any, Final
from aioairzone.common import OperationMode
from aioairzone.common import OperationAction, OperationMode
from aioairzone.const import (
API_COOL_SET_POINT,
API_HEAT_SET_POINT,
API_MODE,
API_ON,
API_SET_POINT,
AZD_DEMAND,
API_SPEED,
AZD_ACTION,
AZD_COOL_TEMP_SET,
AZD_DOUBLE_SET_POINT,
AZD_HEAT_TEMP_SET,
AZD_HUMIDITY,
AZD_MASTER,
AZD_MODE,
AZD_MODES,
AZD_NAME,
AZD_ON,
AZD_SPEED,
AZD_SPEEDS,
AZD_TEMP,
AZD_TEMP_MAX,
AZD_TEMP_MIN,
@@ -24,6 +32,12 @@ from aioairzone.const import (
)
from homeassistant.components.climate import (
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
FAN_AUTO,
FAN_HIGH,
FAN_LOW,
FAN_MEDIUM,
ClimateEntity,
ClimateEntityFeature,
HVACAction,
@@ -39,12 +53,29 @@ from .const import API_TEMPERATURE_STEP, DOMAIN, TEMP_UNIT_LIB_TO_HASS
from .coordinator import AirzoneUpdateCoordinator
from .entity import AirzoneZoneEntity
HVAC_ACTION_LIB_TO_HASS: Final[dict[OperationMode, HVACAction]] = {
OperationMode.STOP: HVACAction.OFF,
OperationMode.COOLING: HVACAction.COOLING,
OperationMode.HEATING: HVACAction.HEATING,
OperationMode.FAN: HVACAction.FAN,
OperationMode.DRY: HVACAction.DRYING,
BASE_FAN_SPEEDS: Final[dict[int, str]] = {
0: FAN_AUTO,
1: FAN_LOW,
}
FAN_SPEED_MAPS: Final[dict[int, dict[int, str]]] = {
2: BASE_FAN_SPEEDS
| {
2: FAN_HIGH,
},
3: BASE_FAN_SPEEDS
| {
2: FAN_MEDIUM,
3: FAN_HIGH,
},
}
HVAC_ACTION_LIB_TO_HASS: Final[dict[OperationAction, HVACAction]] = {
OperationAction.COOLING: HVACAction.COOLING,
OperationAction.DRYING: HVACAction.DRYING,
OperationAction.FAN: HVACAction.FAN,
OperationAction.HEATING: HVACAction.HEATING,
OperationAction.IDLE: HVACAction.IDLE,
OperationAction.OFF: HVACAction.OFF,
}
HVAC_MODE_LIB_TO_HASS: Final[dict[OperationMode, HVACMode]] = {
OperationMode.STOP: HVACMode.OFF,
@@ -83,6 +114,9 @@ async def async_setup_entry(
class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
"""Define an Airzone sensor."""
_speeds: dict[int, str] = {}
_speeds_reverse: dict[str, int] = {}
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
@@ -97,16 +131,45 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
self._attr_unique_id = f"{self._attr_unique_id}_{system_zone_id}"
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
self._attr_target_temperature_step = API_TEMPERATURE_STEP
self._attr_max_temp = self.get_airzone_value(AZD_TEMP_MAX)
self._attr_min_temp = self.get_airzone_value(AZD_TEMP_MIN)
self._attr_temperature_unit = TEMP_UNIT_LIB_TO_HASS[
self.get_airzone_value(AZD_TEMP_UNIT)
]
self._attr_hvac_modes = [
HVAC_MODE_LIB_TO_HASS[mode] for mode in self.get_airzone_value(AZD_MODES)
]
if (
self.get_airzone_value(AZD_SPEED) is not None
and self.get_airzone_value(AZD_SPEEDS) is not None
):
self._set_fan_speeds()
if self.get_airzone_value(AZD_DOUBLE_SET_POINT):
self._attr_supported_features |= (
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
)
self._async_update_attrs()
def _set_fan_speeds(self) -> None:
self._attr_supported_features |= ClimateEntityFeature.FAN_MODE
speeds = self.get_airzone_value(AZD_SPEEDS)
max_speed = max(speeds)
if _speeds := FAN_SPEED_MAPS.get(max_speed):
self._speeds = _speeds
else:
for speed in speeds:
if speed == 0:
self._speeds[speed] = FAN_AUTO
else:
self._speeds[speed] = f"{int(round((speed * 100) / max_speed, 0))}%"
self._speeds[1] = FAN_LOW
self._speeds[int(round((max_speed + 1) / 2, 0))] = FAN_MEDIUM
self._speeds[max_speed] = FAN_HIGH
self._speeds_reverse = {v: k for k, v in self._speeds.items()}
self._attr_fan_modes = list(self._speeds_reverse)
async def async_turn_on(self) -> None:
"""Turn the entity on."""
params = {
@@ -121,6 +184,13 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
}
await self._async_update_hvac_params(params)
async def async_set_fan_mode(self, fan_mode: str) -> None:
"""Set fan mode."""
params = {
API_SPEED: self._speeds_reverse.get(fan_mode),
}
await self._async_update_hvac_params(params)
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
"""Set hvac mode."""
params = {}
@@ -140,9 +210,12 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
params = {
API_SET_POINT: kwargs.get(ATTR_TEMPERATURE),
}
params = {}
if ATTR_TEMPERATURE in kwargs:
params[API_SET_POINT] = kwargs[ATTR_TEMPERATURE]
if ATTR_TARGET_TEMP_LOW in kwargs and ATTR_TARGET_TEMP_HIGH in kwargs:
params[API_COOL_SET_POINT] = kwargs[ATTR_TARGET_TEMP_LOW]
params[API_HEAT_SET_POINT] = kwargs[ATTR_TARGET_TEMP_HIGH]
await self._async_update_hvac_params(params)
@callback
@@ -156,14 +229,24 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
"""Update climate attributes."""
self._attr_current_temperature = self.get_airzone_value(AZD_TEMP)
self._attr_current_humidity = self.get_airzone_value(AZD_HUMIDITY)
self._attr_hvac_action = HVAC_ACTION_LIB_TO_HASS[
self.get_airzone_value(AZD_ACTION)
]
if self.get_airzone_value(AZD_ON):
mode = self.get_airzone_value(AZD_MODE)
self._attr_hvac_mode = HVAC_MODE_LIB_TO_HASS[mode]
if self.get_airzone_value(AZD_DEMAND):
self._attr_hvac_action = HVAC_ACTION_LIB_TO_HASS[mode]
else:
self._attr_hvac_action = HVACAction.IDLE
self._attr_hvac_mode = HVAC_MODE_LIB_TO_HASS[
self.get_airzone_value(AZD_MODE)
]
else:
self._attr_hvac_action = HVACAction.OFF
self._attr_hvac_mode = HVACMode.OFF
self._attr_max_temp = self.get_airzone_value(AZD_TEMP_MAX)
self._attr_min_temp = self.get_airzone_value(AZD_TEMP_MIN)
self._attr_target_temperature = self.get_airzone_value(AZD_TEMP_SET)
if self.supported_features & ClimateEntityFeature.FAN_MODE:
self._attr_fan_mode = self._speeds.get(self.get_airzone_value(AZD_SPEED))
if self.supported_features & ClimateEntityFeature.TARGET_TEMPERATURE_RANGE:
self._attr_target_temperature_high = self.get_airzone_value(
AZD_HEAT_TEMP_SET
)
self._attr_target_temperature_low = self.get_airzone_value(
AZD_COOL_TEMP_SET
)

View File

@@ -7,6 +7,7 @@ from typing import Any
from aioairzone.const import (
API_SYSTEM_ID,
API_ZONE_ID,
AZD_AVAILABLE,
AZD_FIRMWARE,
AZD_FULL_NAME,
AZD_ID,
@@ -66,6 +67,11 @@ class AirzoneSystemEntity(AirzoneEntity):
)
self._attr_unique_id = entry.unique_id or entry.entry_id
@property
def available(self) -> bool:
"""Return system availability."""
return super().available and self.get_airzone_value(AZD_AVAILABLE)
def get_airzone_value(self, key: str) -> Any:
"""Return system value by key."""
value = None
@@ -130,6 +136,11 @@ class AirzoneZoneEntity(AirzoneEntity):
)
self._attr_unique_id = entry.unique_id or entry.entry_id
@property
def available(self) -> bool:
"""Return zone availability."""
return super().available and self.get_airzone_value(AZD_AVAILABLE)
def get_airzone_value(self, key: str) -> Any:
"""Return zone value by key."""
value = None

View File

@@ -11,5 +11,5 @@
"documentation": "https://www.home-assistant.io/integrations/airzone",
"iot_class": "local_polling",
"loggers": ["aioairzone"],
"requirements": ["aioairzone==0.5.2"]
"requirements": ["aioairzone==0.6.3"]
}

View File

@@ -1,7 +1,7 @@
"""Support for the Airzone sensors."""
from __future__ import annotations
from dataclasses import dataclass, replace
from dataclasses import dataclass
from typing import Any, Final
from aioairzone.common import GrilleAngle, SleepTimeout
@@ -41,14 +41,14 @@ class AirzoneSelectDescription(SelectEntityDescription, AirzoneSelectDescription
GRILLE_ANGLE_DICT: Final[dict[str, int]] = {
"90º": GrilleAngle.DEG_90,
"50º": GrilleAngle.DEG_50,
"45º": GrilleAngle.DEG_45,
"40º": GrilleAngle.DEG_40,
"90deg": GrilleAngle.DEG_90,
"50deg": GrilleAngle.DEG_50,
"45deg": GrilleAngle.DEG_45,
"40deg": GrilleAngle.DEG_40,
}
SLEEP_DICT: Final[dict[str, int]] = {
"Off": SleepTimeout.SLEEP_OFF,
"off": SleepTimeout.SLEEP_OFF,
"30m": SleepTimeout.SLEEP_30,
"60m": SleepTimeout.SLEEP_60,
"90m": SleepTimeout.SLEEP_90,
@@ -61,21 +61,27 @@ ZONE_SELECT_TYPES: Final[tuple[AirzoneSelectDescription, ...]] = (
entity_category=EntityCategory.CONFIG,
key=AZD_COLD_ANGLE,
name="Cold Angle",
options=list(GRILLE_ANGLE_DICT),
options_dict=GRILLE_ANGLE_DICT,
translation_key="grille_angles",
),
AirzoneSelectDescription(
api_param=API_HEAT_ANGLE,
entity_category=EntityCategory.CONFIG,
key=AZD_HEAT_ANGLE,
name="Heat Angle",
options=list(GRILLE_ANGLE_DICT),
options_dict=GRILLE_ANGLE_DICT,
translation_key="grille_angles",
),
AirzoneSelectDescription(
api_param=API_SLEEP,
entity_category=EntityCategory.CONFIG,
key=AZD_SLEEP,
name="Sleep",
options=list(SLEEP_DICT),
options_dict=SLEEP_DICT,
translation_key="sleep_times",
),
)
@@ -91,14 +97,10 @@ async def async_setup_entry(
for system_zone_id, zone_data in coordinator.data[AZD_ZONES].items():
for description in ZONE_SELECT_TYPES:
if description.key in zone_data:
_desc = replace(
description,
options=list(description.options_dict.keys()),
)
entities.append(
AirzoneZoneSelect(
coordinator,
_desc,
description,
entry,
system_zone_id,
zone_data,

View File

@@ -23,5 +23,25 @@
}
}
}
},
"entity": {
"select": {
"grille_angles": {
"state": {
"90deg": "90°",
"50deg": "50°",
"45deg": "45°",
"40deg": "40°"
}
},
"sleep_times": {
"state": {
"off": "[%key:common::state::off%]",
"30m": "30 minutes",
"60m": "60 minutes",
"90m": "90 minutes"
}
}
}
}
}

View File

@@ -0,0 +1,48 @@
"""The Airzone Cloud integration."""
from __future__ import annotations
from aioairzone_cloud.cloudapi import AirzoneCloudApi
from aioairzone_cloud.common import ConnectionOptions
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ID, CONF_PASSWORD, CONF_USERNAME, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
PLATFORMS: list[Platform] = [Platform.SENSOR]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Airzone Cloud from a config entry."""
options = ConnectionOptions(
entry.data[CONF_USERNAME],
entry.data[CONF_PASSWORD],
)
airzone = AirzoneCloudApi(aiohttp_client.async_get_clientsession(hass), options)
await airzone.login()
inst_list = await airzone.list_installations()
for inst in inst_list:
if inst.get_id() == entry.data[CONF_ID]:
airzone.select_installation(inst)
await airzone.update_installation(inst)
coordinator = AirzoneUpdateCoordinator(hass, airzone)
await coordinator.async_config_entry_first_refresh()
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
hass.data[DOMAIN].pop(entry.entry_id)
return unload_ok

View File

@@ -0,0 +1,116 @@
"""Config flow for Airzone Cloud."""
from __future__ import annotations
from typing import Any
from aioairzone_cloud.cloudapi import AirzoneCloudApi
from aioairzone_cloud.common import ConnectionOptions
from aioairzone_cloud.const import AZD_ID, AZD_NAME, AZD_WEBSERVERS
from aioairzone_cloud.exceptions import AirzoneCloudError, LoginError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_ID, CONF_PASSWORD, CONF_USERNAME
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.selector import (
SelectOptionDict,
SelectSelector,
SelectSelectorConfig,
SelectSelectorMode,
)
from .const import DOMAIN
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle config flow for an Airzone Cloud device."""
airzone: AirzoneCloudApi
async def async_step_inst_pick(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the installation selection."""
errors = {}
options: dict[str, str] = {}
inst_desc = None
inst_id = None
if user_input is not None:
inst_id = user_input[CONF_ID]
try:
inst_list = await self.airzone.list_installations()
except AirzoneCloudError:
errors["base"] = "cannot_connect"
else:
for inst in inst_list:
_data = inst.data()
_id = _data[AZD_ID]
options[_id] = f"{_data[AZD_NAME]} {_data[AZD_WEBSERVERS][0]} ({_id})"
if _id is not None and _id == inst_id:
inst_desc = options[_id]
if user_input is not None and inst_desc is not None:
await self.async_set_unique_id(inst_id)
self._abort_if_unique_id_configured()
user_input[CONF_USERNAME] = self.airzone.options.username
user_input[CONF_PASSWORD] = self.airzone.options.password
return self.async_create_entry(title=inst_desc, data=user_input)
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{
vol.Required(CONF_ID): SelectSelector(
SelectSelectorConfig(
options=[
SelectOptionDict(value=k, label=v)
for k, v in options.items()
],
mode=SelectSelectorMode.DROPDOWN,
)
),
}
),
errors=errors,
)
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the initial step."""
errors = {}
if user_input is not None:
if CONF_ID in user_input:
return await self.async_step_inst_pick(user_input)
self.airzone = AirzoneCloudApi(
aiohttp_client.async_get_clientsession(self.hass),
ConnectionOptions(
user_input[CONF_USERNAME],
user_input[CONF_PASSWORD],
),
)
try:
await self.airzone.login()
except (AirzoneCloudError, LoginError):
errors["base"] = "cannot_connect"
else:
return await self.async_step_inst_pick()
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{
vol.Required(CONF_USERNAME): str,
vol.Required(CONF_PASSWORD): str,
}
),
errors=errors,
)

View File

@@ -0,0 +1,8 @@
"""Constants for the Airzone Cloud integration."""
from typing import Final
DOMAIN: Final[str] = "airzone_cloud"
MANUFACTURER: Final[str] = "Airzone"
AIOAIRZONE_CLOUD_TIMEOUT_SEC: Final[int] = 30

View File

@@ -0,0 +1,43 @@
"""The Airzone Cloud integration coordinator."""
from __future__ import annotations
from datetime import timedelta
import logging
from typing import Any
from aioairzone_cloud.cloudapi import AirzoneCloudApi
from aioairzone_cloud.exceptions import AirzoneCloudError
import async_timeout
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .const import AIOAIRZONE_CLOUD_TIMEOUT_SEC, DOMAIN
SCAN_INTERVAL = timedelta(seconds=60)
_LOGGER = logging.getLogger(__name__)
class AirzoneUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
"""Class to manage fetching data from the Airzone Cloud device."""
def __init__(self, hass: HomeAssistant, airzone: AirzoneCloudApi) -> None:
"""Initialize."""
self.airzone = airzone
super().__init__(
hass,
_LOGGER,
name=DOMAIN,
update_interval=SCAN_INTERVAL,
)
async def _async_update_data(self) -> dict[str, Any]:
"""Update data via library."""
async with async_timeout.timeout(AIOAIRZONE_CLOUD_TIMEOUT_SEC):
try:
await self.airzone.update()
except AirzoneCloudError as error:
raise UpdateFailed(error) from error
return self.airzone.data()

View File

@@ -0,0 +1,144 @@
"""Support for the Airzone Cloud diagnostics."""
from __future__ import annotations
from collections.abc import Mapping
from typing import Any
from aioairzone_cloud.const import (
API_CITY,
API_GROUP_ID,
API_LOCATION_ID,
API_OLD_ID,
API_PIN,
API_STAT_AP_MAC,
API_STAT_SSID,
API_USER_ID,
AZD_WIFI_MAC,
RAW_DEVICES_STATUS,
RAW_INSTALLATIONS,
RAW_WEBSERVERS,
)
from homeassistant.components.diagnostics.util import async_redact_data
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import HomeAssistant
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
TO_REDACT_API = [
API_CITY,
API_GROUP_ID,
API_LOCATION_ID,
API_OLD_ID,
API_PIN,
API_STAT_AP_MAC,
API_STAT_SSID,
API_USER_ID,
]
TO_REDACT_CONFIG = [
CONF_PASSWORD,
CONF_USERNAME,
]
TO_REDACT_COORD = [
AZD_WIFI_MAC,
]
def gather_ids(api_data: dict[str, Any]) -> dict[str, Any]:
"""Return dict with IDs."""
ids: dict[str, Any] = {}
dev_idx = 1
for dev_id in api_data[RAW_DEVICES_STATUS]:
if dev_id not in ids:
ids[dev_id] = f"device{dev_idx}"
dev_idx += 1
inst_idx = 1
for inst_id in api_data[RAW_INSTALLATIONS]:
if inst_id not in ids:
ids[inst_id] = f"installation{inst_idx}"
inst_idx += 1
ws_idx = 1
for ws_id in api_data[RAW_WEBSERVERS]:
if ws_id not in ids:
ids[ws_id] = f"webserver{ws_idx}"
ws_idx += 1
return ids
def redact_keys(data: Any, ids: dict[str, Any]) -> Any:
"""Redact sensitive keys in a dict."""
if not isinstance(data, (Mapping, list)):
return data
if isinstance(data, list):
return [redact_keys(val, ids) for val in data]
redacted = {**data}
keys = list(redacted)
for key in keys:
if key in ids:
redacted[ids[key]] = redacted.pop(key)
elif isinstance(redacted[key], Mapping):
redacted[key] = redact_keys(redacted[key], ids)
elif isinstance(redacted[key], list):
redacted[key] = [redact_keys(item, ids) for item in redacted[key]]
return redacted
def redact_values(data: Any, ids: dict[str, Any]) -> Any:
"""Redact sensitive values in a dict."""
if not isinstance(data, (Mapping, list)):
if data in ids:
return ids[data]
return data
if isinstance(data, list):
return [redact_values(val, ids) for val in data]
redacted = {**data}
for key, value in redacted.items():
if value is None:
continue
if isinstance(value, Mapping):
redacted[key] = redact_values(value, ids)
elif isinstance(value, list):
redacted[key] = [redact_values(item, ids) for item in value]
elif value in ids:
redacted[key] = ids[value]
return redacted
def redact_all(
data: dict[str, Any], ids: dict[str, Any], to_redact: list[str]
) -> dict[str, Any]:
"""Redact sensitive data."""
_data = redact_keys(data, ids)
_data = redact_values(_data, ids)
return async_redact_data(_data, to_redact)
async def async_get_config_entry_diagnostics(
hass: HomeAssistant, config_entry: ConfigEntry
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
coordinator: AirzoneUpdateCoordinator = hass.data[DOMAIN][config_entry.entry_id]
raw_data = coordinator.airzone.raw_data()
ids = gather_ids(raw_data)
return {
"api_data": redact_all(raw_data, ids, TO_REDACT_API),
"config_entry": redact_all(config_entry.as_dict(), ids, TO_REDACT_CONFIG),
"coord_data": redact_all(coordinator.data, ids, TO_REDACT_COORD),
}

View File

@@ -0,0 +1,129 @@
"""Entity classes for the Airzone Cloud integration."""
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any
from aioairzone_cloud.const import (
AZD_AIDOOS,
AZD_AVAILABLE,
AZD_FIRMWARE,
AZD_NAME,
AZD_SYSTEM_ID,
AZD_WEBSERVER,
AZD_WEBSERVERS,
AZD_ZONES,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN, MANUFACTURER
from .coordinator import AirzoneUpdateCoordinator
class AirzoneEntity(CoordinatorEntity[AirzoneUpdateCoordinator], ABC):
"""Define an Airzone Cloud entity."""
@property
def available(self) -> bool:
"""Return Airzone Cloud entity availability."""
return super().available and self.get_airzone_value(AZD_AVAILABLE)
@abstractmethod
def get_airzone_value(self, key: str) -> Any:
"""Return Airzone Cloud entity value by key."""
class AirzoneAidooEntity(AirzoneEntity):
"""Define an Airzone Cloud Aidoo entity."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
aidoo_id: str,
aidoo_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.aidoo_id = aidoo_id
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, aidoo_id)},
manufacturer=MANUFACTURER,
name=aidoo_data[AZD_NAME],
via_device=(DOMAIN, aidoo_data[AZD_WEBSERVER]),
)
def get_airzone_value(self, key: str) -> Any:
"""Return Aidoo value by key."""
value = None
if aidoo := self.coordinator.data[AZD_AIDOOS].get(self.aidoo_id):
value = aidoo.get(key)
return value
class AirzoneWebServerEntity(AirzoneEntity):
"""Define an Airzone Cloud WebServer entity."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
ws_id: str,
ws_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.ws_id = ws_id
self._attr_device_info = DeviceInfo(
connections={(dr.CONNECTION_NETWORK_MAC, ws_id)},
identifiers={(DOMAIN, ws_id)},
manufacturer=MANUFACTURER,
name=f"WebServer {ws_id}",
sw_version=ws_data[AZD_FIRMWARE],
)
def get_airzone_value(self, key: str) -> Any:
"""Return WebServer value by key."""
value = None
if webserver := self.coordinator.data[AZD_WEBSERVERS].get(self.ws_id):
value = webserver.get(key)
return value
class AirzoneZoneEntity(AirzoneEntity):
"""Define an Airzone Cloud Zone entity."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
zone_id: str,
zone_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.system_id = zone_data[AZD_SYSTEM_ID]
self.zone_id = zone_id
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, zone_id)},
manufacturer=MANUFACTURER,
name=zone_data[AZD_NAME],
via_device=(DOMAIN, self.system_id),
)
def get_airzone_value(self, key: str) -> Any:
"""Return zone value by key."""
value = None
if zone := self.coordinator.data[AZD_ZONES].get(self.zone_id):
value = zone.get(key)
return value

View File

@@ -0,0 +1,10 @@
{
"domain": "airzone_cloud",
"name": "Airzone Cloud",
"codeowners": ["@Noltari"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/airzone_cloud",
"iot_class": "cloud_polling",
"loggers": ["aioairzone_cloud"],
"requirements": ["aioairzone-cloud==0.1.8"]
}

View File

@@ -0,0 +1,209 @@
"""Support for the Airzone Cloud sensors."""
from __future__ import annotations
from typing import Any, Final
from aioairzone_cloud.const import (
AZD_AIDOOS,
AZD_HUMIDITY,
AZD_NAME,
AZD_TEMP,
AZD_WEBSERVERS,
AZD_WIFI_RSSI,
AZD_ZONES,
)
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
EntityCategory,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
from .entity import (
AirzoneAidooEntity,
AirzoneEntity,
AirzoneWebServerEntity,
AirzoneZoneEntity,
)
AIDOO_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.TEMPERATURE,
key=AZD_TEMP,
name="Temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
)
WEBSERVER_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
has_entity_name=True,
key=AZD_WIFI_RSSI,
name="RSSI",
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
state_class=SensorStateClass.MEASUREMENT,
),
)
ZONE_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.TEMPERATURE,
key=AZD_TEMP,
name="Temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
device_class=SensorDeviceClass.HUMIDITY,
key=AZD_HUMIDITY,
name="Humidity",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
),
)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Add Airzone Cloud sensors from a config_entry."""
coordinator: AirzoneUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
sensors: list[AirzoneSensor] = []
# Aidoos
for aidoo_id, aidoo_data in coordinator.data.get(AZD_AIDOOS, {}).items():
for description in AIDOO_SENSOR_TYPES:
if description.key in aidoo_data:
sensors.append(
AirzoneAidooSensor(
coordinator,
description,
entry,
aidoo_id,
aidoo_data,
)
)
# WebServers
for ws_id, ws_data in coordinator.data.get(AZD_WEBSERVERS, {}).items():
for description in WEBSERVER_SENSOR_TYPES:
if description.key in ws_data:
sensors.append(
AirzoneWebServerSensor(
coordinator,
description,
entry,
ws_id,
ws_data,
)
)
# Zones
for zone_id, zone_data in coordinator.data.get(AZD_ZONES, {}).items():
for description in ZONE_SENSOR_TYPES:
if description.key in zone_data:
sensors.append(
AirzoneZoneSensor(
coordinator,
description,
entry,
zone_id,
zone_data,
)
)
async_add_entities(sensors)
class AirzoneSensor(AirzoneEntity, SensorEntity):
"""Define an Airzone Cloud sensor."""
@callback
def _handle_coordinator_update(self) -> None:
"""Update attributes when the coordinator updates."""
self._async_update_attrs()
super()._handle_coordinator_update()
@callback
def _async_update_attrs(self) -> None:
"""Update sensor attributes."""
self._attr_native_value = self.get_airzone_value(self.entity_description.key)
class AirzoneAidooSensor(AirzoneAidooEntity, AirzoneSensor):
"""Define an Airzone Cloud Aidoo sensor."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
aidoo_id: str,
aidoo_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, aidoo_id, aidoo_data)
self._attr_name = f"{aidoo_data[AZD_NAME]} {description.name}"
self._attr_unique_id = f"{aidoo_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()
class AirzoneWebServerSensor(AirzoneWebServerEntity, AirzoneSensor):
"""Define an Airzone Cloud WebServer sensor."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
ws_id: str,
ws_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, ws_id, ws_data)
self._attr_unique_id = f"{ws_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()
class AirzoneZoneSensor(AirzoneZoneEntity, AirzoneSensor):
"""Define an Airzone Cloud Zone sensor."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
zone_id: str,
zone_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, zone_id, zone_data)
self._attr_name = f"{zone_data[AZD_NAME]} {description.name}"
self._attr_unique_id = f"{zone_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()

View File

@@ -0,0 +1,19 @@
{
"config": {
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
},
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
},
"step": {
"user": {
"data": {
"id": "Installation",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
}
}
}

View File

@@ -89,15 +89,9 @@ class AladdinDevice(CoverEntity):
await self._acc.get_doors(self._serial)
self._attr_available = True
except session_manager.ConnectionError:
except (session_manager.ConnectionError, session_manager.InvalidPasswordError):
self._attr_available = False
except session_manager.InvalidPasswordError:
self._attr_available = False
await self.hass.async_create_task(
self.hass.config_entries.async_reload(self._entry_id)
)
@property
def is_closed(self) -> bool | None:
"""Update is closed attribute."""

View File

@@ -62,5 +62,11 @@
}
}
}
},
"issues": {
"platform_integration_no_support": {
"title": "[%key:common::issues::platform_integration_no_support_title%]",
"description": "[%key:common::issues::platform_integration_no_support_description%]"
}
}
}

View File

@@ -25,7 +25,7 @@ from homeassistant.const import (
STATE_OFF,
STATE_ON,
)
from homeassistant.core import Event, HomeAssistant
from homeassistant.core import Event, HassJob, HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent
@@ -237,7 +237,13 @@ class Alert(Entity):
"""Schedule a notification."""
delay = self._delay[self._next_delay]
next_msg = now() + delay
self._cancel = async_track_point_in_time(self.hass, self._notify, next_msg)
self._cancel = async_track_point_in_time(
self.hass,
HassJob(
self._notify, name="Schedule notify alert", cancel_on_shutdown=True
),
next_msg,
)
self._next_delay = min(self._next_delay + 1, len(self._delay) - 1)
async def _notify(self, *args: Any) -> None:

View File

@@ -12,7 +12,7 @@ from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET
from homeassistant.core import callback
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.storage import Store
from homeassistant.util import dt
from homeassistant.util import dt as dt_util
_LOGGER = logging.getLogger(__name__)
@@ -95,12 +95,12 @@ class Auth:
if not self._prefs[STORAGE_ACCESS_TOKEN]:
return False
expire_time = dt.parse_datetime(self._prefs[STORAGE_EXPIRE_TIME])
expire_time = dt_util.parse_datetime(self._prefs[STORAGE_EXPIRE_TIME])
preemptive_expire_time = expire_time - timedelta(
seconds=PREEMPTIVE_REFRESH_TTL_IN_SECONDS
)
return dt.utcnow() < preemptive_expire_time
return dt_util.utcnow() < preemptive_expire_time
async def _async_request_new_token(self, lwa_params):
try:
@@ -130,7 +130,7 @@ class Auth:
access_token = response_json["access_token"]
refresh_token = response_json["refresh_token"]
expires_in = response_json["expires_in"]
expire_time = dt.utcnow() + timedelta(seconds=expires_in)
expire_time = dt_util.utcnow() + timedelta(seconds=expires_in)
await self._async_update_preferences(
access_token, refresh_token, expire_time.isoformat()

View File

@@ -1,9 +1,11 @@
"""Config helpers for Alexa."""
from __future__ import annotations
from abc import ABC, abstractmethod
import asyncio
import logging
from homeassistant.core import CALLBACK_TYPE, callback
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
from homeassistant.helpers.storage import Store
from .const import DOMAIN
@@ -17,14 +19,15 @@ _LOGGER = logging.getLogger(__name__)
class AbstractConfig(ABC):
"""Hold the configuration for Alexa."""
_unsub_proactive_report: asyncio.Task[CALLBACK_TYPE] | None = None
_store: AlexaConfigStore
_unsub_proactive_report: CALLBACK_TYPE | None = None
def __init__(self, hass):
def __init__(self, hass: HomeAssistant) -> None:
"""Initialize abstract config."""
self.hass = hass
self._store = None
self._enable_proactive_mode_lock = asyncio.Lock()
async def async_initialize(self):
async def async_initialize(self) -> None:
"""Perform async initialization of config."""
self._store = AlexaConfigStore(self.hass)
await self._store.async_load()
@@ -64,23 +67,20 @@ class AbstractConfig(ABC):
def user_identifier(self):
"""Return an identifier for the user that represents this config."""
async def async_enable_proactive_mode(self):
async def async_enable_proactive_mode(self) -> None:
"""Enable proactive mode."""
_LOGGER.debug("Enable proactive mode")
if self._unsub_proactive_report is None:
self._unsub_proactive_report = self.hass.async_create_task(
async_enable_proactive_mode(self.hass, self)
async with self._enable_proactive_mode_lock:
if self._unsub_proactive_report is not None:
return
self._unsub_proactive_report = await async_enable_proactive_mode(
self.hass, self
)
try:
await self._unsub_proactive_report
except Exception:
self._unsub_proactive_report = None
raise
async def async_disable_proactive_mode(self):
async def async_disable_proactive_mode(self) -> None:
"""Disable proactive mode."""
_LOGGER.debug("Disable proactive mode")
if unsub_func := await self._unsub_proactive_report:
if unsub_func := self._unsub_proactive_report:
unsub_func()
self._unsub_proactive_report = None
@@ -107,7 +107,7 @@ class AbstractConfig(ABC):
"""Return authorization status."""
return self._store.authorized
async def set_authorized(self, authorized):
async def set_authorized(self, authorized) -> None:
"""Set authorization status.
- Set when an incoming message is received from Alexa.

View File

@@ -1,6 +1,7 @@
"""Support for Alexa skill service end point."""
import enum
import logging
from typing import Any
from homeassistant.components import http
from homeassistant.core import callback
@@ -180,12 +181,15 @@ async def async_handle_intent(hass, message):
return alexa_response.as_dict()
def resolve_slot_synonyms(key, request):
def resolve_slot_data(key: str, request: dict[str, Any]) -> dict[str, str]:
"""Check slot request for synonym resolutions."""
# Default to the spoken slot value if more than one or none are found. For
# Default to the spoken slot value if more than one or none are found. Always
# passes the id and name of the nearest possible slot resolution. For
# reference to the request object structure, see the Alexa docs:
# https://tinyurl.com/ybvm7jhs
resolved_value = request["value"]
resolved_data = {}
resolved_data["value"] = request["value"]
resolved_data["id"] = ""
if (
"resolutions" in request
@@ -200,20 +204,26 @@ def resolve_slot_synonyms(key, request):
if entry["status"]["code"] != SYN_RESOLUTION_MATCH:
continue
possible_values.extend([item["value"]["name"] for item in entry["values"]])
possible_values.extend([item["value"] for item in entry["values"]])
# Always set id if available, otherwise an empty string is used as id
if len(possible_values) >= 1:
# Set ID if available
if "id" in possible_values[0]:
resolved_data["id"] = possible_values[0]["id"]
# If there is only one match use the resolved value, otherwise the
# resolution cannot be determined, so use the spoken slot value
# resolution cannot be determined, so use the spoken slot value and empty string as id
if len(possible_values) == 1:
resolved_value = possible_values[0]
resolved_data["value"] = possible_values[0]["name"]
else:
_LOGGER.debug(
"Found multiple synonym resolutions for slot value: {%s: %s}",
key,
resolved_value,
resolved_data["value"],
)
return resolved_value
return resolved_data
class AlexaResponse:
@@ -237,8 +247,10 @@ class AlexaResponse:
continue
_key = key.replace(".", "_")
_slot_data = resolve_slot_data(key, value)
self.variables[_key] = resolve_slot_synonyms(key, value)
self.variables[_key] = _slot_data["value"]
self.variables[_key + "_Id"] = _slot_data["id"]
def add_card(self, card_type, title, content):
"""Add a card to the response."""

View File

@@ -60,6 +60,7 @@ class AlexaConfig(AbstractConfig):
"""Return an identifier for the user that represents this config."""
return ""
@core.callback
def should_expose(self, entity_id):
"""If an entity should be exposed."""
if not self._config[CONF_FILTER].empty_filter:

View File

@@ -5,7 +5,7 @@ import asyncio
from http import HTTPStatus
import json
import logging
from typing import cast
from typing import TYPE_CHECKING, cast
import aiohttp
import async_timeout
@@ -23,6 +23,9 @@ from .entities import ENTITY_ADAPTERS, AlexaEntity, generate_alexa_id
from .errors import NoTokenAvailable, RequireRelink
from .messages import AlexaResponse
if TYPE_CHECKING:
from .config import AbstractConfig
_LOGGER = logging.getLogger(__name__)
DEFAULT_TIMEOUT = 10
@@ -188,7 +191,9 @@ async def async_send_changereport_message(
)
async def async_send_add_or_update_message(hass, config, entity_ids):
async def async_send_add_or_update_message(
hass: HomeAssistant, config: AbstractConfig, entity_ids: list[str]
) -> aiohttp.ClientResponse:
"""Send an AddOrUpdateReport message for entities.
https://developer.amazon.com/docs/device-apis/alexa-discovery.html#add-or-update-report
@@ -223,7 +228,9 @@ async def async_send_add_or_update_message(hass, config, entity_ids):
)
async def async_send_delete_message(hass, config, entity_ids):
async def async_send_delete_message(
hass: HomeAssistant, config: AbstractConfig, entity_ids: list[str]
) -> aiohttp.ClientResponse:
"""Send an DeleteReport message for entities.
https://developer.amazon.com/docs/device-apis/alexa-discovery.html#deletereport-event

View File

@@ -167,12 +167,9 @@ class AmazonPollyProvider(Provider):
self,
message: str,
language: str,
options: dict[str, Any] | None = None,
options: dict[str, Any],
) -> TtsAudioType:
"""Request TTS file from Polly."""
if options is None or language is None:
_LOGGER.debug("language and/or options were missing")
return None, None
voice_id = options.get(CONF_VOICE, self.default_voice)
voice_in_dict = self.all_voices[voice_id]
if language != voice_in_dict.get("LanguageCode"):

View File

@@ -98,7 +98,7 @@ async def async_setup_entry(
tasks = []
for heater in data_connection.get_devices():
tasks.append(heater.update_device_info())
tasks.append(asyncio.create_task(heater.update_device_info()))
await asyncio.wait(tasks)
devs = []

View File

@@ -117,7 +117,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
en_reg.async_clear_config_entry(entry.entry_id)
version = entry.version = 2
hass.config_entries.async_update_entry(entry)
LOGGER.info("Migration to version %s successful", version)

View File

@@ -7,5 +7,5 @@
"integration_type": "hub",
"iot_class": "cloud_push",
"loggers": ["aioambient"],
"requirements": ["aioambient==2021.11.0"]
"requirements": ["aioambient==2023.04.0"]
}

View File

@@ -19,7 +19,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from homeassistant.util import Throttle
from .const import ATTRIBUTION, CONF_STATION_ID, SCAN_INTERVAL
from .const import CONF_STATION_ID, SCAN_INTERVAL
_LOGGER: Final = logging.getLogger(__name__)
@@ -54,6 +54,8 @@ async def async_setup_platform(
class AmpioSmogQuality(AirQualityEntity):
"""Implementation of an Ampio Smog air quality entity."""
_attr_attribution = "Data provided by Ampio"
def __init__(
self, api: AmpioSmogMapData, station_id: str, name: str | None
) -> None:
@@ -82,11 +84,6 @@ class AmpioSmogQuality(AirQualityEntity):
"""Return the particulate matter 10 level."""
return self._ampio.api.pm10 # type: ignore[no-any-return]
@property
def attribution(self) -> str:
"""Return the attribution."""
return ATTRIBUTION
async def async_update(self) -> None:
"""Get the latest data from the AmpioMap API."""
await self._ampio.async_update()

View File

@@ -2,6 +2,5 @@
from datetime import timedelta
from typing import Final
ATTRIBUTION: Final = "Data provided by Ampio"
CONF_STATION_ID: Final = "station_id"
SCAN_INTERVAL: Final = timedelta(minutes=10)

View File

@@ -5,13 +5,16 @@ import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.const import EVENT_HOMEASSISTANT_STARTED
from homeassistant.core import Event, HomeAssistant, callback
from homeassistant.core import Event, HassJob, HomeAssistant, callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import async_call_later, async_track_time_interval
from homeassistant.helpers.typing import ConfigType
from .analytics import Analytics
from .const import ATTR_ONBOARDED, ATTR_PREFERENCES, DOMAIN, INTERVAL, PREFERENCE_SCHEMA
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
async def async_setup(hass: HomeAssistant, _: ConfigType) -> bool:
"""Set up the analytics integration."""
@@ -24,11 +27,23 @@ async def async_setup(hass: HomeAssistant, _: ConfigType) -> bool:
def start_schedule(_event: Event) -> None:
"""Start the send schedule after the started event."""
# Wait 15 min after started
async_call_later(hass, 900, analytics.send_analytics)
async_call_later(
hass,
900,
HassJob(
analytics.send_analytics,
name="analytics schedule",
cancel_on_shutdown=True,
),
)
# Send every day
async_track_time_interval(
hass, analytics.send_analytics, INTERVAL, name="analytics daily"
hass,
analytics.send_analytics,
INTERVAL,
name="analytics daily",
cancel_on_shutdown=True,
)
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STARTED, start_schedule)

View File

@@ -1,4 +1,4 @@
"""Support for functionality to interact with Android TV/Fire TV devices."""
"""Support for functionality to interact with Android/Fire TV devices."""
from __future__ import annotations
from collections.abc import Mapping
@@ -135,11 +135,11 @@ async def async_connect_androidtv(
if not aftv.available:
# Determine the name that will be used for the device in the log
if config[CONF_DEVICE_CLASS] == DEVICE_ANDROIDTV:
device_name = "Android TV device"
device_name = "Android device"
elif config[CONF_DEVICE_CLASS] == DEVICE_FIRETV:
device_name = "Fire TV device"
else:
device_name = "Android TV / Fire TV device"
device_name = "Android / Fire TV device"
error_message = f"Could not connect to {device_name} at {address} {adb_log}"
return None, error_message
@@ -148,7 +148,7 @@ async def async_connect_androidtv(
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Android TV platform."""
"""Set up Android Debug Bridge platform."""
state_det_rules = entry.options.get(CONF_STATE_DETECTION_RULES)
if CONF_ADB_SERVER_IP not in entry.data:
@@ -167,7 +167,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
raise ConfigEntryNotReady(error_message)
async def async_close_connection(event):
"""Close Android TV connection on HA Stop."""
"""Close Android Debug Bridge connection on HA Stop."""
await aftv.adb_close()
entry.async_on_unload(

View File

@@ -1,4 +1,4 @@
"""Config flow to configure the Android TV integration."""
"""Config flow to configure the Android Debug Bridge integration."""
from __future__ import annotations
import logging
@@ -114,13 +114,14 @@ class AndroidTVFlowHandler(ConfigFlow, domain=DOMAIN):
async def _async_check_connection(
self, user_input: dict[str, Any]
) -> tuple[str | None, str | None]:
"""Attempt to connect the Android TV."""
"""Attempt to connect the Android device."""
try:
aftv, error_message = await async_connect_androidtv(self.hass, user_input)
except Exception: # pylint: disable=broad-except
_LOGGER.exception(
"Unknown error connecting with Android TV at %s", user_input[CONF_HOST]
"Unknown error connecting with Android device at %s",
user_input[CONF_HOST],
)
return RESULT_UNKNOWN, None
@@ -130,7 +131,7 @@ class AndroidTVFlowHandler(ConfigFlow, domain=DOMAIN):
dev_prop = aftv.device_properties
_LOGGER.info(
"Android TV at %s: %s = %r, %s = %r",
"Android device at %s: %s = %r, %s = %r",
user_input[CONF_HOST],
PROP_ETHMAC,
dev_prop.get(PROP_ETHMAC),
@@ -184,7 +185,7 @@ class AndroidTVFlowHandler(ConfigFlow, domain=DOMAIN):
class OptionsFlowHandler(OptionsFlowWithConfigEntry):
"""Handle an option flow for Android TV."""
"""Handle an option flow for Android Debug Bridge."""
def __init__(self, config_entry: ConfigEntry) -> None:
"""Initialize options flow."""

View File

@@ -1,4 +1,4 @@
"""Android TV component constants."""
"""Android Debug Bridge component constants."""
DOMAIN = "androidtv"
ANDROID_DEV = DOMAIN

View File

@@ -1,6 +1,6 @@
{
"domain": "androidtv",
"name": "Android TV",
"name": "Android Debug Bridge",
"codeowners": ["@JeffLIrion", "@ollo69"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/androidtv",

View File

@@ -1,4 +1,4 @@
"""Support for functionality to interact with Android TV / Fire TV devices."""
"""Support for functionality to interact with Android / Fire TV devices."""
from __future__ import annotations
from collections.abc import Awaitable, Callable, Coroutine
@@ -87,7 +87,7 @@ async def async_setup_entry(
entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the Android TV entity."""
"""Set up the Android Debug Bridge entity."""
aftv = hass.data[DOMAIN][entry.entry_id][ANDROID_DEV]
device_class = aftv.DEVICE_CLASS
device_type = (
@@ -201,7 +201,7 @@ def adb_decorator(
class ADBDevice(MediaPlayerEntity):
"""Representation of an Android TV or Fire TV device."""
"""Representation of an Android or Fire TV device."""
_attr_device_class = MediaPlayerDeviceClass.TV
@@ -214,7 +214,7 @@ class ADBDevice(MediaPlayerEntity):
entry_id,
entry_data,
):
"""Initialize the Android TV / Fire TV device."""
"""Initialize the Android / Fire TV device."""
self.aftv = aftv
self._attr_name = name
self._attr_unique_id = unique_id
@@ -384,7 +384,7 @@ class ADBDevice(MediaPlayerEntity):
@adb_decorator()
async def adb_command(self, command):
"""Send an ADB command to an Android TV / Fire TV device."""
"""Send an ADB command to an Android / Fire TV device."""
if key := KEYS.get(command):
await self.aftv.adb_shell(f"input keyevent {key}")
return
@@ -422,13 +422,13 @@ class ADBDevice(MediaPlayerEntity):
persistent_notification.async_create(
self.hass,
msg,
title="Android TV",
title="Android Debug Bridge",
)
_LOGGER.info("%s", msg)
@adb_decorator()
async def service_download(self, device_path, local_path):
"""Download a file from your Android TV / Fire TV device to your Home Assistant instance."""
"""Download a file from your Android / Fire TV device to your Home Assistant instance."""
if not self.hass.config.is_allowed_path(local_path):
_LOGGER.warning("'%s' is not secure to load data from!", local_path)
return
@@ -437,7 +437,7 @@ class ADBDevice(MediaPlayerEntity):
@adb_decorator()
async def service_upload(self, device_path, local_path):
"""Upload a file from your Home Assistant instance to an Android TV / Fire TV device."""
"""Upload a file from your Home Assistant instance to an Android / Fire TV device."""
if not self.hass.config.is_allowed_path(local_path):
_LOGGER.warning("'%s' is not secure to load data from!", local_path)
return
@@ -446,7 +446,7 @@ class ADBDevice(MediaPlayerEntity):
class AndroidTVDevice(ADBDevice):
"""Representation of an Android TV device."""
"""Representation of an Android device."""
_attr_supported_features = (
MediaPlayerEntityFeature.PAUSE

View File

@@ -1,8 +1,8 @@
# Describes the format for available Android TV and Fire TV services
# Describes the format for available Android and Fire TV services
adb_command:
name: ADB command
description: Send an ADB command to an Android TV / Fire TV device.
description: Send an ADB command to an Android / Fire TV device.
target:
entity:
integration: androidtv
@@ -17,7 +17,7 @@ adb_command:
text:
download:
name: Download
description: Download a file from your Android TV / Fire TV device to your Home Assistant instance.
description: Download a file from your Android / Fire TV device to your Home Assistant instance.
target:
entity:
integration: androidtv
@@ -25,7 +25,7 @@ download:
fields:
device_path:
name: Device path
description: The filepath on the Android TV / Fire TV device.
description: The filepath on the Android / Fire TV device.
required: true
example: "/storage/emulated/0/Download/example.txt"
selector:
@@ -39,7 +39,7 @@ download:
text:
upload:
name: Upload
description: Upload a file from your Home Assistant instance to an Android TV / Fire TV device.
description: Upload a file from your Home Assistant instance to an Android / Fire TV device.
target:
entity:
integration: androidtv
@@ -47,7 +47,7 @@ upload:
fields:
device_path:
name: Device path
description: The filepath on the Android TV / Fire TV device.
description: The filepath on the Android / Fire TV device.
required: true
example: "/storage/emulated/0/Download/example.txt"
selector:

View File

@@ -38,7 +38,7 @@
}
},
"apps": {
"title": "Configure Android TV Apps",
"title": "Configure Android Apps",
"description": "Configure application id {app_id}",
"data": {
"app_name": "Application Name",
@@ -47,7 +47,7 @@
}
},
"rules": {
"title": "Configure Android TV state detection rules",
"title": "Configure Android state detection rules",
"description": "Configure detection rule for application id {rule_id}",
"data": {
"rule_id": "Application ID",

View File

@@ -0,0 +1,86 @@
"""The Android TV Remote integration."""
from __future__ import annotations
import logging
from androidtvremote2 import (
AndroidTVRemote,
CannotConnect,
ConnectionClosed,
InvalidAuth,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_NAME, EVENT_HOMEASSISTANT_STOP, Platform
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from .const import DOMAIN
from .helpers import create_api
_LOGGER = logging.getLogger(__name__)
PLATFORMS: list[Platform] = [Platform.MEDIA_PLAYER, Platform.REMOTE]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Android TV Remote from a config entry."""
api = create_api(hass, entry.data[CONF_HOST])
@callback
def is_available_updated(is_available: bool) -> None:
if is_available:
_LOGGER.info(
"Reconnected to %s at %s", entry.data[CONF_NAME], entry.data[CONF_HOST]
)
else:
_LOGGER.warning(
"Disconnected from %s at %s",
entry.data[CONF_NAME],
entry.data[CONF_HOST],
)
api.add_is_available_updated_callback(is_available_updated)
try:
await api.async_connect()
except InvalidAuth as exc:
# The Android TV is hard reset or the certificate and key files were deleted.
raise ConfigEntryAuthFailed from exc
except (CannotConnect, ConnectionClosed) as exc:
# The Android TV is network unreachable. Raise exception and let Home Assistant retry
# later. If device gets a new IP address the zeroconf flow will update the config.
raise ConfigEntryNotReady from exc
def reauth_needed() -> None:
"""Start a reauth flow if Android TV is hard reset while reconnecting."""
entry.async_start_reauth(hass)
# Start a task (canceled in disconnect) to keep reconnecting if device becomes
# network unreachable. If device gets a new IP address the zeroconf flow will
# update the config entry data and reload the config entry.
api.keep_reconnecting(reauth_needed)
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = api
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
@callback
def on_hass_stop(event) -> None:
"""Stop push updates when hass stops."""
api.disconnect()
entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
)
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
api: AndroidTVRemote = hass.data[DOMAIN].pop(entry.entry_id)
api.disconnect()
return unload_ok

View File

@@ -0,0 +1,188 @@
"""Config flow for Android TV Remote integration."""
from __future__ import annotations
from collections.abc import Mapping
from typing import Any
from androidtvremote2 import (
AndroidTVRemote,
CannotConnect,
ConnectionClosed,
InvalidAuth,
)
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components import zeroconf
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.device_registry import format_mac
from .const import DOMAIN
from .helpers import create_api
STEP_USER_DATA_SCHEMA = vol.Schema(
{
vol.Required("host"): str,
}
)
STEP_PAIR_DATA_SCHEMA = vol.Schema(
{
vol.Required("pin"): str,
}
)
class AndroidTVRemoteConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Android TV Remote."""
VERSION = 1
def __init__(self) -> None:
"""Initialize a new AndroidTVRemoteConfigFlow."""
self.api: AndroidTVRemote | None = None
self.reauth_entry: config_entries.ConfigEntry | None = None
self.host: str | None = None
self.name: str | None = None
self.mac: str | None = None
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the initial step."""
errors: dict[str, str] = {}
if user_input is not None:
self.host = user_input["host"]
assert self.host
api = create_api(self.hass, self.host)
try:
self.name, self.mac = await api.async_get_name_and_mac()
assert self.mac
await self.async_set_unique_id(format_mac(self.mac))
self._abort_if_unique_id_configured(updates={CONF_HOST: self.host})
return await self._async_start_pair()
except (CannotConnect, ConnectionClosed):
# Likely invalid IP address or device is network unreachable. Stay
# in the user step allowing the user to enter a different host.
errors["base"] = "cannot_connect"
return self.async_show_form(
step_id="user",
data_schema=STEP_USER_DATA_SCHEMA,
errors=errors,
)
async def _async_start_pair(self) -> FlowResult:
"""Start pairing with the Android TV. Navigate to the pair flow to enter the PIN shown on screen."""
assert self.host
self.api = create_api(self.hass, self.host)
await self.api.async_generate_cert_if_missing()
await self.api.async_start_pairing()
return await self.async_step_pair()
async def async_step_pair(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the pair step."""
errors: dict[str, str] = {}
if user_input is not None:
try:
pin = user_input["pin"]
assert self.api
await self.api.async_finish_pairing(pin)
if self.reauth_entry:
await self.hass.config_entries.async_reload(
self.reauth_entry.entry_id
)
return self.async_abort(reason="reauth_successful")
assert self.name
return self.async_create_entry(
title=self.name,
data={
CONF_HOST: self.host,
CONF_NAME: self.name,
CONF_MAC: self.mac,
},
)
except InvalidAuth:
# Invalid PIN. Stay in the pair step allowing the user to enter
# a different PIN.
errors["base"] = "invalid_auth"
except ConnectionClosed:
# Either user canceled pairing on the Android TV itself (most common)
# or device doesn't respond to the specified host (device was unplugged,
# network was unplugged, or device got a new IP address).
# Attempt to pair again.
try:
return await self._async_start_pair()
except (CannotConnect, ConnectionClosed):
# Device doesn't respond to the specified host. Abort.
# If we are in the user flow we could go back to the user step to allow
# them to enter a new IP address but we cannot do that for the zeroconf
# flow. Simpler to abort for both flows.
return self.async_abort(reason="cannot_connect")
return self.async_show_form(
step_id="pair",
data_schema=STEP_PAIR_DATA_SCHEMA,
description_placeholders={CONF_NAME: self.name},
errors=errors,
)
async def async_step_zeroconf(
self, discovery_info: zeroconf.ZeroconfServiceInfo
) -> FlowResult:
"""Handle zeroconf discovery."""
self.host = discovery_info.host
self.name = discovery_info.name.removesuffix("._androidtvremote2._tcp.local.")
self.mac = discovery_info.properties.get("bt")
if not self.mac:
return self.async_abort(reason="cannot_connect")
await self.async_set_unique_id(format_mac(self.mac))
self._abort_if_unique_id_configured(
updates={CONF_HOST: self.host, CONF_NAME: self.name}
)
self.context.update({"title_placeholders": {CONF_NAME: self.name}})
return await self.async_step_zeroconf_confirm()
async def async_step_zeroconf_confirm(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle a flow initiated by zeroconf."""
if user_input is not None:
try:
return await self._async_start_pair()
except (CannotConnect, ConnectionClosed):
# Device became network unreachable after discovery.
# Abort and let discovery find it again later.
return self.async_abort(reason="cannot_connect")
return self.async_show_form(
step_id="zeroconf_confirm",
description_placeholders={CONF_NAME: self.name},
)
async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult:
"""Handle configuration by re-auth."""
self.host = entry_data[CONF_HOST]
self.name = entry_data[CONF_NAME]
self.mac = entry_data[CONF_MAC]
self.reauth_entry = self.hass.config_entries.async_get_entry(
self.context["entry_id"]
)
return await self.async_step_reauth_confirm()
async def async_step_reauth_confirm(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Dialog that informs the user that reauth is required."""
errors: dict[str, str] = {}
if user_input is not None:
try:
return await self._async_start_pair()
except (CannotConnect, ConnectionClosed):
# Device is network unreachable. Abort.
errors["base"] = "cannot_connect"
return self.async_show_form(
step_id="reauth_confirm",
description_placeholders={CONF_NAME: self.name},
errors=errors,
)

View File

@@ -0,0 +1,6 @@
"""Constants for the Android TV Remote integration."""
from __future__ import annotations
from typing import Final
DOMAIN: Final = "androidtv_remote"

View File

@@ -0,0 +1,29 @@
"""Diagnostics support for Android TV Remote."""
from __future__ import annotations
from typing import Any
from androidtvremote2 import AndroidTVRemote
from homeassistant.components.diagnostics import async_redact_data
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MAC
from homeassistant.core import HomeAssistant
from .const import DOMAIN
TO_REDACT = {CONF_HOST, CONF_MAC}
async def async_get_config_entry_diagnostics(
hass: HomeAssistant, entry: ConfigEntry
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
api: AndroidTVRemote = hass.data[DOMAIN].pop(entry.entry_id)
return async_redact_data(
{
"api_device_info": api.device_info,
"config_entry_data": entry.data,
},
TO_REDACT,
)

View File

@@ -0,0 +1,84 @@
"""Base entity for Android TV Remote."""
from __future__ import annotations
from androidtvremote2 import AndroidTVRemote, ConnectionClosed
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.entity import DeviceInfo, Entity
from .const import DOMAIN
class AndroidTVRemoteBaseEntity(Entity):
"""Android TV Remote Base Entity."""
_attr_has_entity_name = True
_attr_should_poll = False
def __init__(self, api: AndroidTVRemote, config_entry: ConfigEntry) -> None:
"""Initialize the entity."""
self._api = api
self._host = config_entry.data[CONF_HOST]
self._name = config_entry.data[CONF_NAME]
self._attr_unique_id = config_entry.unique_id
self._attr_is_on = api.is_on
device_info = api.device_info
assert config_entry.unique_id
assert device_info
self._attr_device_info = DeviceInfo(
connections={(CONNECTION_NETWORK_MAC, config_entry.data[CONF_MAC])},
identifiers={(DOMAIN, config_entry.unique_id)},
name=self._name,
manufacturer=device_info["manufacturer"],
model=device_info["model"],
)
@callback
def _is_available_updated(self, is_available: bool) -> None:
"""Update the state when the device is ready to receive commands or is unavailable."""
self._attr_available = is_available
self.async_write_ha_state()
@callback
def _is_on_updated(self, is_on: bool) -> None:
"""Update the state when device turns on or off."""
self._attr_is_on = is_on
self.async_write_ha_state()
async def async_added_to_hass(self) -> None:
"""Register callbacks."""
self._api.add_is_available_updated_callback(self._is_available_updated)
self._api.add_is_on_updated_callback(self._is_on_updated)
async def async_will_remove_from_hass(self) -> None:
"""Remove callbacks."""
self._api.remove_is_available_updated_callback(self._is_available_updated)
self._api.remove_is_on_updated_callback(self._is_on_updated)
def _send_key_command(self, key_code: str, direction: str = "SHORT") -> None:
"""Send a key press to Android TV.
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
"""
try:
self._api.send_key_command(key_code, direction)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc
def _send_launch_app_command(self, app_link: str) -> None:
"""Launch an app on Android TV.
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
"""
try:
self._api.send_launch_app_command(app_link)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc

View File

@@ -0,0 +1,18 @@
"""Helper functions for Android TV Remote integration."""
from __future__ import annotations
from androidtvremote2 import AndroidTVRemote
from homeassistant.core import HomeAssistant
from homeassistant.helpers.storage import STORAGE_DIR
def create_api(hass: HomeAssistant, host: str) -> AndroidTVRemote:
"""Create an AndroidTVRemote instance."""
return AndroidTVRemote(
client_name="Home Assistant",
certfile=hass.config.path(STORAGE_DIR, "androidtv_remote_cert.pem"),
keyfile=hass.config.path(STORAGE_DIR, "androidtv_remote_key.pem"),
host=host,
loop=hass.loop,
)

View File

@@ -0,0 +1,13 @@
{
"domain": "androidtv_remote",
"name": "Android TV Remote",
"codeowners": ["@tronikos", "@Drafteed"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/androidtv_remote",
"integration_type": "device",
"iot_class": "local_push",
"loggers": ["androidtvremote2"],
"quality_scale": "platinum",
"requirements": ["androidtvremote2==0.0.9"],
"zeroconf": ["_androidtvremote2._tcp.local."]
}

View File

@@ -0,0 +1,198 @@
"""Media player support for Android TV Remote."""
from __future__ import annotations
import asyncio
from typing import Any
from androidtvremote2 import AndroidTVRemote, ConnectionClosed
from homeassistant.components.media_player import (
MediaPlayerDeviceClass,
MediaPlayerEntity,
MediaPlayerEntityFeature,
MediaPlayerState,
MediaType,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .entity import AndroidTVRemoteBaseEntity
PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the Android TV media player entity based on a config entry."""
api: AndroidTVRemote = hass.data[DOMAIN][config_entry.entry_id]
async_add_entities([AndroidTVRemoteMediaPlayerEntity(api, config_entry)])
class AndroidTVRemoteMediaPlayerEntity(AndroidTVRemoteBaseEntity, MediaPlayerEntity):
"""Android TV Remote Media Player Entity."""
_attr_assumed_state = True
_attr_device_class = MediaPlayerDeviceClass.TV
_attr_supported_features = (
MediaPlayerEntityFeature.PAUSE
| MediaPlayerEntityFeature.VOLUME_STEP
| MediaPlayerEntityFeature.VOLUME_MUTE
| MediaPlayerEntityFeature.PREVIOUS_TRACK
| MediaPlayerEntityFeature.NEXT_TRACK
| MediaPlayerEntityFeature.TURN_ON
| MediaPlayerEntityFeature.TURN_OFF
| MediaPlayerEntityFeature.PLAY
| MediaPlayerEntityFeature.STOP
| MediaPlayerEntityFeature.PLAY_MEDIA
)
def __init__(self, api: AndroidTVRemote, config_entry: ConfigEntry) -> None:
"""Initialize the entity."""
super().__init__(api, config_entry)
# This task is needed to create a job that sends a key press
# sequence that can be canceled if concurrency occurs
self._channel_set_task: asyncio.Task | None = None
def _update_current_app(self, current_app: str) -> None:
"""Update current app info."""
self._attr_app_id = current_app
self._attr_app_name = current_app
def _update_volume_info(self, volume_info: dict[str, str | bool]) -> None:
"""Update volume info."""
if volume_info.get("max"):
self._attr_volume_level = int(volume_info["level"]) / int(
volume_info["max"]
)
self._attr_is_volume_muted = bool(volume_info["muted"])
else:
self._attr_volume_level = None
self._attr_is_volume_muted = None
@callback
def _current_app_updated(self, current_app: str) -> None:
"""Update the state when the current app changes."""
self._update_current_app(current_app)
self.async_write_ha_state()
@callback
def _volume_info_updated(self, volume_info: dict[str, str | bool]) -> None:
"""Update the state when the volume info changes."""
self._update_volume_info(volume_info)
self.async_write_ha_state()
async def async_added_to_hass(self) -> None:
"""Register callbacks."""
await super().async_added_to_hass()
self._update_current_app(self._api.current_app)
self._update_volume_info(self._api.volume_info)
self._api.add_current_app_updated_callback(self._current_app_updated)
self._api.add_volume_info_updated_callback(self._volume_info_updated)
async def async_will_remove_from_hass(self) -> None:
"""Remove callbacks."""
await super().async_will_remove_from_hass()
self._api.remove_current_app_updated_callback(self._current_app_updated)
self._api.remove_volume_info_updated_callback(self._volume_info_updated)
@property
def state(self) -> MediaPlayerState:
"""Return the state of the device."""
if self._attr_is_on:
return MediaPlayerState.ON
return MediaPlayerState.OFF
async def async_turn_on(self) -> None:
"""Turn the Android TV on."""
if not self._attr_is_on:
self._send_key_command("POWER")
async def async_turn_off(self) -> None:
"""Turn the Android TV off."""
if self._attr_is_on:
self._send_key_command("POWER")
async def async_volume_up(self) -> None:
"""Turn volume up for media player."""
self._send_key_command("VOLUME_UP")
async def async_volume_down(self) -> None:
"""Turn volume down for media player."""
self._send_key_command("VOLUME_DOWN")
async def async_mute_volume(self, mute: bool) -> None:
"""Mute the volume."""
if mute != self.is_volume_muted:
self._send_key_command("VOLUME_MUTE")
async def async_media_play(self) -> None:
"""Send play command."""
self._send_key_command("MEDIA_PLAY")
async def async_media_pause(self) -> None:
"""Send pause command."""
self._send_key_command("MEDIA_PAUSE")
async def async_media_play_pause(self) -> None:
"""Send play/pause command."""
self._send_key_command("MEDIA_PLAY_PAUSE")
async def async_media_stop(self) -> None:
"""Send stop command."""
self._send_key_command("MEDIA_STOP")
async def async_media_previous_track(self) -> None:
"""Send previous track command."""
self._send_key_command("MEDIA_PREVIOUS")
async def async_media_next_track(self) -> None:
"""Send next track command."""
self._send_key_command("MEDIA_NEXT")
async def async_play_media(
self, media_type: MediaType | str, media_id: str, **kwargs: Any
) -> None:
"""Play a piece of media."""
if media_type == MediaType.CHANNEL:
if not media_id.isnumeric():
raise ValueError(f"Channel must be numeric: {media_id}")
if self._channel_set_task:
self._channel_set_task.cancel()
self._channel_set_task = asyncio.create_task(
self._send_key_commands(list(media_id))
)
await self._channel_set_task
return
if media_type == MediaType.URL:
self._send_launch_app_command(media_id)
return
raise ValueError(f"Invalid media type: {media_type}")
async def _send_key_commands(
self, key_codes: list[str], delay_secs: float = 0.1
) -> None:
"""Send a key press sequence to Android TV.
The delay is necessary because device may ignore
some commands if we send the sequence without delay.
"""
try:
for key_code in key_codes:
self._api.send_key_command(key_code)
await asyncio.sleep(delay_secs)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc

View File

@@ -0,0 +1,92 @@
"""Remote control support for Android TV Remote."""
from __future__ import annotations
import asyncio
from collections.abc import Iterable
from typing import Any
from androidtvremote2 import AndroidTVRemote
from homeassistant.components.remote import (
ATTR_ACTIVITY,
ATTR_DELAY_SECS,
ATTR_HOLD_SECS,
ATTR_NUM_REPEATS,
DEFAULT_DELAY_SECS,
DEFAULT_HOLD_SECS,
DEFAULT_NUM_REPEATS,
RemoteEntity,
RemoteEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .entity import AndroidTVRemoteBaseEntity
PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the Android TV remote entity based on a config entry."""
api: AndroidTVRemote = hass.data[DOMAIN][config_entry.entry_id]
async_add_entities([AndroidTVRemoteEntity(api, config_entry)])
class AndroidTVRemoteEntity(AndroidTVRemoteBaseEntity, RemoteEntity):
"""Android TV Remote Entity."""
_attr_supported_features = RemoteEntityFeature.ACTIVITY
@callback
def _current_app_updated(self, current_app: str) -> None:
"""Update the state when the current app changes."""
self._attr_current_activity = current_app
self.async_write_ha_state()
async def async_added_to_hass(self) -> None:
"""Register callbacks."""
await super().async_added_to_hass()
self._attr_current_activity = self._api.current_app
self._api.add_current_app_updated_callback(self._current_app_updated)
async def async_will_remove_from_hass(self) -> None:
"""Remove callbacks."""
await super().async_will_remove_from_hass()
self._api.remove_current_app_updated_callback(self._current_app_updated)
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the Android TV on."""
if not self.is_on:
self._send_key_command("POWER")
activity = kwargs.get(ATTR_ACTIVITY, "")
if activity:
self._send_launch_app_command(activity)
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the Android TV off."""
if self.is_on:
self._send_key_command("POWER")
async def async_send_command(self, command: Iterable[str], **kwargs: Any) -> None:
"""Send commands to one device."""
num_repeats = kwargs.get(ATTR_NUM_REPEATS, DEFAULT_NUM_REPEATS)
delay_secs = kwargs.get(ATTR_DELAY_SECS, DEFAULT_DELAY_SECS)
hold_secs = kwargs.get(ATTR_HOLD_SECS, DEFAULT_HOLD_SECS)
for _ in range(num_repeats):
for single_command in command:
if hold_secs:
self._send_key_command(single_command, "START_LONG")
await asyncio.sleep(hold_secs)
self._send_key_command(single_command, "END_LONG")
else:
self._send_key_command(single_command, "SHORT")
await asyncio.sleep(delay_secs)

View File

@@ -0,0 +1,38 @@
{
"config": {
"flow_title": "{name}",
"step": {
"user": {
"description": "Enter the IP address of the Android TV you want to add to Home Assistant. It will turn on and a pairing code will be displayed on it that you will need to enter in the next screen.",
"data": {
"host": "[%key:common::config_flow::data::host%]"
}
},
"zeroconf_confirm": {
"title": "Discovered Android TV",
"description": "Do you want to add the Android TV ({name}) to Home Assistant? It will turn on and a pairing code will be displayed on it that you will need to enter in the next screen."
},
"pair": {
"description": "Enter the pairing code displayed on the Android TV ({name}).",
"data": {
"pin": "[%key:common::config_flow::data::pin%]"
}
},
"reauth_confirm": {
"title": "[%key:common::config_flow::title::reauth%]",
"description": "You need to pair again with the Android TV ({name})."
}
},
"error": {
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
}
}
}

View File

@@ -0,0 +1,78 @@
"""The Anova integration."""
from __future__ import annotations
import logging
from anova_wifi import AnovaApi, AnovaPrecisionCooker, InvalidLogin, NoDevicesFound
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client
from .const import DOMAIN
from .coordinator import AnovaCoordinator
from .models import AnovaData
from .util import serialize_device_list
PLATFORMS = [Platform.SENSOR]
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Anova from a config entry."""
api = AnovaApi(
aiohttp_client.async_get_clientsession(hass),
entry.data[CONF_USERNAME],
entry.data[CONF_PASSWORD],
)
try:
await api.authenticate()
except InvalidLogin as err:
_LOGGER.error(
"Login was incorrect - please log back in through the config flow. %s", err
)
return False
assert api.jwt
api.existing_devices = [
AnovaPrecisionCooker(
aiohttp_client.async_get_clientsession(hass),
device[0],
device[1],
api.jwt,
)
for device in entry.data["devices"]
]
try:
new_devices = await api.get_devices()
except NoDevicesFound:
# get_devices raises an exception if no devices are online
new_devices = []
devices = api.existing_devices
if new_devices:
hass.config_entries.async_update_entry(
entry,
data={
**entry.data,
**{"devices": serialize_device_list(devices)},
},
)
coordinators = [AnovaCoordinator(hass, device) for device in devices]
for coordinator in coordinators:
await coordinator.async_config_entry_first_refresh()
firmware_version = coordinator.data.sensor.firmware_version
coordinator.async_setup(str(firmware_version))
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = AnovaData(
api_jwt=api.jwt, precision_cookers=devices, coordinators=coordinators
)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
hass.data[DOMAIN].pop(entry.entry_id)
return unload_ok

View File

@@ -0,0 +1,61 @@
"""Config flow for Anova."""
from __future__ import annotations
from anova_wifi import AnovaApi, InvalidLogin, NoDevicesFound
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import aiohttp_client
from .const import DOMAIN
from .util import serialize_device_list
class AnovaConfligFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Sets up a config flow for Anova."""
VERSION = 1
async def async_step_user(
self, user_input: dict[str, str] | None = None
) -> FlowResult:
"""Handle a flow initiated by the user."""
errors: dict[str, str] = {}
if user_input is not None:
api = AnovaApi(
aiohttp_client.async_get_clientsession(self.hass),
user_input[CONF_USERNAME],
user_input[CONF_PASSWORD],
)
await self.async_set_unique_id(user_input[CONF_USERNAME].lower())
self._abort_if_unique_id_configured()
try:
await api.authenticate()
devices = await api.get_devices()
except InvalidLogin:
errors["base"] = "invalid_auth"
except NoDevicesFound:
errors["base"] = "no_devices_found"
except Exception: # pylint: disable=broad-except
errors["base"] = "unknown"
else:
# We store device list in config flow in order to persist found devices on restart, as the Anova api get_devices does not return any devices that are offline.
device_list = serialize_device_list(devices)
return self.async_create_entry(
title="Anova",
data={
CONF_USERNAME: api.username,
CONF_PASSWORD: api.password,
"devices": device_list,
},
)
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str}
),
errors=errors,
)

View File

@@ -0,0 +1,6 @@
"""Constants for the Anova integration."""
DOMAIN = "anova"
ANOVA_CLIENT = "anova_api_client"
ANOVA_FIRMWARE_VERSION = "anova_firmware_version"

View File

@@ -0,0 +1,53 @@
"""Support for Anova Coordinators."""
from datetime import timedelta
import logging
from anova_wifi import AnovaOffline, AnovaPrecisionCooker, APCUpdate
import async_timeout
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
class AnovaCoordinator(DataUpdateCoordinator[APCUpdate]):
"""Anova custom coordinator."""
def __init__(
self,
hass: HomeAssistant,
anova_device: AnovaPrecisionCooker,
) -> None:
"""Set up Anova Coordinator."""
super().__init__(
hass,
name="Anova Precision Cooker",
logger=_LOGGER,
update_interval=timedelta(seconds=30),
)
assert self.config_entry is not None
self._device_unique_id = anova_device.device_key
self.anova_device = anova_device
self.device_info: DeviceInfo | None = None
@callback
def async_setup(self, firmware_version: str) -> None:
"""Set the firmware version info."""
self.device_info = DeviceInfo(
identifiers={(DOMAIN, self._device_unique_id)},
name="Anova Precision Cooker",
manufacturer="Anova",
model="Precision Cooker",
sw_version=firmware_version,
)
async def _async_update_data(self) -> APCUpdate:
try:
async with async_timeout.timeout(5):
return await self.anova_device.update()
except AnovaOffline as err:
raise UpdateFailed(err) from err

View File

@@ -0,0 +1,30 @@
"""Base entity for the Anova integration."""
from __future__ import annotations
from homeassistant.helpers.entity import Entity, EntityDescription
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .coordinator import AnovaCoordinator
class AnovaEntity(CoordinatorEntity[AnovaCoordinator], Entity):
"""Defines a Anova entity."""
def __init__(self, coordinator: AnovaCoordinator) -> None:
"""Initialize the Anova entity."""
super().__init__(coordinator)
self.device = coordinator.anova_device
self._attr_device_info = coordinator.device_info
self._attr_has_entity_name = True
class AnovaDescriptionEntity(AnovaEntity, Entity):
"""Defines a Anova entity that uses a description."""
def __init__(
self, coordinator: AnovaCoordinator, description: EntityDescription
) -> None:
"""Initialize the entity and declare unique id based on description key."""
super().__init__(coordinator)
self.entity_description = description
self._attr_unique_id = f"{coordinator._device_unique_id}_{description.key}"

View File

@@ -0,0 +1,10 @@
{
"domain": "anova",
"name": "Anova",
"codeowners": ["@Lash-L"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/anova",
"iot_class": "cloud_polling",
"loggers": ["anova_wifi"],
"requirements": ["anova-wifi==0.10.0"]
}

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