Compare commits

...

978 Commits

Author SHA1 Message Date
Franck Nijhof
99634e22bd Bumped version to 2023.8.0b2 2023-07-30 19:18:42 +02:00
J. Nick Koston
4bd4c5666d Revert using has_entity_name in ESPHome when friendly_name is not set (#97488) 2023-07-30 19:18:24 +02:00
Marc Mueller
93c536882b Update ha-av to 10.1.1 (#97481) 2023-07-30 19:18:21 +02:00
starkillerOG
3764c2e9de Reolink long poll recover (#97465) 2023-07-30 19:18:18 +02:00
tronikos
b23286ce6f Bump opower to 0.0.16 (#97437) 2023-07-30 19:18:15 +02:00
J. Nick Koston
734c16b816 Bump nexia to 2.0.7 (#97432) 2023-07-30 19:18:12 +02:00
Joost Lekkerkerker
f1fc09cb1d Small cleanup in event entity (#97409) 2023-07-30 19:18:09 +02:00
Joost Lekkerkerker
364e7b838a Return the actual media url from media extractor (#97408) 2023-07-30 19:18:05 +02:00
G Johansson
7f9db40390 Manual trigger entity fix name influence entity_id (#97398) 2023-07-30 19:18:02 +02:00
starkillerOG
38e22f5614 Regard long poll without events as valid (#97383) 2023-07-30 19:17:59 +02:00
G Johansson
945959827d Bump pysensibo to 1.0.32 (#97382) 2023-07-30 19:17:56 +02:00
Chris Talkington
1a0593fc9a Allow deleting config entry devices in jellyfin (#97377) 2023-07-30 19:17:53 +02:00
J. Nick Koston
f54c36ec16 Bump dbus-fast to 1.87.5 (#97364) 2023-07-30 19:17:50 +02:00
starkillerOG
3beffb5103 Bump reolink_aio to 0.7.5 (#97357)
* bump reolink-aio to 0.7.4

* Bump reolink_aio to 0.7.5
2023-07-30 19:17:47 +02:00
Niels Perfors
78dad22fb3 Upgrade Verisure to 2.6.4 (#97278) 2023-07-30 19:17:42 +02:00
Franck Nijhof
768afeee21 Bumped version to 2023.8.0b1 2023-07-27 20:34:13 +02:00
J. Nick Koston
36982cea7a Bump aiohomekit to 2.6.12 (#97342) 2023-07-27 20:33:57 +02:00
Franck Nijhof
80092dabdf Add urllib3<2 package constraint (#97339) 2023-07-27 20:33:54 +02:00
Jc2k
e4246902fb Split availability and data subscriptions in homekit_controller (#97337) 2023-07-27 20:33:51 +02:00
Marcel van der Veldt
7dc9204346 Hue event entity follow up (#97336) 2023-07-27 20:33:47 +02:00
J. Nick Koston
d7af1acf28 Bump aioesphomeapi to 15.1.15 (#97335)
changelog: https://github.com/esphome/aioesphomeapi/compare/v15.1.14...v15.1.15
2023-07-27 20:33:44 +02:00
David Knowles
3028d40e7c Bump pydrawise to 2023.7.1 (#97334) 2023-07-27 20:33:41 +02:00
David Knowles
37e9fff1eb Fix Hydrawise zone addressing (#97333) 2023-07-27 20:33:37 +02:00
Maikel Punie
d05efe8c6a Duotecno beta fix (#97325)
* Fix duotecno

* Implement comments

* small cover fix
2023-07-27 20:33:34 +02:00
Franck Nijhof
2163834375 Fix DeviceInfo configuration_url validation (#97319) 2023-07-27 20:33:31 +02:00
G Johansson
52ce21f3b6 Fix sql entities not loading (#97316) 2023-07-27 20:33:27 +02:00
Markus Becker
4eb37172a8 Fix typo Lomng -> Long (#97315) 2023-07-27 20:33:24 +02:00
Luke
d6dba4b42b bump python-roborock to 0.30.2 (#97306) 2023-07-27 20:33:20 +02:00
Jan Bouwhuis
c925e1826b Set mqtt entity name to null when it is a duplicate of the device name (#97304) 2023-07-27 20:33:17 +02:00
J. Nick Koston
aee6e0e6eb Fix dumping lru stats in the profiler (#97303) 2023-07-27 20:33:13 +02:00
Franck Nijhof
1b664e6a0b Fix implicit use of device name in TPLink switch (#97293) 2023-07-27 20:33:10 +02:00
G Johansson
c48f1b7899 Weather remove forecast deprecation (#97292) 2023-07-27 20:33:07 +02:00
Michael
fc6ff69564 Rename key of water level sensor in PEGELONLINE (#97289) 2023-07-27 20:33:03 +02:00
Marcel van der Veldt
d9beeac675 Bump aioslimproto to 2.3.3 (#97283) 2023-07-27 20:33:00 +02:00
Franck Nijhof
73076fe94d Fix zodiac import flow/issue (#97282) 2023-07-27 20:32:57 +02:00
J.P. Krauss
20df37c132 Improve AirNow Configuration Error Handling (#97267)
* Fix config flow error handling when no data is returned by AirNow API

* Add test for PyAirNow EmptyResponseError

* Typo Fix
2023-07-27 20:32:54 +02:00
Michael Hansen
b2adb4edbe Add wildcards to sentence triggers (#97236)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-27 20:32:49 +02:00
Jan-Philipp Benecke
e31a4610f7 Fix authlib version constraint required by point (#97228) 2023-07-27 20:32:45 +02:00
Franck Nijhof
6200fd381e Bumped version to 2023.8.0b0 2023-07-26 16:47:34 +02:00
Marcel van der Veldt
94870f05ee Fix invalid ColorMode on (some) 3rd party Hue Color lights (#97263) 2023-07-26 16:43:02 +02:00
Marcel van der Veldt
2ae059d4fc Add Event platform/entity to Hue integration (#97256)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-26 16:42:01 +02:00
Joost Lekkerkerker
d233438e1a Handle UpdateFailed for YouTube (#97233) 2023-07-26 15:09:15 +02:00
mkmer
db491c86c3 Bump whirlpool-sixth-sense to 0.18.4 (#97255) 2023-07-26 13:52:26 +02:00
Marcel van der Veldt
fd44bef39b Add Event platform to Matter (#97219) 2023-07-26 12:19:23 +02:00
Maikel Punie
d7af1e2d5d Add duotecno covers (#97205) 2023-07-26 11:45:55 +02:00
tronikos
5ec8165689 Add virtual integrations supported by opower (#97250) 2023-07-26 11:39:50 +02:00
Marcel van der Veldt
ae33670b33 Add guard for missing xy color support in Matter light platform (#97251) 2023-07-26 11:37:13 +02:00
Marc Mueller
1a25b17c27 Fix pegel_online generic typing (#97252) 2023-07-26 11:36:51 +02:00
Paulus Schoutsen
aad281db18 Add service to OpenAI to Generate an image (#97018)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-26 10:14:18 +02:00
Michael
5caa1969c5 Add Pegel Online integration (#97028) 2023-07-26 09:12:39 +02:00
Maikel Punie
b4a46b9817 Codeowner update for cert-expiry (#97246) 2023-07-26 09:07:47 +02:00
Jc2k
c0debaf26e Add event entities to homekit_controller (#97140)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-26 08:20:41 +02:00
Amos Yuen
d0512d5b26 Stop rounding history_stats sensor (#97195) 2023-07-26 08:09:50 +02:00
J. Nick Koston
70b1083c8f Bump pyunifiprotect to 4.10.6 (#97240) 2023-07-26 08:06:24 +02:00
Robert Svensson
89069bb9b8 Add WLAN clients reporting to UniFi Sensor platform (#97234) 2023-07-26 08:00:17 +02:00
tronikos
4a649ff31d Bump opower==0.0.15 (#97243) 2023-07-26 07:48:06 +02:00
Michael Hansen
311c321d06 Add HassShoppingListAddItem to default agent (#97232)
* Bump hassil and intents package for HassShoppingListAddItem

* Remove hard-coded response text

* Test adding item to the shopping list

* Hook removed import in test for some reason
2023-07-25 22:19:03 -04:00
ollo69
c3977b5eb3 Correct AsusWRT device identifier (#97238) 2023-07-26 01:01:39 +02:00
Joost Lekkerkerker
66bbe6865e Bump youtubeaio to 1.1.5 (#97231) 2023-07-25 22:39:55 +02:00
mkmer
c6f21b47a8 Whrilpool add periodic update (#97222) 2023-07-25 22:23:31 +02:00
Joost Lekkerkerker
234715a8c6 Add explicit device naming for Verisure (#97224) 2023-07-25 20:48:05 +02:00
Joost Lekkerkerker
585d357129 Add config flow to OpenSky (#96912)
Co-authored-by: Sander <developer@golles.nl>
2023-07-25 20:46:04 +02:00
Franck Nijhof
b4200cb85e Update frontend to 20230725.0 (#97220) 2023-07-25 19:44:32 +02:00
J. Nick Koston
6ae79524bd Add support for bleak 0.21 (#97212) 2023-07-25 19:30:54 +02:00
J. Nick Koston
213a1690f3 Bump bleak-retry-connector to 3.1.1 (#97218) 2023-07-25 19:21:11 +02:00
Jan-Philipp Benecke
c2f9070f40 Check before casting to float & add integration type to bsblan (#97210) 2023-07-25 16:11:37 +02:00
Robert Svensson
8d6c4e3306 Add controls to enable and disable a UniFi WLAN (#97204) 2023-07-25 14:01:57 +02:00
Jan-Philipp Benecke
a0b61a1188 Bump pydiscovergy to 2.0.1 (#97186) 2023-07-25 13:58:38 +02:00
Jan Bouwhuis
fb00cd8963 Add turn on/off support for mqtt water_heater (#97197) 2023-07-25 13:33:02 +02:00
Luke
6c43ce69d3 Add time platform to Roborock (#94039) 2023-07-25 13:29:48 +02:00
Michael Arthur
6b41c324cc Fix broken translation keys (#97202) 2023-07-25 12:42:24 +02:00
J. Nick Koston
bb0727ab8a Bump home-assistant-bluetooth to 1.10.2 (#97193) 2023-07-25 05:20:03 -05:00
Marcel van der Veldt
5e40fe97fd Prevent duplicate Matter attribute event subscription (#97194) 2023-07-25 12:14:22 +02:00
Maciej Bieniek
cd84a188ee Improve Tractive sensor names (#97192)
* Improve entity names

* Rename translation keys
2023-07-25 11:59:11 +02:00
Maikel Punie
7f049c5b20 Add the Duotecno intergration (#96399)
Co-authored-by: Isak Nyberg <36712644+IsakNyberg@users.noreply.github.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 11:16:00 +02:00
Maciej Bieniek
fc41f3d25b Use device class ENUM for Tractive tracker state sensor (#97191) 2023-07-25 11:13:52 +02:00
Matthias Alphart
74deb8b011 Add datetime platform to KNX (#97190) 2023-07-25 11:04:05 +02:00
Michael Arthur
6ef7c5ece6 Add electric kiwi integration (#81149)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 10:46:53 +02:00
Joost Lekkerkerker
04f6d1848b Implement YouTube async library (#97072) 2023-07-25 10:18:20 +02:00
Jan Bouwhuis
714a04d603 Add service turn_on and turn_off service for water_heater (#94817) 2023-07-25 10:16:05 +02:00
elmurato
90bf2d3076 Move Minecraft Server base entity to its own file (#97187) 2023-07-25 10:14:01 +02:00
Robert Svensson
06f97679ee Add WLAN QR code support to UniFi Image platform (#97171) 2023-07-25 10:11:48 +02:00
Adrián Moreno
f2726527f2 Create zwave_js repair issue instead of warning log entry (#95997)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-25 09:55:05 +02:00
Erik Montnemery
0dc5875cbd Bump python-otbr-api to 2.3.0 (#97185) 2023-07-25 09:22:57 +02:00
Meow
024d646526 Aligned integration manifest files (#97175) 2023-07-25 08:33:56 +02:00
Matrix
3bbbd8642f Add yolink finger support (#96944) 2023-07-25 08:30:16 +02:00
Mike Woudenberg
945fffebcc Use get_url to get Home Assistant instance for Loqed webhook (#95761) 2023-07-25 08:27:18 +02:00
G Johansson
c312dcbc4b Scrape refactor to ManualTriggerEntity (#96329) 2023-07-25 00:54:19 +02:00
Renier Moorcroft
5ec633a839 Add Ezviz button entities (#93647)
* Initial commit

* Add button for ptz

* coveragerc

* Add ptz buttons to PTZ cameras only

* Describe support capbility

* Improve typing

* bump api version.

* Match entity naming used throughout

* Add translation

* Create ir before execution and breaks in version

* Fix for translation missing name key.

* Change depreciation to 2024.2.0

* Update camera.py

* Tiny spelling tweaks

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 00:31:44 +02:00
Guido Schmitz
6717e40114 Use snapshots in devolo Home Network button tests (#95141)
Use snapshots
2023-07-25 00:20:09 +02:00
Michael
cce9d938f6 Make setup of Ecovacs async (#96200)
* make setup async

* apply suggestions
2023-07-25 00:07:43 +02:00
Michael Hansen
99e7b42127 Bump hassil and intents (#97174) 2023-07-24 16:52:16 -05:00
Álvaro Fernández Rojas
d1e96a356a Add Airzone Cloud Aidoo binary sensors (#95607)
airzone_cloud: add Aidoo binary sensors

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-07-24 23:27:33 +02:00
Maciej Bieniek
9f9602e8a7 Add frequency sensor for Shelly Plus/Pro xPM devices (#97172) 2023-07-24 23:07:57 +02:00
Duco Sebel
7c902d5aad Bumb python-homewizard-energy to 2.0.2 (#97169) 2023-07-24 22:19:37 +02:00
starkillerOG
8a58675be2 Reolink improve webhook URL error message (#96088)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-24 22:01:45 +02:00
J. Nick Koston
410b343ae0 Bump dbus-fast to 1.87.2 (#97167) 2023-07-24 14:48:18 -05:00
Ernst Klamer
28197adebd Add support for sleepy Xiaomi BLE sensors (#97166) 2023-07-24 21:13:16 +02:00
Matthias Alphart
8ff9f2ddbe Add date platform to KNX (#97154) 2023-07-24 21:12:37 +02:00
Joost Lekkerkerker
2dc86364f3 Migrate TPLink to has entity name (#96246) 2023-07-24 20:49:40 +02:00
J. Nick Koston
f8705a8074 Bump anyio to 3.7.1 (#97165) 2023-07-24 20:34:59 +02:00
J. Nick Koston
5cc72814c9 Bump fnv-hash-fast to 0.4.0 (#97160) 2023-07-24 20:34:46 +02:00
Joost Lekkerkerker
ba1bf9d39f Add entity translations to AsusWRT (#95125) 2023-07-24 20:29:23 +02:00
elmurato
557b6d511b Improve reading of MOTD and bump mcstatus to 11.0.0 (#95715)
* Improve reading of MOTD, bump mcstatus to 10.0.3 and getmac to 0.9.4

* Revert bump of getmac

* Bump mcstatus to 11.0.0-rc3. Use new MOTD parser.

* Bump mcstatus to 11.0.0
2023-07-24 20:23:11 +02:00
J. Nick Koston
649568be83 Bump ulid-transform to 0.8.0 (#97162) 2023-07-24 13:16:29 -05:00
Jan Stienstra
fb6699b498 Jellyfin: Sort seasons and episodes by index (#92961) 2023-07-24 20:13:26 +02:00
Renier Moorcroft
4c3d9e5205 Fix EZVIZ LightEntity occasional ValueError (#95679) 2023-07-24 20:03:31 +02:00
tronikos
d0722e2312 Android TV Remote: Add option to disable IME (#95765) 2023-07-24 20:00:51 +02:00
ollo69
2cfc11d4b9 Limit AndroidTV screencap calls (#96485) 2023-07-24 19:58:11 +02:00
ollo69
345df715d6 Change AsusWRT entities unique id (#97066)
Migrate AsusWRT entities unique id
2023-07-24 19:53:58 +02:00
Maciej Bieniek
17e757af36 Add sensors for Shelly Plus PM Mini (#97163) 2023-07-24 19:53:39 +02:00
J. Nick Koston
593960c704 Bump bluetooth deps (#97157) 2023-07-24 19:49:24 +02:00
J. Nick Koston
6e50576db2 Bump zeroconf to 0.71.4 (#97156) 2023-07-24 19:48:50 +02:00
Oliver
0d79903f90 Fix denonavr netaudio telnet event (#97159) 2023-07-24 12:41:41 -05:00
Joost Lekkerkerker
fe66c3414b Implement data coordinator for LastFM (#96942)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-24 19:39:46 +02:00
Jan-Philipp Benecke
e96bff1674 Add alternative key names for Discovergy voltage sensors (#97155) 2023-07-24 19:31:25 +02:00
Joost Lekkerkerker
2bd6b519fa Remove unused words from codespell check (#97152)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-24 19:29:24 +02:00
J. Nick Koston
31d6b615b4 Bump home-assistant-bluetooth to 1.10.1 (#97153) 2023-07-24 12:11:28 -05:00
J. Nick Koston
35aae949d0 Add initial test coverage for ESPHome manager (#97147) 2023-07-24 18:48:09 +02:00
Joost Lekkerkerker
549fef08ad Make Codespell skip snapshot tests (#97150) 2023-07-24 18:46:54 +02:00
Yuxin Wang
36ad24ce01 Add name and default name to device info of APCUPSD sensors (#94415) 2023-07-24 18:42:08 +02:00
Luke
2c42a319a2 Add Fallback to cloud api for Roborock (#96147)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-24 18:37:37 +02:00
Franck Nijhof
6b980eb0a7 Migrate frontend services to support translations (#96342)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-24 18:35:26 +02:00
Nerdix
2220396c41 Enable long-term statistics for Fast.com sensor (#97139) 2023-07-24 16:59:39 +02:00
J. Nick Koston
57c640c83c Reduce attribute lookups in climate needed to write state (#97145) 2023-07-24 16:58:26 +02:00
Franck Nijhof
b655b9d530 Allow for translating service examples (#97141) 2023-07-24 15:57:02 +02:00
Joost Lekkerkerker
0c4e341189 Fix typos in Radio Browser comment and docstring (#97138) 2023-07-24 14:22:09 +02:00
Marcel van der Veldt
14524b985b Handle Matter Nullable as None (#97133) 2023-07-24 14:18:39 +02:00
Matthias Alphart
755b0f9120 Update xknx to 2.11.2 - fix DPT 9 small negative values (#97137) 2023-07-24 14:16:29 +02:00
Marc Mueller
995c29e052 Cleanup EventType typing (#97136) 2023-07-24 13:18:38 +02:00
Marc Mueller
4161f53bea Improve async_track_state_change_filtered callback typing (#97134) 2023-07-24 12:42:29 +02:00
Marc Mueller
582499a260 Improve async_track_template_result callback typing (#97135) 2023-07-24 12:42:17 +02:00
Marc Mueller
c0da6b822e Fix ruff (#97131) 2023-07-24 10:34:16 +02:00
Marc Mueller
3371c41bda Improve async_track_device_registry_updated_event callback typing (#97125) 2023-07-24 09:42:01 +02:00
Joost Lekkerkerker
daa76bbab6 Migrate Yeelight to has entity naming (#96836) 2023-07-24 09:39:48 +02:00
Marc Mueller
0624345322 Improve async_track_entity_registry_updated_event callback typing (#97124) 2023-07-24 09:14:10 +02:00
puddly
84220e92ea Wrap internal ZHA exceptions in HomeAssistantErrors (#97033) 2023-07-24 09:12:21 +02:00
Marc Mueller
797a9c1ead Improve async_track_state_added/removed_domain callback typing (#97126) 2023-07-24 09:11:41 +02:00
Marc Mueller
8c870a5683 Use EventType for state changed [m-z] (#97118) 2023-07-24 08:07:07 +02:00
Marc Mueller
0cc396b863 Use EventType for state changed [a-h] (#97116) 2023-07-24 08:04:13 +02:00
Marc Mueller
5b73bd2f8e Use EventType for state changed [h-m] (#97117) 2023-07-24 08:01:50 +02:00
J. Nick Koston
40382f0caa Bump zeroconf to 0.71.3 (#97119) 2023-07-24 08:00:25 +02:00
J. Nick Koston
19b0a6e7f6 Relax typing on cached_property to accept subclasses (#95407) 2023-07-23 20:47:29 -05:00
Marc Mueller
235b98da8a Use EventType for remaining event helper methods (#97121) 2023-07-23 18:32:29 -05:00
Franck Nijhof
f8c3aa7bec Remove the use of StateType from Demo (#97111) 2023-07-23 18:20:23 -05:00
J. Nick Koston
34dcd98440 Only construct enum __or__ once in emulated_hue (#97114) 2023-07-23 18:17:46 -05:00
Marc Mueller
2618bfc073 Use EventType for state changed [core] (#97115) 2023-07-23 18:10:03 -05:00
J. Nick Koston
051929984d Bump yeelight to 0.7.12 (#97112) 2023-07-23 17:13:48 -05:00
Franck Nijhof
6ad34a7f76 Update pipdeptree to 2.11.0 (#97098) 2023-07-23 23:51:50 +02:00
Franck Nijhof
5e88ca23b3 Remove the use of StateType from AccuWeather (#97109) 2023-07-23 23:30:37 +02:00
Marc Mueller
69d7b035e0 Use EventType for more helper methods (#97107) 2023-07-23 23:22:04 +02:00
rale
54d7ba72ee Add second led control for carro smart fan (#94195)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-23 23:20:29 +02:00
Franck Nijhof
30058297cf Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
Jeef
38e3e20f74 Add Low Battery binary_sensor to Flume (#94914)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-23 23:11:07 +02:00
Steven Looman
9f551c0469 Bump async-upnp-client to 0.34.1 (#97105) 2023-07-23 22:38:21 +02:00
Franck Nijhof
8abf8726c6 Update Home Assistant base image to 2023.07.0 (#97103) 2023-07-23 15:27:03 -05:00
Franck Nijhof
86708b5590 Update ruff to v0.0.280 (#97102) 2023-07-23 22:00:26 +02:00
Marc Mueller
bdd253328d Add generic Event class (#97071) 2023-07-23 21:51:54 +02:00
Antoni Czaplicki
860a37aa65 Fix vulcan integration (#91401) 2023-07-23 21:40:56 +02:00
G Johansson
61f3f38c99 State attributes translation for Sensibo (#85239) 2023-07-23 21:34:32 +02:00
Maciej Bieniek
c61c6474dd Add frequency and N current sensors for Shelly Pro 3EM (#97082) 2023-07-23 21:33:47 +02:00
Franck Nijhof
b8207d7124 Merge branch 'master' into dev 2023-07-23 20:38:12 +02:00
Franck Nijhof
910c897ceb Fix typo hidrogen to hydrogen (#97096) 2023-07-23 20:34:47 +02:00
Jan Bouwhuis
fab3c5b849 Fix imap cleanup error on abort (#97097) 2023-07-23 20:30:15 +02:00
J. Nick Koston
dc3d0fc7a7 Bump flux_led to 1.0.1 (#97094) 2023-07-23 20:27:09 +02:00
Emil Ahlbäck
7ed66706b9 Add "enqueue" parameter to spotify integration (#90687)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-23 20:26:07 +02:00
Joost Lekkerkerker
bfbdebd0f7 Add entity translations to uPnP (#96763) 2023-07-23 20:21:57 +02:00
Jan Bouwhuis
3183ce7608 Add doorbell event support to alexa (#97092) 2023-07-23 20:16:46 +02:00
Joost Lekkerkerker
54044161c3 Add entity translations to Renson (#96040) 2023-07-23 20:11:26 +02:00
Joost Lekkerkerker
dd6cd0096a Improve code coverage for LastFM (#97012)
* Improve code coverage for LastFM

* Revert introduced bug
2023-07-23 20:09:16 +02:00
Luke
5158461dec Add Number platform to Roborock (#94209) 2023-07-23 19:02:16 +02:00
Miguel Camba
38111141f9 Add new device class: PH (potential hydrogen) (#95928) 2023-07-23 18:49:10 +02:00
Robert Svensson
1552319e94 Add Axis camera sources to diagnostics (#97063) 2023-07-23 17:56:58 +02:00
Teemu R
e5747d3f4c Bump python-kasa to 0.5.3 (#97088) 2023-07-23 09:42:54 -05:00
Jan Bouwhuis
1b8e03bb66 Add MQTT event entity platform (#96876)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-23 14:42:14 +02:00
Joost Lekkerkerker
26152adb23 Add entity translations to Tado (#96226) 2023-07-23 14:32:25 +02:00
Franck Nijhof
995c4d8ac1 Add missing translations for power binary sensor device class (#97084) 2023-07-23 14:20:57 +02:00
Joost Lekkerkerker
33f2453f33 Add entity translations for ld2410 BLE (#95709) 2023-07-23 14:01:27 +02:00
Ernst Klamer
672313c8ab Add support for MiScale V1 (#97081) 2023-07-23 13:11:05 +02:00
Dave T
35f21dcf9c Add repair hint to deprecate generic camera yaml config (#96923) 2023-07-23 11:10:18 +02:00
Joost Lekkerkerker
2365e4c159 Disable Spotify controls when no active session (#96914) 2023-07-23 10:59:29 +02:00
J. Nick Koston
d4cdb0453f Guard expensive debug formatting with calls with isEnabledFor (#97073) 2023-07-23 10:54:25 +02:00
J. Nick Koston
61532475f9 Cleanup sensor unit conversion code (#97074) 2023-07-23 10:49:45 +02:00
J. Nick Koston
095146b163 Fix has_entity_name not always being set in ESPHome (#97055) 2023-07-23 10:45:48 +02:00
Joost Lekkerkerker
bf66dc7a91 Use entity name naming for Nanoleaf (#95741)
* Use device class naming for Nanoleaf

* Remove device class icon
2023-07-22 22:59:56 -04:00
J. Nick Koston
b90137f4c6 Add another OUI to tplink (#97062) 2023-07-22 17:52:38 -05:00
J. Nick Koston
e60313628f Add a cancel message to the aiohttp compatiblity layer (#97058) 2023-07-22 17:06:32 -05:00
Marc Mueller
fe0fe19be9 Use datetime.UTC alias [3.11] (#97067) 2023-07-22 17:05:11 -05:00
Marc Mueller
da6802b009 Drop tomli (#97064) 2023-07-22 17:04:45 -05:00
Marc Mueller
45ec314232 Replace typing.Optional with new typing syntax (#97068) 2023-07-22 17:03:53 -05:00
Marc Mueller
77f38e33e5 Import names from typing instead of typing_extensions [3.11] (#97065) 2023-07-22 17:03:44 -05:00
J. Nick Koston
7c55dbdb17 Bump aiohomekit to 2.6.11 (#97061) 2023-07-22 16:47:13 -05:00
Franck Nijhof
ce1f5f997e Drop Python 3.10 support (#97007) 2023-07-22 23:03:45 +02:00
Jan Bouwhuis
9424d11408 Allow homeassistant in MQTT configuration_url schema (#96107) 2023-07-22 22:50:58 +02:00
J. Nick Koston
75f3054cc2 Bump aiohomekit to 2.6.10 (#97057) 2023-07-22 13:34:36 -05:00
J. Nick Koston
f36930f165 Fix zeroconf tests with cython 3 (#97054) 2023-07-22 12:33:37 -05:00
Jan Bouwhuis
9a5774a95d Apply common entity schema for MQTT Scene (#96949) 2023-07-22 18:00:27 +02:00
Joost Lekkerkerker
d4f301f4a3 Migrate Tolo to entity name (#96244) 2023-07-22 17:39:11 +02:00
Erik Montnemery
a8d77cc5ad Teach zwave_js device trigger about entity registry ids (#96303) 2023-07-22 17:29:24 +02:00
Joost Lekkerkerker
77f2eb0ac9 Add entity translations to Subaru (#96186) 2023-07-22 17:29:04 +02:00
Ståle Storø Hauknes
9a5fe9f644 Airthings BLE: Improve supported devices (#95883) 2023-07-22 17:24:06 +02:00
Christopher Fenner
e68832a889 Fix Vicare cleanup token file on uninstall (#95992) 2023-07-22 17:23:01 +02:00
Maciej Bieniek
5249660a6a Add uv_index to AccuWeather weather entity (#97015) 2023-07-22 17:11:39 +02:00
Joost Lekkerkerker
15c52e67a0 Clean up Enphase Envoy const file (#95536) 2023-07-22 16:59:15 +02:00
Joost Lekkerkerker
44803e1177 Migrate Uptimerobot to has entity name (#96770) 2023-07-22 16:55:05 +02:00
Joost Lekkerkerker
13fd5a59e3 Clean up Vilfo const file (#95543) 2023-07-22 16:33:06 +02:00
Joost Lekkerkerker
9ca288858b Add entity translations to IntelliFire (#95466) 2023-07-22 16:31:36 +02:00
Joost Lekkerkerker
11fd43b1fc Add entity translations to Wiz (#96826) 2023-07-22 16:28:48 +02:00
Joost Lekkerkerker
47426e50d3 Add entity translations to Modern Forms (#95738) 2023-07-22 16:19:37 +02:00
Joost Lekkerkerker
d708c159e7 Add entity translations to iCloud (#95461) 2023-07-22 16:16:39 +02:00
Joost Lekkerkerker
fe0d33d97c Move Aseko coordinator to separate file (#95120) 2023-07-22 16:12:28 +02:00
Joost Lekkerkerker
e2fdc6a98b Add entity translations for Ondilo Ico (#95809) 2023-07-22 13:16:07 +02:00
J. Nick Koston
24b9bde9e5 Fix duplicate and missing decorators in ESPHome Bluetooth client (#97027) 2023-07-22 13:10:41 +02:00
Joost Lekkerkerker
123cf07920 Clean up fitbit const (#95545) 2023-07-22 13:07:34 +02:00
Joost Lekkerkerker
9b717cb84f Use snapshot testing in LastFM (#97009) 2023-07-22 12:47:26 +02:00
Joost Lekkerkerker
fb460d343e Add upload date to Youtube state attributes (#96976) 2023-07-22 12:45:55 +02:00
Joost Lekkerkerker
8495da1964 Add entity translations for PoolSense (#95814) 2023-07-22 12:43:51 +02:00
Marc Mueller
4bc57c0466 Update coverage to 7.2.7 (#96998) 2023-07-22 12:39:28 +02:00
J. Nick Koston
52ab6b0b9d Bump httpcore to 0.17.3 (#97032) 2023-07-21 19:15:28 -05:00
J. Nick Koston
2c4e4428e9 Decouple more of ESPHome Bluetooth support (#96502)
* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* fix diag

* remove need for hass in the client

* refactor

* decouple more

* decouple more

* decouple more

* decouple more

* decouple more

* remove unreachable code

* remove unreachable code
2023-07-21 16:41:50 -04:00
Michael
facd6ef765 Display current version in common format in AVM Fritz!Tools (#96424) 2023-07-21 21:58:18 +02:00
J. Nick Koston
7814ce06f4 Fix ESPHome bluetooth client cancel behavior when device unexpectedly disconnects (#96918) 2023-07-21 13:44:13 -05:00
Marc Mueller
a2b18e46b9 Update respx to 0.20.2 (#96996) 2023-07-21 13:08:38 -04:00
Marc Mueller
6e90a75779 Update tqdm to 4.65.0 (#96997) 2023-07-21 13:08:24 -04:00
Marc Mueller
cd89f660d4 Update pytest-asyncio to 0.21.0 (#96999) 2023-07-21 13:08:05 -04:00
Marc Mueller
432ac1f313 Update pytest-sugar to 0.9.7 (#97001) 2023-07-21 13:07:49 -04:00
J. Nick Koston
0b0f072faf Bump aioesphomeapi to 15.1.14 (#97019)
changelog: https://github.com/esphome/aioesphomeapi/compare/v15.1.13...v15.1.14
2023-07-21 13:05:46 -04:00
G Johansson
4e30056830 Add new Forecasting to Weather (#75219)
* Add new Forecasting to Weather

* Add is_daytime for forecast_twice_daily

* Fix test

* Fix demo test

* Adjust tests

* Fix typing

* Add demo

* Mod demo more realistic

* Fix test

* Remove one weather

* Fix weather example

* kitchen_sink

* Reverse demo partially

* mod kitchen sink

* Fix twice_daily

* kitchen_sink

* Add test weathers

* Add twice daily to demo

* dt_util

* Fix names

* Expose forecast via WS instead of as state attributes

* Regularly update demo + kitchen_sink weather forecasts

* Run linters

* Fix rebase mistake

* Improve demo test coverage

* Improve weather test coverage

* Exclude kitchen_sink weather from test coverage

* Rename async_update_forecast to async_update_listeners

* Add async_has_listeners helper

* Revert "Add async_has_listeners helper"

This reverts commit 52af3664bb06d9feac2c5ff963ee0022077c23ba.

* Fix rebase mistake

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-07-21 17:30:48 +02:00
Maciej Bieniek
9f98a418cd Add new sensors for Shelly Pro 3EM (#97006)
* Add new sensors

* Fix typo
2023-07-21 18:18:14 +03:00
Franck Nijhof
530556015f Use walrus in event entity last event attributes (#97005) 2023-07-21 15:32:27 +02:00
Marc Mueller
b3da2ea9a6 Update pytest-socket to 0.6.0 (#97011) 2023-07-21 15:29:15 +02:00
rappenze
9434a64b87 Update pyfibaro dependency (#97004) 2023-07-21 09:22:45 -04:00
Joost Lekkerkerker
9954208d3a Move OpenSky constants to separate const file (#97013) 2023-07-21 15:20:24 +02:00
Marc Mueller
7d173bf4e5 Update pytest-cov to 4.1.0 (#97010) 2023-07-21 15:07:12 +02:00
Maciej Bieniek
2e156e56bf Create an issue if Shelly TRV is not calibrated (#96952)
* Create issue if Shelly Valve is not calibrated

* Add test

* Improve test

* Improve issue description

* Restart -> reboot
2023-07-21 14:20:03 +02:00
Marc Mueller
878a4f1bb9 Update pytest-freezer to 0.4.8 (#97000) 2023-07-21 14:15:15 +02:00
G Johansson
58ce357870 Add uv_index to Weather Entity (#96951)
* Add uv_index to Weather Entity

* translation

* Update homeassistant/components/weather/__init__.py

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-21 14:07:10 +02:00
karwosts
9b0d4c8c03 Fix a translation bug for water price issue (#96958) 2023-07-21 13:00:18 +02:00
Jan Bouwhuis
447fbf58c9 Change naming of MQTT entities to correspond with HA guidelines (#95159)
* Set has_entity_name if device_name is set

* revert unneeded formatting change

* Add image platform

* Follow up comment

* Don't set `has_entity_name` without device name

* Only set has_entity_name if a valid name is set

* Follow device_class name and add tests

* Follow up comments add extra tests

* Move to helper - Log a warning

* fix test

* Allow to assign None as name explictly

* Refactor

* Log info messages when device name is not set

* Revert scene schema change - no device link

* Always set has_entity_name with device mapping

* Always set `_attr_has_entity_name`

* Cleanup
2023-07-21 12:52:10 +02:00
Franck Nijhof
747f4d4a73 Add event entity (#96797) 2023-07-21 12:16:35 +02:00
Renier Moorcroft
4916351d9a Add EZVIZ AlarmControlPanelEntity (#96602)
* Add ezviz alarm panel

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Joakim Plate <elupus@ecce.se>
2023-07-21 12:01:02 +02:00
Joost Lekkerkerker
33c2fc008a Add diagnostics to YouTube (#96975) 2023-07-21 11:58:49 +02:00
Franck Nijhof
e4d65cbae1 Update syrupy to 4.0.8 (#96990) 2023-07-21 11:57:40 +02:00
Joost Lekkerkerker
52313bfce5 Clean up Ombi const file (#95541) 2023-07-21 11:55:31 +02:00
Joost Lekkerkerker
4fa9f25e38 Clean up logi circle const (#95540) 2023-07-21 10:03:49 +02:00
Joost Lekkerkerker
d935c18f38 Add entity translations to Daikin (#95181) 2023-07-21 10:02:05 +02:00
Joost Lekkerkerker
b39f7d6a71 Add snapshot testing to YouTube (#96974) 2023-07-21 09:54:06 +02:00
Joost Lekkerkerker
e9eb8a4754 Remove stateclass from Systemmonitor process sensor (#96973)
Remove stateclass
2023-07-21 09:00:04 +02:00
J. Nick Koston
e2394b34bd Cache version compare in update entity (#96978) 2023-07-21 08:56:34 +02:00
Marc Mueller
32d63ae890 Fix sentry test assert (#96983) 2023-07-21 08:55:44 +02:00
Michael Davie
92eaef9b18 Bump env_canada to v0.5.36 (#96987) 2023-07-21 08:54:57 +02:00
Ernst Klamer
4e964c3819 Bump xiaomi-ble to 0.19.1 (#96967)
* Bump xiaomi-ble to 0.19.0

* Bump xiaomi-ble to 0.19.1

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-07-21 00:13:56 -05:00
J. Nick Koston
28ff173f16 Only lookup hostname/ip_address/mac_address once in device_tracker (#96984) 2023-07-21 00:07:06 -05:00
Jan Bouwhuis
b504665b56 Do not override extra_state_attributes property for MqttEntity (#96890) 2023-07-21 06:35:58 +02:00
J. Nick Koston
c067c52cf4 Fix translation key in profiler integration (#96979) 2023-07-20 21:40:38 -05:00
J. Nick Koston
9fba6870fe Fix task leak on config entry unload/retry (#96981)
Since the task was added to self._tasks without a `task.add_done_callback(self._tasks.remove)`
each unload/retry would leak a new set of tasks
2023-07-20 21:00:07 -04:00
J. Nick Koston
99def97ed9 Add cancel messages to core task cancelation (#96972) 2023-07-20 18:03:36 -05:00
J. Nick Koston
6818cae072 Bump aioesphomeapi to 15.1.13 (#96964) 2023-07-20 16:05:17 -05:00
Franck Nijhof
e9a63b7501 Use default icon for demo button entity (#96961) 2023-07-20 23:02:59 +02:00
J. Nick Koston
b7bcc1eae4 Bump yalexs-ble to 2.2.3 (#96927) 2023-07-20 22:20:15 +02:00
J. Nick Koston
e9620c62b8 Fix assertions in zeroconf tests (#96957) 2023-07-20 20:36:46 +02:00
J. Nick Koston
2a13515759 Bump aiohomekit to 2.6.9 (#96956) 2023-07-20 13:18:33 -05:00
Brandon Rothweiler
da5cba8083 Upgrade pymazda to 0.3.10 (#96954) 2023-07-20 13:16:08 -05:00
Franck Nijhof
d36d233885 Update pipdeptree to 2.10.2 (#96940) 2023-07-20 16:12:14 +02:00
Franck Nijhof
c99adf54b4 Update aiohttp to 3.8.5 (#96945) 2023-07-20 16:11:14 +02:00
Joost Lekkerkerker
fff254e0dc Avoid using name in Subaru migrations (#96221)
* Avoid using name in Subaru migrations

* Add feedback

* Update tests/components/subaru/test_sensor.py

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

* Update tests/components/subaru/test_sensor.py

Co-authored-by: G-Two <7310260+G-Two@users.noreply.github.com>

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: G-Two <7310260+G-Two@users.noreply.github.com>
2023-07-20 14:45:07 +02:00
Jonathan Jogenfors
a381ceed86 Add custom bypass night arming to SIA alarm codes (#95736)
* Add SIA codes for night arming with custom bypass

* Set night custom bypass to ARMED_CUSTOM_BYPASS
2023-07-20 14:43:38 +02:00
Erik Montnemery
f809ce9033 Update bind_hass docstring to discourage its use (#96933) 2023-07-20 13:34:24 +02:00
Franck Nijhof
14b553ddbc Disable wheels building for pycocotools (#96937) 2023-07-20 13:16:02 +02:00
Erik Montnemery
df46179d26 Fix broken service test (#96943) 2023-07-20 13:11:55 +02:00
lkshrk
8896c164be Update .devcontainer.json structure (#96537) 2023-07-20 13:11:43 +02:00
Maciej Bieniek
db83dc9acc Create an issue if push updates fail for Shelly gen1 devices (#96910)
* Create an issue if push updates fail

* Improve strings

* Delete the issue when reloading configuration entry

* Change MAX_PUSH_UPDATE_FAILURES to 5

* Improve issue strings

* Add test

* Use for

* Update homeassistant/components/shelly/strings.json

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

* Simplify deleting the issue

---------

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
2023-07-20 13:11:05 +02:00
RoboMagus
c433b251fa Shell command response (#96695)
* Add service response to shell_commands

* Add shell_command response tests

* Fix mypy

* Return empty dict instead of None on error

* Improved response type hint

* Cleanup after removing type cast

* Raise exceptions i.s.o. returning

* Fix ruff
2023-07-20 11:53:57 +02:00
Joost Lekkerkerker
0ba2531ca4 Fix bug in check_config when an integration is removed by its own validator (#96068)
* Raise if present is False

* Fix feedback

* Update homeassistant/helpers/check_config.py

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

* Update homeassistant/helpers/check_config.py

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

* Fix tests

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-20 11:45:44 +02:00
G Johansson
4e2b00a443 Refactor SQL with ManualTriggerEntity (#95116)
* First go

* Finalize sensor

* Add tests

* Remove not need _attr_name

* device_class

* _process_manual_data allow Any as value
2023-07-20 11:35:08 +02:00
G Johansson
3fbdf4a184 Fix timer switch in Sensibo (#96911) 2023-07-20 11:27:30 +02:00
Dmitry Vasilyev
effa90272d Support Tuya Air Conditioner Mate (WiFi) - Smart IR socket with power monitoring (#95027)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-20 11:16:38 +02:00
Joost Lekkerkerker
34e30570c1 Migrate airtouch 4 to use has entity name (#96356) 2023-07-20 11:15:54 +02:00
Erik Montnemery
fa0d68b1d7 Add NumberDeviceClass.DURATION (#96932) 2023-07-20 11:10:03 +02:00
G Johansson
db76bf3a9f Implement coordinator in Trafikverket Train (#96916)
* Implement coordinator TVT

* Review comments

* Review changes
2023-07-20 10:40:34 +02:00
Renier Moorcroft
4e460f71f8 Add EZVIZ BinarySensorEntity proper names and translation key (#95698)
* Update binary_sensor.py

* Add proper naming and translation keys

* Apply suggestions from code review

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

* Fix strings after merge.

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-20 10:35:06 +02:00
Blastoise186
ce0027a84e Upgrade yt-dlp to fix security issue (#96453)
* Bump yt-dlp from 2023.3.4 to 2023.7.6

Bumps [yt-dlp](https://github.com/yt-dlp/yt-dlp) from 2023.3.4 to 2023.7.6.
- [Release notes](https://github.com/yt-dlp/yt-dlp/releases)
- [Changelog](https://github.com/yt-dlp/yt-dlp/blob/master/Changelog.md)
- [Commits](https://github.com/yt-dlp/yt-dlp/compare/2023.03.04...2023.07.06)

---
updated-dependencies:
- dependency-name: yt-dlp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump yt-dlp to 2023.7.6

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 10:21:52 +02:00
quthla
df19d4fd15 Ensure androidtv_remote does not block startup of HA (#96582)
* Ensure androidtv_remote does not block startup of HA

* Fix lint

* Use asyncio.wait_for

* Update homeassistant/components/androidtv_remote/__init__.py

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

* Update homeassistant/components/androidtv_remote/__init__.py

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

* Fix lint

* Lint

* Update __init__.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-20 10:07:03 +02:00
Eric Severance
5ffffd8dbc Fully unload wemo config entry (#96620)
* Fully unload wemo config entity

* Test reloading the config entry

* Encapsulate data with dataclasses

* Fix missing test coverage

* Replace if with assert for options that are always set

* Move WemoData/WemoConfigEntryData to models.py

* Use _ to indicate unused argument

* Test that the entry and entity work after reloading

* Nit: Slight test reordering

* Reset the correct mock (get_state)

* from .const import DOMAIN

* Nit: _async_wemo_data -> async_wemo_data; not module private
2023-07-20 10:06:16 +02:00
Ernst Klamer
0349e47372 Add support for MiScale V2 (#96807)
* Add support for MiScale V2

* Add icon to impedance

* Reduce mass sensors
2023-07-20 10:01:19 +02:00
J. Nick Koston
660c95d784 Pre-split unifiprotect nested attribute lookups (#96862)
* Pre-split unifiprotect nested attribute lookups

replaces and closes #96631

* Pre-split unifiprotect nested attribute lookups

replaces and closes #96631

* comments
2023-07-20 09:59:17 +02:00
Joakim Plate
1c19c54e38 Avoid accessing coordinator in gardena_bluetooth tests (#96921)
Avoid accessing coordinator in tests
2023-07-20 08:47:26 +02:00
Tim
9da155955a Transport NSW: Set DeviceClass and StateClass (#96928)
* 2023.7.16
- Fix bug with values defaulting to "n/a" in stead of None

* 2023.7.16
- Set device class and state classes on entities

* 2023.7.16
- Set StateClass and DeviceClass directly on the entitiy

* 2023.7.16
- Fix black and ruff issues

* 2023.7.17
- Update logic catering for the 'n/a' response on an API failure
- Add testcase

* - Fix bug in formatting

* 2023.7.17
- Refacotr to consider the "n/a" response returned from the Python lib
on an error or faliure
- Remove setting of StateClass and DeviceClass as requested
- Add "n/a" test case

* 2023.7.17
- Remove unused imports

* 2023.7.18
- Apply review requested changes

* - Additional review change resolved

* Add State and Device class attributes
2023-07-20 08:35:26 +02:00
Marc Mueller
23810752ed Fix mock assert_called_with (#96929)
* Fix mock assert_called_with

* Fix sonos test

* Revert zeroconf test changes
2023-07-20 08:31:37 +02:00
Renier Moorcroft
822d840f81 EZVIZ NumberEntity async added to hass (#96930)
Update number.py
2023-07-20 08:25:54 +02:00
J. Nick Koston
6bb81b862c Add a message to the config entry cancel call (#96925) 2023-07-19 19:22:38 -05:00
J. Nick Koston
955bed0128 Bump aioesphomeapi to 15.1.12 (#96924) 2023-07-19 18:39:50 -05:00
J. Nick Koston
f310d6ca58 Bump bleak-retry-connector to 3.1.0 (#96917) 2023-07-19 17:04:46 -05:00
Joakim Plate
daa53118b3 Correct invalid docstring in gardena button (#96922) 2023-07-19 23:58:31 +02:00
Guy Martin
deafdc3005 Allow match quirk_class of custom quirks to ZHA (#93268)
* Allow matching custom quirks when self.quirk_classes might not contain the full class path but only the module and the class.

* Add test for matching custom quirk classes.
2023-07-19 16:11:05 -04:00
Joost Lekkerkerker
0f4c71f993 Handle nullable context in Spotify (#96913) 2023-07-19 20:37:33 +02:00
J. Nick Koston
29aa89bea0 Add lightweight API to get core state (#96860) 2023-07-19 20:31:48 +02:00
mkmer
39b242f154 Bump AIOSomecomfort to 0.0.15 in Honeywell (#96904) 2023-07-19 20:30:39 +02:00
J. Nick Koston
dae264f79e Fix websocket_api _state_diff_event using json_encoder_default (#96905) 2023-07-19 18:22:43 +02:00
steffenrapp
c80085367d Fix typo in Nuki integration (#96908) 2023-07-19 17:55:41 +02:00
mkmer
3b501fd2d7 Add username to Reauth flow in Honeywell (#96850)
* pre-populate username/password on reauth

* Update homeassistant/components/honeywell/config_flow.py

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

* Use add_suggested_value_to_schema

* Optimize code

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-19 15:25:10 +02:00
Franck Nijhof
06aeacc324 Update black to 23.7.0 (#96901) 2023-07-19 14:42:35 +02:00
Franck Nijhof
93ac340d54 Update syrupy to 4.0.6 (#96900) 2023-07-19 14:42:24 +02:00
Franck Nijhof
e449f8e0e5 Remove Reolink event connection sensor (#96903) 2023-07-19 14:40:00 +02:00
Franck Nijhof
0502879d10 Update PyJWT to 2.8.0 (#96899) 2023-07-19 14:35:54 +02:00
Franck Nijhof
a305a9fe9c Update sentry-sdk to 1.28.1 (#96898) 2023-07-19 13:50:28 +02:00
Renier Moorcroft
33b3b8947a Add Ezviz SensorEntity name and translation (#95697)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-19 13:26:11 +02:00
Erik Montnemery
f0953dde95 Add comment to EntityPlatform._async_add_entity about update_before_add (#96891) 2023-07-19 13:07:23 +02:00
Marc Mueller
e18da97670 Improve pip caching [ci] (#96896) 2023-07-19 13:07:11 +02:00
Joost Lekkerkerker
efbd82b5fb Add entity translations to Tuya (#96842) 2023-07-19 12:43:15 +02:00
Joost Lekkerkerker
6ffb1c3c2d Remove version string from Ecowitt name (#96498)
* Remove version string from station name

* Use model as name
2023-07-19 11:19:57 +02:00
Arjan
90bdbf503a Add humidity to meteo_france weather forecast (#96524)
Add humidity to forecast figures
2023-07-19 11:14:09 +02:00
Franck Nijhof
f4bc32ea08 Move Dynalite configuration panel to config entry (#96853) 2023-07-19 11:02:42 +02:00
Renier Moorcroft
e39187423f Ezviz NumberEntity 1st update only when enabled (#96587)
* Initial commit

* Initial commit

* Fix async_aded_to_hass
2023-07-19 10:56:11 +02:00
Erik Montnemery
b53eae2846 Add WS command for changing thread channels (#94525) 2023-07-19 10:48:32 +02:00
Joakim Plate
80a7447030 Add support for buttons in gardena bluetooth (#96871)
* Add button to gardena

* Add tests for button

* Bump gardena bluetooth to 1.0.2

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-19 10:17:40 +02:00
Raman Gupta
67e3203d00 Add tomorrow.io state translations and dynamically assign enum device class (#96603)
* Add state translations and dynamically assign enum device class

* Reference existing keys

* Handle additional entity descriptions
2023-07-19 09:50:09 +02:00
Darren Foo
87d0b026c2 Add support for multiple Russound RNET controllers (#96793)
* add mutiple russound rnet controller support

* Update homeassistant/components/russound_rnet/media_player.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-19 09:24:37 +02:00
J. Nick Koston
01e66d6fb2 Improve handling of unrecoverable storage corruption (#96712)
* Improve handling of unrecoverable storage corruption

fixes #96574

If something in storage gets corrupted core can boot loop
or if its integration specific, the integration will fail to
start.

We now complainly loudly in the log, move away the corrupt data
and start fresh to allow startup to proceed so the user can
get to the UI and restore from backup without having to attach
a console (or otherwise login to the OS and manually modify files).

* test for corruption

* ensure OSError is still fatal

* one more case

* create an issue for corrupt storage

* fix key

* persist

* feedback

* feedback

* better to give the full path

* tweaks

* grammar

* add time

* feedback

* adjust

* try to get issue_domain from storage key

* coverage

* tweak wording some more
2023-07-19 09:23:12 +02:00
uvjustin
3e58e1987c Avoid infinite loop on corrupt stream recording (#96881)
* Avoid infinite loop on corrupt stream recording

* Update tests
2023-07-19 09:06:04 +02:00
Franck Nijhof
f2bd122fde Clean up conversation agent attribution (#96883)
* Clean up conversation agent attribution

* Clean up google_generative_ai_conversation as well
2023-07-19 09:03:53 +02:00
Franck Nijhof
22d0f4ff0a Remove legacy discovery integration (#96856) 2023-07-19 07:10:07 +02:00
J. Nick Koston
b45369bb35 Bump flux_led to 1.0.0 (#96879) 2023-07-19 06:50:29 +02:00
J. Nick Koston
9b839041fa Bump aioesphomeapi to 15.1.11 (#96873) 2023-07-19 06:49:40 +02:00
Luke
1449df5649 bump python-Roborock to 0.30.1 (#96877)
bump to 0.30.1
2023-07-19 02:25:24 +02:00
Joakim Plate
22fbd22943 Add more complete test coverage to gardena bluetooth (#96874)
* Add tests for switch

* Add tests for number

* Add tests for 0 sensor

* Enable coverage for gardena bluetooth
2023-07-19 00:31:01 +02:00
Joakim Plate
0d69ba6797 Allow number to be zero in gardena bluetooth (#96872)
Allow number to be 0 in gardena
2023-07-18 23:43:11 +02:00
Franck Nijhof
727a72fbaa Remove mitemp_bt integration (#96869) 2023-07-18 23:19:03 +02:00
Björn Weitzel
4b2cbbe8c2 Use dispatcher helper to add new Fronius inverter entities (#96782)
Using dispatcher to add new entities for inverter
2023-07-18 23:18:02 +02:00
Franck Nijhof
4fefbf0408 Remove miflora integration (#96868) 2023-07-18 23:15:06 +02:00
Joost Lekkerkerker
fdb69efd67 Migrate Starline to entity name (#96176) 2023-07-18 22:47:58 +02:00
Joost Lekkerkerker
c853010f80 Add entity translations to islamic prayer times (#95469) 2023-07-18 22:28:04 +02:00
Michael
3c072e50c7 Remove duplicated available property from Picnic coordinator entities (#96861) 2023-07-18 22:09:19 +02:00
Joost Lekkerkerker
3681816a43 Add entity translations to Tesla Wall Connector (#96242) 2023-07-18 21:53:54 +02:00
Joost Lekkerkerker
c2d66cc14a Add entity translations to Tautulli (#96239) 2023-07-18 21:51:37 +02:00
Joost Lekkerkerker
2b3a379b8e Migrate spider to entity name (#96170) 2023-07-18 21:41:33 +02:00
Joost Lekkerkerker
a2495f494b Migrate Soma to entity naming (#96158) 2023-07-18 21:40:20 +02:00
Joost Lekkerkerker
6f880ec837 Use device class naming for SMS (#96156) 2023-07-18 21:39:28 +02:00
Joost Lekkerkerker
89ed630af9 Clean up Kraken const file (#95544) 2023-07-18 21:38:29 +02:00
Joost Lekkerkerker
fa59b7f8ac Add entity translations to Forecast Solar (#96476) 2023-07-18 21:32:38 +02:00
Simon Smith
46675560d2 Fix smoke alarm detection in tuya (#96475) 2023-07-18 21:18:58 +02:00
Michael
36b4b5b887 Remove duplicated available property from Shelly coordinator entities (#96859)
remove duplicated available property
2023-07-18 22:18:41 +03:00
Joost Lekkerkerker
e29598ecaa Add entity translations to Vallox (#96495) 2023-07-18 21:07:45 +02:00
Joost Lekkerkerker
c94c7fae1b Add device info to ISS (#96469)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-18 20:57:41 +02:00
Joost Lekkerkerker
8675bc6554 Migrate Tradfri to has entity name (#96248) 2023-07-18 20:56:50 +02:00
Joost Lekkerkerker
1ceb536dfb Migrate MyStrom to has entity name (#96540) 2023-07-18 20:53:37 +02:00
Joost Lekkerkerker
0ff8371953 Migrate Ambiclimate to use has entity name (#96561) 2023-07-18 20:52:43 +02:00
Tom
499c7491af Plugwise prepare native_value_fn and companions for number (#93416)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Bouwe <bouwe.s.westerdijk@gmail.com>
Co-authored-by: Bouwe Westerdijk <11290930+bouwew@users.noreply.github.com>
2023-07-18 20:48:15 +02:00
Joost Lekkerkerker
344f349371 Migrate Agent DVR to has entity name (#96562) 2023-07-18 20:41:14 +02:00
Joost Lekkerkerker
6afa49a441 Migrate Crownstone to has entity name (#96566) 2023-07-18 20:39:37 +02:00
c0ffeeca7
ac06905b1c Rename life to lifetime in vesync (#96844) 2023-07-18 20:36:47 +02:00
Joost Lekkerkerker
0ca4da5592 Use device class for DLink (#96567) 2023-07-18 18:51:02 +02:00
Joost Lekkerkerker
cb1f365482 Add entity translations to NextCloud (#96544)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-18 18:07:32 +02:00
c0ffeeca7
da5455c454 Rename 'life' to 'lifetime' in Brother (#96815) 2023-07-18 17:52:40 +02:00
Teesit E
701c8a3768 Add Tuya Soil sensor (#96819)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-18 17:51:18 +02:00
Marc Mueller
4e9ce235e8 Update construct to 2.10.68 (#96843) 2023-07-18 17:50:31 +02:00
c0ffeeca7
c989e56d3c Rename life to lifetime: wemo (#96845) 2023-07-18 17:50:02 +02:00
Joost Lekkerkerker
1422a4f8c6 Clean up entity descriptions in Tuya (#96847) 2023-07-18 17:41:33 +02:00
Paul Bottein
d8c989f732 Make default theme selectable for set theme service (#96849) 2023-07-18 17:36:35 +02:00
J. Nick Koston
6bd4ace3c3 Fix ESPHome bluetooth client cancellation when the operation is cancelled externally (#96804) 2023-07-18 03:39:26 -10:00
Tim
9a8fe04907 Resolve bugs with Transport NSW (#96692)
* 2023.7.16
- Fix bug with values defaulting to "n/a" in stead of None

* 2023.7.16
- Set device class and state classes on entities

* 2023.7.16
- Set StateClass and DeviceClass directly on the entitiy

* 2023.7.16
- Fix black and ruff issues

* 2023.7.17
- Update logic catering for the 'n/a' response on an API failure
- Add testcase

* - Fix bug in formatting

* 2023.7.17
- Refacotr to consider the "n/a" response returned from the Python lib
on an error or faliure
- Remove setting of StateClass and DeviceClass as requested
- Add "n/a" test case

* 2023.7.17
- Remove unused imports

* 2023.7.18
- Apply review requested changes

* - Additional review change resolved
2023-07-18 15:12:43 +02:00
c0ffeeca7
67eeed6703 Rename homekit "Filter Life" sensor to "Filter lifetime" (#96821)
* String review: rename 'life' to 'lifetime'

- The term life, such as in 'filter life' can be ambiguous.
- Renamed to 'lifetime', as quite a few integrations use the term 'lifetime' to express this concept
- Improves consistency and should be easier to understand.

* HomeKit: adapt test case to reflect string change

* Fix test case failure caused by string rename: first step
2023-07-18 15:11:14 +02:00
Joost Lekkerkerker
0bdfb95d1d Add entity translations to Whois (#96824)
* Add entity translations to Whois

* Fix tests
2023-07-18 15:05:55 +02:00
Jan Bouwhuis
7c22225cd1 Allow ADR 0007 compliant schema for mqtt (#94305)
* Enforce listed entities in MQTT yaml config

* Add tests for setup with listed items

* Fix test

* Remove validator add comment

* Update homeassistant/components/mqtt/__init__.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-18 14:29:45 +02:00
Joost Lekkerkerker
f9a0877bb9 Change device classes for Airvisual Pro (#96474)
Change device classes
2023-07-18 14:20:30 +02:00
Andrew Sayre
4ae69787a2 Fix SmartThings Cover Set Position (for window shades) (#96612)
* Update smartthings dependencies

* Update cover to support window_shade_level
2023-07-18 14:13:31 +02:00
Joost Lekkerkerker
1ace9ab82e Make Spotify accept user playlist uris (#96820)
* Make Spotify accept user platlist uris

* Fix feedback

* Fix feedback
2023-07-18 14:08:18 +02:00
Joost Lekkerkerker
8dc5f73789 Migrate Yolink to has entity name (#96839)
* Migrate Yolink to has entity name

* Add sensor
2023-07-18 13:58:42 +02:00
Joost Lekkerkerker
8a9f117bdc Add entity translations to zeversolar (#96838)
* Add entity translations to zeversolar

* Remove current power
2023-07-18 13:40:06 +02:00
Joost Lekkerkerker
d46a72e5ab Migrate Zerproc to has entity naming (#96837) 2023-07-18 13:39:40 +02:00
Erik Montnemery
5c54fa1ce1 Fix shell_command timeout test (#96834)
* Fix shell_command timeout test

* Improve test
2023-07-18 13:37:27 +02:00
Erik Montnemery
2a18d0a764 Do not include stack trace when shell_command service times out (#96833) 2023-07-18 13:37:17 +02:00
Marc Mueller
9a2a920fd4 Update pycocotools to 2.0.6 (#96831) 2023-07-18 13:07:16 +02:00
Joost Lekkerkerker
c253549e68 Migrate Songpal to has entity name (#96753) 2023-07-18 12:38:17 +02:00
c0ffeeca7
faa67a40c4 Rename 'life' to 'lifetime' in trådfri (#96818)
String review: rename 'life' to 'lifetime'

- The term life, such as in 'filter life' can be ambiguous.
- Renamed to 'lifetime', as quite a few integrations use the term 'lifetime' to express this concept
- Improves consistency and should be easier to understand.
2023-07-18 12:24:02 +02:00
Joost Lekkerkerker
5f0e5b7e0c Migrate Volumio to has entity naming (#96822) 2023-07-18 12:17:41 +02:00
Franck Nijhof
b9f92b526b Add prefix support to text selector (#96830) 2023-07-18 12:17:31 +02:00
Erik Montnemery
4ceba01ab7 Prevent creating scripts which override script services (#96828) 2023-07-18 12:10:40 +02:00
Joost Lekkerkerker
8b5bdf9e2f Add entity translations to Whirlpool (#96823) 2023-07-18 12:09:22 +02:00
Franck Nijhof
1a9e27cdaf Allow integrations to register custom config panels (#96245) 2023-07-18 11:35:44 +02:00
Joost Lekkerkerker
a69b5a8d3b Add support for restricted playback devices in Spotify (#96794)
* Add support for restricted devices

* Add support for restricted devices
2023-07-18 11:15:41 +02:00
Joost Lekkerkerker
772fb463b5 Migrate Wilight to has entity name (#96825)
Migrate Wilight to has entity naming
2023-07-18 11:07:26 +02:00
Joost Lekkerkerker
d361caf6c4 Add entity translations to Yalexs BLE (#96827) 2023-07-18 11:04:24 +02:00
Jan Bouwhuis
0134ee9305 Fix incorrect leagacy code tweak for MQTT (#96812)
Cleanup mqtt_data_updated_config
2023-07-18 10:50:34 +02:00
c0ffeeca7
aa13082ce0 Rename 'life' to 'lifetime' in Xiaomi Miio (#96817)
String review: rename 'life' to 'lifetime'

- The term life, such as in 'filter life' can be ambiguous.
- Renamed to 'lifetime', as quite a few integrations use the term 'lifetime' to express this concept
- Improves consistency and should be easier to understand.
2023-07-18 10:13:33 +02:00
Joost Lekkerkerker
5d096a657f Migrate Brunt to has entity name (#96565) 2023-07-18 09:59:32 +02:00
Joost Lekkerkerker
65db77dd8a Migrate Dynalite to has entity name (#96569) 2023-07-18 09:58:42 +02:00
Joost Lekkerkerker
1097bde71b Migrate AndroidTV to has entity name (#96572) 2023-07-18 09:56:57 +02:00
Joost Lekkerkerker
69bcba7ef5 Migrate frontier silicon to has entity name (#96571) 2023-07-18 09:56:11 +02:00
Joost Lekkerkerker
2bbce7ad22 Migrate Senz to has entity name (#96752) 2023-07-18 09:55:26 +02:00
Joost Lekkerkerker
5cea0bb3de Migrate Soundtouch to has entity name (#96754) 2023-07-18 09:54:50 +02:00
c0ffeeca7
43842e243d Rename 'life' to 'lifetime' in Tuya (#96813) 2023-07-18 09:54:07 +02:00
Joost Lekkerkerker
9b29cbd71c Migrate Home plus control to has entity name (#96596) 2023-07-18 09:44:47 +02:00
Joost Lekkerkerker
8d048c4cfa Migrate geofency to has entity name (#96592) 2023-07-18 09:43:29 +02:00
J. Nick Koston
bc6a41fb94 Remove deprecated state.get_changed_since (#96579) 2023-07-18 09:42:48 +02:00
Joost Lekkerkerker
4dd7611c83 Make Version integration title translatable (#96586) 2023-07-18 09:42:07 +02:00
J. Nick Koston
fca40be5df Small cleanups to expand_entity_ids (#96585) 2023-07-18 09:41:37 +02:00
Joost Lekkerkerker
7d4016d7bf Migrate gpslogger to has entity name (#96594) 2023-07-18 09:37:38 +02:00
Erik Montnemery
57352578ff Use entity registry id in zwave_js device actions (#96407) 2023-07-18 09:36:40 +02:00
J. Nick Koston
c5b20ca91b Bump yalexs-ble to 2.2.1 (#96808) 2023-07-18 09:29:42 +02:00
Joost Lekkerkerker
c154c2b060 Add entity translations to Transmission (#96761) 2023-07-18 09:17:28 +02:00
Joakim Plate
878429fdec Add binary sensor for valve connectivity for gardena bluetooth (#96810)
* Add binary_sensor to gardena

* Add tests for binary_sensor
2023-07-18 09:00:25 +02:00
Joost Lekkerkerker
2c949d56dc Migrate Traccar to has entity naming (#96760) 2023-07-18 08:56:15 +02:00
Marc Mueller
9e67bccb89 Replace EventType annotations with Event (#96426) 2023-07-18 08:51:06 +02:00
Marc Mueller
4bf23fac6f Update PyYAML to 6.0.1 (#96800) 2023-07-18 08:50:15 +02:00
J. Nick Koston
ca2863a1b9 Bump aiohomekit to 2.6.8 (#96805) 2023-07-18 08:29:27 +02:00
Joakim Plate
a9f7522857 Correct tests for gardena (#96806) 2023-07-17 19:22:48 -10:00
J. Nick Koston
eb60dc65ec Bump aioesphomeapi to 15.1.9 (#96791) 2023-07-17 15:35:37 -10:00
tronikos
771b5e34b7 Bump androidtvremote2 to 0.0.12 (#96796)
Bump androidtvremote2==0.0.12
2023-07-18 01:42:31 +02:00
Mike Keesey
44aa531a51 Alexa temperature adjustment handle multiple setpoint (#95821)
* Alexa temperature adjustment handle multiple setpoint

In "auto" mode with many thermostats, the thermostats expose both an
upper and lower setpoint representing a range of temperatures. When a
temperature delta is sent from Alexa (e.g. "lower by 2 degrees), we need
to handle the case where the temperature property is not set, but
instead the upper and lower setpoint properties are set. In this case,
we adjust those properties via service call instead of the singular
value.

* Updating tests to fix coverage
2023-07-18 01:12:15 +02:00
Marc Mueller
564e618d0c Drop upper constraint for pip (#96738) 2023-07-18 00:37:02 +02:00
Michael Hansen
8cccfcc946 Bump wyoming to 1.1 (#96778) 2023-07-17 15:58:05 -05:00
Erik Montnemery
c79fa87a7f Fix check for HA Yellow radio in otbr config flow (#96789) 2023-07-17 22:21:52 +02:00
Erik Montnemery
49a27bb9a7 Fix otbr test (#96788) 2023-07-17 22:12:59 +02:00
Erik Montnemery
863b36c0c3 Include addon name in otbr config entry title (#96786) 2023-07-17 21:26:15 +02:00
Erik Montnemery
8559af8232 Remove extra otbr config entries (#96785) 2023-07-17 21:23:20 +02:00
Erik Montnemery
1e3fdcc4d1 Prevent otbr creating multiple config entries (#96783) 2023-07-17 21:22:50 +02:00
Joakim Plate
d02bf837a6 Add some basic tests for gardena (#96777) 2023-07-17 21:13:13 +02:00
Joakim Plate
d80b7d0145 Add base class to gardena bluetooth entities (#96775)
Add helper base class for gardena entities
2023-07-17 21:12:41 +02:00
Joakim Plate
36cb3f7278 Protect entities for availability in gardena bluetooth (#96776)
Protect entities for availability
2023-07-17 21:12:24 +02:00
Maciej Bieniek
31dfa5561a Add external power sensor for Shelly Plus HT (#96768)
* Add external power sensor for Plus HT

* Tests
2023-07-17 22:07:24 +03:00
J. Nick Koston
aa87f0ad54 Switch homekit_controller to use subscriber lookups (#96739) 2023-07-17 06:32:38 -10:00
Jan Bouwhuis
a4d4eb3871 Remove support for mqtt climate option CONF_POWER_STATE_TOPIC and template (#96771)
Remove support CONF_POWER_STATE_TOPIC and template
2023-07-17 17:56:39 +02:00
Joost Lekkerkerker
e99b6b2a03 Migrate VeSync to has entity name (#96772)
* Migrate VeSync to has entity name

* Fix tests
2023-07-17 17:52:53 +02:00
Joost Lekkerkerker
560e0cc7e0 Migrate VLC Telnet to has entity naming (#96774)
* Migrate VLC Telnet to has entity naming

* Remove unused variable
2023-07-17 17:47:47 +02:00
J. Nick Koston
70c88a125c Reduce attribute lookups in update state_attributes (#96511) 2023-07-17 17:47:36 +02:00
Joost Lekkerkerker
7ccb06ed22 Add entity translations to Twentemilieu (#96762) 2023-07-17 17:26:13 +02:00
Joost Lekkerkerker
005e45edcc Migrate OwnTracks to has entity name (#96743)
* Migrate OwnTracks to has entity name

* Fix test

* Fix tests
2023-07-17 14:55:34 +02:00
Joost Lekkerkerker
8937884e33 Add entity translations to MotionEye (#96740)
* Add entity translations to MotionEye

* Fix name

* Explicit device name
2023-07-17 14:54:38 +02:00
Joost Lekkerkerker
34f1b2b71d Add entity translations to radiotherm (#96745) 2023-07-17 14:54:26 +02:00
Joost Lekkerkerker
98e166f795 Fix device name for OwnTracks (#96759) 2023-07-17 14:49:35 +02:00
Joost Lekkerkerker
e76254a50f Migrate Plum Lightpad to has entity name (#96744) 2023-07-17 14:42:58 +02:00
Joost Lekkerkerker
b0dd05a411 Add entity translations to philips js (#96747)
* Add entity translations to philips js

* Remove name
2023-07-17 13:12:50 +02:00
Joost Lekkerkerker
73bbfc7a2d Add base entity to philips js (#96756)
* Create superclass for philips js

* Move device info creation to coordinator
2023-07-17 13:05:58 +02:00
Joost Lekkerkerker
57361a738e Use explicit device name for Stookalert (#96755) 2023-07-17 12:58:51 +02:00
Joost Lekkerkerker
dc8267b05a Migrate NuHeat to has entity name (#96742) 2023-07-17 12:09:43 +02:00
Joost Lekkerkerker
5a951c390b Add entity translations to mutesync (#96741) 2023-07-17 12:07:43 +02:00
b-uwe
56bc708b28 Remove the virtual integration for ultraloq (#96355) 2023-07-17 11:49:42 +02:00
Marc Mueller
4a6247f922 Update pygtfs to 0.1.9 (#96682) 2023-07-17 10:20:57 +02:00
Björn
e29b6408f6 Periodically re-scan for Fronius inverters that were offline while setup (#96538) 2023-07-17 10:16:28 +02:00
Jan Bouwhuis
65ebb6a74f Improve imap error handling for config entry (#96724)
* Improve error handling config entry

* Removed CancelledError

* Add cleanup

* Do not call protected async_set_state()
2023-07-17 09:44:47 +02:00
J. Nick Koston
3a06659120 Speed up single entity/response service calls (#96729)
* Significantly speed up single entity/response service calls

Since the majority of service calls are single entity, we can
avoid creating tasks in this case. Since the multi-entity
service calls always check the result and raise, we can switch
the asyncio.wait to asyncio.gather

* Significantly speed up single entity/response service calls

Since the majority of service calls are single entity, we can
avoid creating tasks in this case. Since the multi-entity
service calls always check the result and raise, we can switch
the asyncio.wait to asyncio.gather

* revert

* cannot be inside pytest.raises

* one more

* Update homeassistant/helpers/service.py
2023-07-17 09:33:13 +02:00
Maximilian
c76fac0633 Bump pynina to 0.3.1 (#96693) 2023-07-17 09:27:01 +02:00
Raman Gupta
657fdb075a Bump pytomorrowio to 0.3.6 (#96628) 2023-07-17 09:25:47 +02:00
mattmccormack
2f8b88e6ef Add string "Quiet" to fan mode in climate component (#96584) 2023-07-17 09:25:01 +02:00
Joost Lekkerkerker
a8e92bfcb6 Fix typo for PM 1 (#96473) 2023-07-17 09:22:07 +02:00
Joost Lekkerkerker
9f71482f8c Migrate iAlarm to has entity name (#96700) 2023-07-17 09:16:23 +02:00
Blastoise186
e5ca20b4d0 Bump Cryptography from 41.0.1 to 41.0.2 (#96699)
Bump cryptography from 41.0.1 to 41.0.2

Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.1 to 41.0.2.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.1...41.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 09:15:33 +02:00
Joost Lekkerkerker
bd22cfc1d0 Use device class naming in keenteic ndms2 (#96701) 2023-07-17 09:14:02 +02:00
Joost Lekkerkerker
f0fb09c2be Migrate Kulersky to has entity name (#96702) 2023-07-17 09:12:07 +02:00
Joakim Plate
088d04fe0f Add sensor to gardena (#96691) 2023-07-17 09:11:23 +02:00
Joost Lekkerkerker
13ac8d00f9 Migrate Laundrify to has entity name (#96703) 2023-07-17 09:11:02 +02:00
Joost Lekkerkerker
13140830a0 Migrate Monoprice to has entity name (#96704) 2023-07-17 09:09:53 +02:00
c0ffeeca7
9496b651a8 Small tweaks to ZHA service strings (#96709) 2023-07-17 09:08:27 +02:00
Maciej Bieniek
f809b7284b Create Tractive battery charging sensor if charging_state is not None (#96713)
Check if charging_state is available
2023-07-17 09:04:43 +02:00
c0ffeeca7
3a043655b9 Vacuum services strings: rename 'base' to 'dock' for consistency (#96715) 2023-07-17 09:03:25 +02:00
Maciej Bieniek
79bcca2853 Add wellness sensors to Tractive integration (#96719)
* Add sleep sensors

* Add minutes rest sensor

* Add calories sensor

* Add state_class to entity descriptions
2023-07-17 09:02:42 +02:00
J. Nick Koston
085eebc903 Make async_set_state in ConfigEntry a protected method (#96727)
I added this in #77803 but I never designed it to be called
externally. External usage may break at any time because the
class is not designed for this. I should have made it protected
in the original PR but I did not think it would get called
externally (my mistake)
2023-07-17 08:58:12 +02:00
J. Nick Koston
260e00ffb4 Check the registry entry in sensor unit_of_measurement instead of unique_id (#96731)
The unit_of_measurement check was checking to see if the entity has
a unique_id instead of a registry entry. Its much cheaper to check
for the registry_entry than the unique id since some entity have
to construct it every time its read
2023-07-17 08:50:06 +02:00
J. Nick Koston
51a7df162c Avoid regenerating the mobile app schema every time a webhook is called (#96733)
Avoid regnerating the mobile app schema every time a webhook is called
2023-07-17 08:42:46 +02:00
J. Nick Koston
d242eaa375 Remove the ability to defer websocket message construction (#96734)
This was added in #71364 but all use cases of it were refactored
away so it can now be removed
2023-07-17 08:41:39 +02:00
Renier Moorcroft
d553a749a0 Ezviz image entity cleanup (#96548)
* Update image.py

* Inheratance format
2023-07-17 08:30:17 +02:00
Robert Hafner
33d2dd3797 Airvisual Pro Outside Station Support (#96618)
* Airvisual Pro Outside Station Support

* pr feedback

* formatting, language

* Update homeassistant/components/airvisual_pro/strings.json

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

* fix assertion on airvisual test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-17 00:44:03 +02:00
J. Nick Koston
194d4e4f66 Guard type checking assertions in unifiprotect (#96721) 2023-07-16 12:11:35 -10:00
c0ffeeca7
1e9a5e48c3 Remove redundant phrase (#96716) 2023-07-16 17:02:37 -04:00
Joost Lekkerkerker
4523105dee Migrate DuneHD to has entity name (#96568) 2023-07-16 22:37:12 +02:00
Joost Lekkerkerker
c34194d8e0 Use device class naming for BraviaTV (#96564) 2023-07-16 22:34:40 +02:00
c0ffeeca7
79c6b773da IMAP service strings: Fix typo (#96711)
Fix typo
2023-07-16 21:19:04 +02:00
J. Nick Koston
f2556df7db Reduce unifiprotect update overhead (#96626) 2023-07-16 06:24:27 -10:00
J. Nick Koston
cde1903e8b Avoid multiple options and current_option lookups in select entites (#96630) 2023-07-16 06:22:36 -10:00
Joost Lekkerkerker
28540b0cb2 Migrate google assistant to has entity name (#96593)
* Migrate google assistant to has entity name

* Fix tests

* Add device name

* Update homeassistant/components/google_assistant/button.py

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

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-07-16 17:39:27 +02:00
J. Nick Koston
7ec506907c Ensure async_get_system_info does not fail if supervisor is unavailable (#96492)
* Ensure async_get_system_info does not fail if supervisor is unavailable

fixes #96470

* fix i/o in the event loop

* fix tests

* handle some more failure cases

* more I/O here

* coverage

* coverage

* Update homeassistant/helpers/system_info.py

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

* remove supervisor detection fallback

* Update tests/helpers/test_system_info.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-07-16 11:10:07 -04:00
Joakim Plate
cd0e9839a0 Correct unit types in gardean bluetooth (#96683) 2023-07-16 13:31:23 +02:00
J. Nick Koston
4d3e24465c Bump bthome-ble to 3.0.0 (#96616) 2023-07-15 21:47:09 -10:00
Joost Lekkerkerker
63115a906d Migrate evil genius labs to has entity name (#96570) 2023-07-15 21:03:47 -04:00
Joost Lekkerkerker
b53df429fa Add entity translations for Mazda (#95729)
* Add entity translations for Mazda

* Use references
2023-07-15 21:03:29 -04:00
Joost Lekkerkerker
5d3039f21e Use device class naming for Switchbot (#96187) 2023-07-15 12:36:13 -10:00
J. Nick Koston
30e05ab85e Bump aioesphomeapi to 15.1.7 (#96615) 2023-07-15 12:31:35 -10:00
Marc Mueller
2f5c480f7f Update pip constraint to allow pip 23.2 (#96614) 2023-07-15 12:28:34 -10:00
Allen Porter
e91e32f071 Bump pyrainbird to 3.0.0 (#96610) 2023-07-15 14:11:14 -07:00
Dennis
edcae75812 Add UV Index and UV Health Concern sensors to tomorrow.io (#96534) 2023-07-15 14:58:40 -04:00
Joost Lekkerkerker
3b309cad99 Migrate Heos to has entity name (#96595) 2023-07-15 12:09:37 -05:00
J. Nick Koston
d65119bbb3 Avoid writing state in homekit_controller for unrelated aid/iids (#96583) 2023-07-15 06:38:42 -10:00
Allen Porter
cccf7bba9b Bump pyrainbird to 2.1.1 (#96601) 2023-07-15 09:02:59 -07:00
Aaron Collins
d35e5db984 Fix daikin missing key after migration (#96575)
Fix daikin migration
2023-07-15 14:17:02 +02:00
J. Nick Koston
62c5194bc8 Avoid compressing binary images on ingress (#96581) 2023-07-15 00:09:25 -10:00
Joost Lekkerkerker
a27e126c86 Migrate AppleTV to use has entity name (#96563)
* Migrate AppleTV to use has entity name

* Add comma
2023-07-15 03:31:56 +02:00
J. Nick Koston
38630f7898 Always try PullPoint with ONVIF (#96377) 2023-07-14 15:23:00 -10:00
J. Nick Koston
7da8e0295e Bump onvif-zeep-async to 3.1.12 (#96560) 2023-07-14 14:49:20 -10:00
J. Nick Koston
1c814b0ee3 Defer SSDP UPNP server start until the started event (#96555) 2023-07-14 14:28:29 -10:00
ollo69
c95e2c074c Add missing type hints for AndroidTV (#96554)
* Add missing type hints for AndroidTV

* Suggested change
2023-07-15 02:18:34 +02:00
J. Nick Koston
9775832d53 Remove unreachable code in the ESPHome fan platform (#96458) 2023-07-14 13:37:16 -10:00
Joost Lekkerkerker
81ce6e4797 Add entity translations to Sonos (#96167)
* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos
2023-07-15 00:36:26 +02:00
J. Nick Koston
b77de2abaf Handle empty strings for ESPHome UOMs (#96556) 2023-07-14 12:14:32 -10:00
Jan Bouwhuis
72458b6672 Add feature to turn off using IMAP-Push on an IMAP server (#96436)
* Add feature to enforce polling an IMAP server

* Add test

* Remove not needed string tweak

* Rename enforce_polling to enable_push

* Push enabled by default
2023-07-14 21:26:35 +02:00
Joost Lekkerkerker
bbc3d0d287 Improve Mullvad typing (#96545) 2023-07-14 21:24:41 +02:00
RenierM26
1e704c4abe Address Ezviz select entity late review (#96525)
* Ezviz Select Entity

* Update IR description
2023-07-14 19:27:41 +02:00
Joost Lekkerkerker
1b7632a673 Support MyStrom switch 120 (#96535) 2023-07-14 09:04:48 -04:00
Guido Schmitz
357af58c81 Bump devolo_plc_api to 1.3.2 (#96499) 2023-07-14 09:04:23 -04:00
Michael Hansen
afdded58ee Wyoming Piper 1.1 (#96490)
* Add voice/speaker options to Piper TTS

* Use description if available

* Fix tests

* Clean up if
2023-07-14 08:56:27 -04:00
Erik Montnemery
614f3c6a15 Move device info validation to device registry (#96465)
* Move device info validation to device registry

* Don't move DeviceInfo

* Fix type annotation

* Don't block adding device for unknown config entry

* Fix test

* Remove use of locals()

* Improve error message
2023-07-14 08:55:17 -04:00
Jan Bouwhuis
3b32dcb613 Revert translation reference for Tuya motion_sensitivity (#96536) 2023-07-14 12:28:19 +02:00
dependabot[bot]
e44c74f9eb Bump actions/setup-python from 4.6.1 to 4.7.0 (#96526) 2023-07-14 11:52:24 +02:00
J. Nick Koston
7a1f0a0b74 Remove unneeded str() in StrEnum backport (#96509) 2023-07-13 22:37:59 -10:00
RenierM26
3e429ae081 Add Ezviz last motion picture image entity (#94421)
* Initial commit

* Update camera.py

* ignore type mismatch on append.

* Use new image entity.

* coveragerc update

* Remove all changes to camera in this pull.

* Fix docstring.

* remove old "last_alarm_pic" sensor

* Update image entity

* bypass for content check error

* Fix last updated not sting object

* Remove redundant url change check.

* Remove debug string

* Check url change on coordinator data update.

* Add translation key for name.

* simplify update check

* Rebase EzvizLastMotion ImageEntity

* Change logging to debug.
2023-07-14 08:50:36 +02:00
J. Nick Koston
0e8c85c5fc Only lookup supported_features once in media_player capability_attributes (#96510) 2023-07-13 16:46:09 -10:00
J. Nick Koston
c44c7bba84 Simplify ESPHome bluetooth disconnected during operation wrapper (#96459) 2023-07-13 16:45:45 -10:00
tronikos
bbc420bc90 Bump opower to 0.0.14 (#96506) 2023-07-13 14:52:26 -10:00
J. Nick Koston
09237e4eff Remove unused code in ESPHome (#96503) 2023-07-13 13:38:15 -10:00
J. Nick Koston
d2991d3f5e Bump bond-async to 0.2.1 (#96504) 2023-07-13 13:20:24 -10:00
J. Nick Koston
c86b60bdf7 Bump bluetooth-data-tools to 1.6.0 (#96461) 2023-07-13 11:42:11 -10:00
Sebastian Lövdahl
bfd4446d2e Bump vallox-websocket-api to 3.3.0 (#96493) 2023-07-13 23:36:26 +02:00
Christopher Bailey
1865cd0805 Bump unifiprotect to 4.10.5 (#96486) 2023-07-13 09:30:55 -10:00
Oliver
da9624de2f Update denonavr to 0.11.3 (#96467) 2023-07-13 09:30:18 -10:00
Sebastian Lövdahl
3b80deb2b7 Fix Vallox fan entity naming (#96494) 2023-07-13 20:42:30 +02:00
Erik Montnemery
7539cf25be Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
J. Nick Koston
5f46436057 Bump yalexs-ble to 2.2.0 (#96460) 2023-07-13 06:43:50 -10:00
Erik Montnemery
580fd92ef2 Correct knx device info (#96482) 2023-07-13 12:17:13 -04:00
Erik Montnemery
8440f14a08 Correct dlna_dmr device info (#96480) 2023-07-13 12:15:46 -04:00
Erik Montnemery
5b93017740 Correct huawei_lte device info (#96481) 2023-07-13 12:15:28 -04:00
Erik Montnemery
fbbdebee47 Correct unifi device info (#96483) 2023-07-13 12:14:31 -04:00
Mads Nedergaard
025ed3868d Rename CO2Signal to Electricity Maps (#96252)
* Changes names and links

* Changes link to documentation

* Updates generated integration name
2023-07-13 11:57:31 -04:00
Paulus Schoutsen
7859be6481 Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
RenierM26
c54ceb2da2 ImageEntity split load_image_from_url (#96146)
* Initial commit

* fix async_load_image_from_url
2023-07-13 17:03:26 +02:00
Joost Lekkerkerker
b8bc958070 Use device class translations in airvisual pro (#96472) 2023-07-13 15:05:55 +02:00
Franck Nijhof
d025b97bb9 Migrate Z-Wave services to support translations (#96361)
* Migrate Z-Wave services to support translations

* Apply suggestions from code review

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

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-13 09:49:05 +02:00
J. Nick Koston
bc9b763688 Improve performance of http auth logging (#96464)
Avoid the argument lookups when debug logging is not enabled
2023-07-13 09:44:27 +02:00
Joakim Plate
52c7ad130d Add number entity to gardena (#96430) 2023-07-13 06:34:28 +02:00
J. Nick Koston
ffe81a9716 Improve ESPHome update platform error reporting (#96455) 2023-07-12 16:46:29 -10:00
Ville Skyttä
127fbded18 Fix huawei_lte suspend_integration service URL description (#96450)
Copy-pasto from resume_integration.
2023-07-12 22:04:18 -04:00
Joost Lekkerkerker
b367c95c81 Add more common translations (#96429)
* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations
2023-07-12 22:00:05 -04:00
J. Nick Koston
08af42b00e Fix mixed case service schema registration (#96448) 2023-07-12 14:39:51 -10:00
J. Nick Koston
7009683226 Ensure ESPHome dashboard connection recovers if its down when core starts (#96449) 2023-07-12 14:37:28 -10:00
puddly
709d5241ec Include a warning when changing channels with multi-PAN (#96351)
* Inform users of the dangers of changing channels with multi-PAN

* Update homeassistant/components/homeassistant_hardware/strings.json

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

* Remove double spaces

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 18:52:17 -04:00
Michael
400c513209 Always add guest wifi qr code entity in AVM Fritz!Tools (#96435) 2023-07-12 20:54:48 +02:00
Franck Nijhof
e95c4f7e65 Migrate zha services to support translations (#96418)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 20:49:36 +02:00
Franck Nijhof
a96ee22afa Migrate notify services to support translations (#96413)
* Migrate notify services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 14:37:45 -04:00
Franck Nijhof
273e80cc45 Migrate text services to support translations (#96397)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 20:24:21 +02:00
Franck Nijhof
11cd7692a1 Migrate group services to support translations (#96369)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-12 19:58:08 +02:00
Franck Nijhof
728a5ff99b Migrate system_log services to support translations (#96398) 2023-07-12 18:56:08 +02:00
Franck Nijhof
021aaa9994 Migrate tts services to support translations (#96412)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 18:55:34 +02:00
Franck Nijhof
7021daf9fb Migrate select services to support translations (#96411)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 18:55:22 +02:00
J. Nick Koston
c67a1a326f Improve chances of recovering stuck down bluetooth adapters (#96382) 2023-07-12 06:39:32 -10:00
RenierM26
899adfa74c Add Ezviz select entity (#93625)
* Initial commit

* Add select entity

* coveragerc

* Cleanup

* Commit suggestions.

* Raise issue before try except

* Add translation key

* Update camera.py

* Update camera.py

* Disable old sensor by default instead of removing.

* Apply suggestions from code review

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

* IR fix flow

* Fix conflict

* run black

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-12 18:33:56 +02:00
Franck Nijhof
5792301cf1 Migrate lock services to support translations (#96416)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 18:16:30 +02:00
Franck Nijhof
80eb4747ff Migrate remote services to support translations (#96410)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 18:06:31 +02:00
Franck Nijhof
06adace7ca Migrate vacuum services to support translations (#96417)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 18:06:16 +02:00
Franck Nijhof
848221a1d7 Migrate humidifier services to support translations (#96327)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 18:05:51 +02:00
Franck Nijhof
d3eda12af4 Migrate recorder services to support translations (#96409)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 17:28:05 +02:00
Franck Nijhof
d6771e6f8a Migrate input helpers services to support translations (#96392)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 17:12:22 +02:00
Franck Nijhof
b39660df3b Migrate lovelace services to support translations (#96340)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 17:04:22 +02:00
Franck Nijhof
c5cd7e5897 Migrate update services to support translations (#96395)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 16:59:45 +02:00
Paul Bottein
e513b7d0eb Add condition selector for blueprint (#96350)
* Add condition selector for blueprint

* Add tests and validation

* Update comment
2023-07-12 10:58:35 -04:00
Joost Lekkerkerker
e8c2921852 Add explicit device naming to Led BLE (#96421) 2023-07-12 16:40:03 +02:00
Franck Nijhof
6c40004061 Migrate integration services (I-K) to support translations (#96373)
* Migrate integration services (I-K) to support translations

* Apply suggestions from code review

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

* Update homeassistant/components/kodi/strings.json

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-12 10:38:47 -04:00
Franck Nijhof
d0b7a47768 Migrate mqtt services to support translations (#96396)
* Migrate mqtt services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 10:37:59 -04:00
Franck Nijhof
dc2406ae09 Migrate alarm control panel services to support translations (#96305)
* Migrate alarm control panel services to support translations

* String references

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 10:37:30 -04:00
Franck Nijhof
594d240a96 Migrate & fix logger services to support translations (#96393)
* Migrate logger services to support translations

* Fix tests and schema validation

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 10:37:18 -04:00
Franck Nijhof
18cc56ae96 Migrate media player services to support translations (#96408)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 16:25:43 +02:00
Franck Nijhof
7ca539fcd0 Migrate persistent notification services to support translations (#96391)
* Migrate persistent notification services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 16:11:28 +02:00
Franck Nijhof
2d474813c0 Migrate siren services to support translations (#96400)
* Migrate siren services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 16:11:01 +02:00
Franck Nijhof
c236d17343 Migrate cover services to support translations (#96315)
* Migrate cover services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 16:10:32 +02:00
Joakim Plate
f7ce9b1688 Add support for gardena bluetooth (#95179)
Add support for gardena bluetooth based water computers.
2023-07-12 16:08:15 +02:00
Franck Nijhof
6c44783927 Migrate Matter services to support translations (#96406) 2023-07-12 15:36:57 +02:00
Franck Nijhof
878ed7cf21 Migrate intent_script services to support translations (#96394)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 15:30:36 +02:00
Franck Nijhof
cccf436326 Migrate LaMetric services to support translations (#96415) 2023-07-12 15:14:10 +02:00
Franck Nijhof
c3871cc5ae Migrate template services to support translations (#96414) 2023-07-12 14:06:14 +02:00
Franck Nijhof
352ca0b7f8 Migrate fan services to support translations (#96325)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 13:54:06 +02:00
Franck Nijhof
aca91db8b5 Migrate water_heater services to support translations (#96389)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 13:49:51 +02:00
Franck Nijhof
9ef62c7599 Migrate scene services to support translations (#96390)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 13:49:32 +02:00
Franck Nijhof
22b23b2c34 Migrate hassio services to support translations (#96386)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 13:47:58 +02:00
Franck Nijhof
ce5246a8cd Migrate homeassistant services to support translations (#96388)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 13:47:47 +02:00
Franck Nijhof
6a1cd628aa Migrate script services to support translations (#96401) 2023-07-12 13:45:38 +02:00
Franck Nijhof
cbddade4bf Migrate logbook services to support translations (#96341)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 13:44:15 +02:00
Franck Nijhof
0ca8a26184 Migrate datetime services to support translations (#96318)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 13:42:53 +02:00
Franck Nijhof
c6a9c6c948 Migrate date services to support translations (#96317) 2023-07-12 13:42:29 +02:00
Franck Nijhof
d0258c8fc8 Migrate switch services to support translations (#96405) 2023-07-12 12:53:24 +02:00
Franck Nijhof
eb3b56798d Migrate conversation services to support translations (#96365)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 12:32:25 +02:00
Franck Nijhof
7bc90297d2 Migrate integration services (G-H) to support translations (#96372) 2023-07-12 12:31:26 +02:00
Franck Nijhof
a3a2e6cc8d Migrate time services to support translations (#96402) 2023-07-12 12:23:39 +02:00
ollo69
ce3c23cb3a Add Nut commands to diagnostics data (#96285)
* Add Nut commands to diagnostics data

* Add test for diagnostics
2023-07-12 10:56:08 +02:00
Franck Nijhof
4edec69637 Migrate integration services (T-V) to support translations (#96379) 2023-07-12 07:37:13 +02:00
Franck Nijhof
8d360611d1 Migrate integration services (W-Z) to support translations (#96381) 2023-07-12 07:36:51 +02:00
J. Nick Koston
78a8f90488 Add additional tplink kasa OUI (#96383)
Found on another test device
2023-07-12 03:20:41 +02:00
Franck Nijhof
62fe4957c9 Migrate integration services (Q-S) to support translations (#96378) 2023-07-12 01:18:22 +02:00
Franck Nijhof
c6b36b6db4 Update RestrictedPython to 6.1 (#96358) 2023-07-12 01:08:31 +02:00
Franck Nijhof
ea28bd3c9c Update pre-commit to 3.3.3 (#96359) 2023-07-12 00:34:45 +02:00
Franck Nijhof
90d839724c Migrate integration services (N-P) to support translations (#96376) 2023-07-12 00:33:37 +02:00
Franck Nijhof
0329378f2f Migrate integration services (L-M) to support translations (#96374) 2023-07-12 00:24:16 +02:00
Franck Nijhof
ea3be7a789 Migrate integration services (E-F) to support translations (#96367) 2023-07-11 23:57:29 +02:00
Franck Nijhof
e4af293428 Migrate cloud services to support translations (#96319)
* Migrate cloud services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:21:00 +02:00
Franck Nijhof
f3b0c56c8c Migrate calendar services to support translations (#96310)
* Migrate camera services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:20:40 +02:00
Franck Nijhof
7d6148a295 Migrate button services to support translations (#96309) 2023-07-11 23:20:07 +02:00
Franck Nijhof
b1e4bae3f0 Migrate image_processing services to support translations (#96328)
* Migrate image_processing services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:19:50 +02:00
Franck Nijhof
7468320860 Migrate device_tracker services to support translations (#96320)
* Migrate device_tracker services to support translations

* Tweaks

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:19:29 +02:00
Franck Nijhof
bde7d734b5 Migrate automation services to support translations (#96306)
* Migrate automation services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:17:54 +02:00
Franck Nijhof
2330af82a5 Migrate climate services to support translations (#96314)
* Migrate climate services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:17:09 +02:00
J. Nick Koston
5d5c58338f Fix ESPHome deep sleep devices staying unavailable after unexpected disconnect (#96353) 2023-07-11 11:12:24 -10:00
Franck Nijhof
c252758ac2 Migrate integration services (B-D) to support translations (#96363) 2023-07-11 23:06:32 +02:00
Franck Nijhof
0ff015c3ad Migrate integration services (A) to support translations (#96362) 2023-07-11 23:04:27 +02:00
Franck Nijhof
aea2fc68e7 Migrate backup services to support translations (#96308)
* Migrate backup services to support translations

* Apply suggestions from code review

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 22:00:00 +02:00
Franck Nijhof
76e3272432 Migrate camera services to support translations (#96313)
* Migrate camera services to support translations

* Apply suggestions from code review

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

* Update homeassistant/components/camera/strings.json

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

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 21:59:08 +02:00
Franck Nijhof
91273481a8 Migrate number services to support translations (#96343) 2023-07-11 21:52:25 +02:00
starkillerOG
bc9b9048f0 Add Reolink sensor platform (#96323)
* Add Reolink sensor platform

* fix styling

* Add state class

* Add Event connection sensor

* Update homeassistant/components/reolink/sensor.py

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

* Use translation keys

* fix json

* fix json 2

* fix json 3

* Apply suggestions from code review

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-11 21:36:44 +02:00
Franck Nijhof
c431fc2297 Migrate reload only helper services to support translations (#96344) 2023-07-11 20:56:21 +02:00
Joost Lekkerkerker
77ebf8a8e5 Add entity translations to Juicenet (#95487) 2023-07-11 20:34:11 +02:00
Jan Bouwhuis
ad091479ea Cleanup unneeded MQTT vacuum feature check (#96312) 2023-07-11 20:32:33 +02:00
Franck Nijhof
05c194f36d Upgrade pylint-per-file-ignore to v1.2.1 (#96134) 2023-07-11 14:29:55 -04:00
Franck Nijhof
38823bae71 Update colorlog to 6.7.0 (#96131) 2023-07-11 14:29:09 -04:00
Joost Lekkerkerker
8b379254c3 Migrate Roomba to has entity name (#96085) 2023-07-11 14:27:31 -04:00
Joost Lekkerkerker
fe44827e3c Add entity translations to Rainforest eagle (#96031)
* Add entity translations to Rainforest eagle

* Add entity translations to Rainforest Eagle
2023-07-11 14:24:33 -04:00
Jan Bouwhuis
efcaad1179 Fix handling MQTT light brightness from zero rgb (#96286)
* Fix handling MQTT light brightness from zero rgb

* Fix log message
2023-07-11 14:22:12 -04:00
Joost Lekkerkerker
dfad1a920f Add entity translations to solarlog (#96157) 2023-07-11 20:19:51 +02:00
Joost Lekkerkerker
fe6402ef73 Use device class naming for sfr box (#96092) 2023-07-11 20:19:04 +02:00
Franck Nijhof
e9f76ed3d3 Update orjson to 3.9.2 (#96257) 2023-07-11 14:16:43 -04:00
Joost Lekkerkerker
a7edf0a608 Add entity translations to Ukraine Alarm (#96260)
* Add entity translations to Ukraine Alarm

* Add entity translations to Ukraine Alarm
2023-07-11 14:16:24 -04:00
Erik Montnemery
2257e7454a Remove unreferenced issues (#96264)
* Remove unreferenced issues

* Remove outdated tests
2023-07-11 14:15:16 -04:00
Joost Lekkerkerker
7d2559e6a5 Add has entity name to Blink (#96322) 2023-07-11 14:12:16 -04:00
J. Nick Koston
b106ca7983 Fix race fetching ESPHome dashboard when there are no devices set up (#96196)
* Fix fetching ESPHome dashboard when there are no devices setup

fixes #96194

* coverage

* fix
2023-07-11 14:11:51 -04:00
Joost Lekkerkerker
72f080bf8b Use explicit device naming for Escea (#96270) 2023-07-11 14:10:14 -04:00
puddly
b6e83be6f9 Fix ZHA serialization issue with warning devices (#96275)
* Bump ZHA dependencies

* Update unit tests to reduce mocks
2023-07-11 14:09:52 -04:00
Daniel Hjelseth Høyer
7e686db4be Tibber upgrade lib, improve reconnect issues (#96276)
Tibber upgrade lib, improve recoonect issues

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
2023-07-11 14:09:20 -04:00
J. Nick Koston
85ed347ff3 Bump aioesphomeapi to 15.1.6 (#96297)
* Bump aioesphomeapi to 15.1.5

changelog: https://github.com/esphome/aioesphomeapi/compare/v15.1.4...v15.1.5

- reduce traffic
- improve error reporting

* 6
2023-07-11 14:08:01 -04:00
starkillerOG
a0e20c6c6b Bump reolink_aio to 0.7.3 (#96284) 2023-07-11 19:42:59 +02:00
Joost Lekkerkerker
a04aaf10a5 Use DeviceInfo object d-o (#96280) 2023-07-11 19:41:55 +02:00
Joost Lekkerkerker
2f6826dbe3 Use DeviceInfo object s-x (#96281)
* Use DeviceInfo object o-x

* Use DeviceInfo object
2023-07-11 13:40:15 -04:00
Franck Nijhof
f25d5a157a Fix service schema to allow for services without any fields/properties (#96346) 2023-07-11 19:33:07 +02:00
Jan Bouwhuis
50442c5688 Speedup tests command_line integration (#96349) 2023-07-11 18:31:32 +02:00
G Johansson
49b6c8ed6e Fix diagnostics Sensibo (#96336) 2023-07-11 18:24:40 +02:00
Aaron Bach
a226b90943 Fix extra verbiage in Ridwell rotating category sensor (#96345) 2023-07-11 18:21:05 +02:00
Erik Montnemery
c61c5a0443 Schedule VacuumEntity for removal in Home Assistant Core 2024.2 (#96236) 2023-07-11 18:20:00 +02:00
Michael
5a87186916 Improve integration startup in AVM Fritz!Tools (#96269) 2023-07-11 18:01:05 +02:00
Erik Montnemery
65bacdddd8 Remove removed_yaml from the spotify integeration (#96261)
* Add removed_yaml issue to the homeassistant integration

* Remove issue translation from spotify

* Remove unrelated change

* Remove async_setup from spotify
2023-07-11 17:33:49 +02:00
Luke
38aa62a990 Bump Roborock to v0.30.0 (#96268)
bump to v0.30.0
2023-07-11 17:32:06 +02:00
Erik Montnemery
916e7dd359 Fix a couple of typos (#96298) 2023-07-11 17:28:54 +02:00
Franck Nijhof
f2f9b20880 Fix hassfest services check (#96337) 2023-07-11 16:48:07 +02:00
Erik Montnemery
107f589a2e Remove some duplicated translations (#96300) 2023-07-11 16:38:18 +02:00
Franck Nijhof
f054de0ad5 Add support for service translations (#95984) 2023-07-11 15:52:12 +02:00
Jan Bouwhuis
f12f8bca03 Avoid CI fail in command_line tests (#96324)
* Avoid CI fail in command_line tests

* Speedup tests manual update
2023-07-11 15:27:31 +02:00
starkillerOG
d9f27400b7 Reolink add reboot button (#96311) 2023-07-11 14:10:32 +02:00
J. Nick Koston
d4089bbdbe Bump aiohomekit to 2.6.7 (#96291) 2023-07-11 13:29:05 +02:00
Erik Montnemery
f46188c85a Improve the docstring of some config schema generators (#96296) 2023-07-11 11:34:16 +02:00
Jan Bouwhuis
f3e55e96f4 Improve test coverage mqtt vacuum (#96288) 2023-07-11 10:16:00 +02:00
Jan Bouwhuis
beff19f93c Improve mqtt tag schema logging and avoid tests that use xfail (#95711)
Improve schema logging and tests
2023-07-11 10:12:31 +02:00
Jan Bouwhuis
30578d6236 Deprecate mqtt vacuum with legacy schema (#95836)
* Deprecate mqtt vacuum with legacy schema

* Consistent comments

* Correct comment

* Remove persistence option

* Adjust string, mention restart

* Update deprecation comment
2023-07-11 09:54:28 +02:00
Erik Montnemery
6aa2ede6c7 Correct issues raised when calling deprecated vacuum services (#96295) 2023-07-11 08:45:45 +02:00
Joost Lekkerkerker
aec0694823 Move tractive attribute to entity class (#96247)
Clean up tractive entities
2023-07-11 08:09:57 +02:00
David Knowles
d973e43b90 Move Hydrawise to a supported library (#96023) 2023-07-10 23:26:02 -05:00
Erik Montnemery
22357701f0 Add filters to media_player/services.yaml (#95862) 2023-07-10 20:21:28 +02:00
Erik Montnemery
7f666849c2 Add filters to siren/services.yaml (#95864) 2023-07-10 20:20:36 +02:00
Joost Lekkerkerker
b8369a5831 Add entity translations to trafikverket weatherstation (#96251) 2023-07-10 19:42:13 +02:00
Michael
cf999d9ba4 Bump fritzconection to 1.12.2 (#96265) 2023-07-10 17:19:26 +02:00
Paulus Schoutsen
eee8566694 Differentiate between device info types (#95641)
* Differentiate between device info types

* Update allowed fields

* Update homeassistant/helpers/entity_platform.py

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

* Split up message in 2 lines

* Use dict for device info types

* Extract device info function and test error checking

* Simplify parsing device info

* move checks around

* Simplify more

* Move error checking around

* Fix order

* fallback config entry title to domain

* Remove fallback for name to config entry domain

* Ensure mocked configuration URLs are strings

* one more test case

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-10 09:56:06 -04:00
Joost Lekkerkerker
af22a90b3a Make Zodiac integration title translatable (#95816) 2023-07-10 15:49:25 +02:00
Guido Schmitz
a3681774d6 Use snapshots in devolo Home Network sensor tests (#95104)
Use snapshots

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-10 15:49:08 +02:00
disforw
5f6ddedd67 Change explicit rounding to suggested_display_precision (#95773) 2023-07-10 15:46:56 +02:00
Erik Montnemery
907c667859 Remove unreferenced issues (#96262) 2023-07-10 15:40:59 +02:00
J. Nick Koston
039a3bb6e9 Only load the device entry when it changes in the base entity (#95801) 2023-07-10 15:17:35 +02:00
Erik Montnemery
3cc66c8318 Add filters to remote/services.yaml (#95863) 2023-07-10 15:14:41 +02:00
Erik Montnemery
3dcf65bf31 Add filters to vacuum/services.yaml (#95865) 2023-07-10 15:14:08 +02:00
Erik Montnemery
39208a3749 Remove unsupported vacuum service handlers (#95787)
* Prevent implementing unsupported vacuum service handlers

* Remove unsupported service handlers

* Update test
2023-07-10 15:03:40 +02:00
Erik Montnemery
df229e655b Correct flags for issue registry issue raised by ezviz (#95846)
* Correct flags for issue registry issue raised by ezviz

* Fix translation strings
2023-07-10 14:17:37 +02:00
Joost Lekkerkerker
81dd3a4a93 Use explicit device name in trafikverket train (#96250) 2023-07-10 14:00:27 +02:00
Joost Lekkerkerker
b7980ec135 Add entity translations to trafikverket ferry (#96249) 2023-07-10 13:56:43 +02:00
Erik Montnemery
08a5f63474 Add deprecated_yaml issue to the homeassistant integration (#95980)
* Add deprecated_yaml issue to the homeassistant integration

* Update test

* Update homeassistant/components/homeassistant/strings.json

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

* Include DOMAIN in issue_id

* Update test

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-10 13:06:52 +02:00
Erik Montnemery
96c71b214f Check supported features in calls to vacuum services (#95833)
* Check supported features in vacuum services

* Update tests

* Add comment
2023-07-10 13:05:47 +02:00
J. Nick Koston
7dc03ef301 Use the ESPHome object_id to suggest the entity id (#95852) 2023-07-10 13:02:34 +02:00
Erik Montnemery
87f284c7e9 Add MEDIA_ANNOUNCE to MediaPlayerEntityFeature (#95906) 2023-07-10 12:58:53 +02:00
Jan Bouwhuis
7eb087a9d7 Use common string references for device_automation translations (#95897) 2023-07-10 12:56:51 +02:00
Joost Lekkerkerker
af03a284a5 Add entity translations to tailscale (#96237) 2023-07-10 12:50:56 +02:00
Franck Nijhof
7ca9f6757a Use fixed token for CodeCov uploads to deal with recent failures (#96133) 2023-07-10 12:42:55 +02:00
Franck Nijhof
e7b00da662 Clean up unused device class translations from binary sensor (#96241) 2023-07-10 12:23:42 +02:00
Allen Porter
bc2319bbe6 Update Nest Legacy removal strings (#96229) 2023-07-10 11:22:15 +02:00
J. Nick Koston
882529c0a0 Simplify FastUrlDispatcher resolve (#96234) 2023-07-10 11:13:27 +02:00
J. Nick Koston
fa6d659f2b Bump aioesphomeapi to 15.1.4 (#96227) 2023-07-10 11:11:08 +02:00
Franck Nijhof
303e549213 Update yamllint to 1.32.0 (#96109)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-07-10 10:13:48 +02:00
Franck Nijhof
e5ccd85e7e Fix missing name in Siren service descriptions (#96072) 2023-07-10 08:13:47 +02:00
Allen Porter
c4a39bbfb1 Remove Legacy Works With Nest (#96111)
* Remove Legacy Works With Nest

* Simplify nest configuration

* Cleanup legacy nest config entries
2023-07-09 19:38:05 -07:00
J. Nick Koston
1c54b2e025 Reduce system_log overhead (#96177) 2023-07-09 15:18:48 -10:00
J. Nick Koston
1aefbd8b86 Bump zeroconf to 0.71.0 (#96183) 2023-07-09 15:18:32 -10:00
Allen Porter
32b3fa1734 Enable retries on rainbird devices by loading model and version (#96190)
Update rainbird to load device model and version
2023-07-09 16:49:44 -07:00
J. Nick Koston
995fb993e6 Avoid probing ESPHome devices when we do not have the encryption key (#95820) 2023-07-09 12:57:04 -10:00
J. Nick Koston
e8397063d3 Optimize bluetooth base scanners for python3.11+ (#96165) 2023-07-09 12:56:33 -10:00
Chris Talkington
7390e3a997 Refactor IPP tests (#94097)
refactor ipp tests
2023-07-09 17:37:32 -05:00
Joost Lekkerkerker
ac594e6bce Add entity translations to Sonarr (#96159) 2023-07-09 15:58:23 -05:00
Chris Talkington
4a785fd2ad Update pyipp to 0.14.2 (#96218)
update pyipp to 0.14.2
2023-07-09 15:53:25 -05:00
G Johansson
0546e7601c Enhance diagnostics for Sensibo (#96150)
* Diag Sensibo

* Fix snapshot
2023-07-09 22:50:12 +02:00
Antoine Lépée
c720658c0f Enrich instructions to retreive Roomba password (#95902)
To setup Roomba 981 vacuum cleaner, user must press Home AND Spot buttons for about 2 seconds. Pressing only the Home button has no effect (it took me a while before figuring out).

Tested against Roomba 981 (may also be the case with all 900 series)
2023-07-09 22:49:08 +02:00
J. Nick Koston
bc28d7f33e Add slots to bluetooth manager (#95881) 2023-07-09 10:06:26 -10:00
Franck Nijhof
d64ebbdc84 Fix missing name in wilight service descriptions (#96073) 2023-07-09 21:51:33 +02:00
Joost Lekkerkerker
3f907dea80 Add entity translations to Starlink (#96181) 2023-07-09 21:43:18 +02:00
Matthias Alphart
89259865fb Restore KNX telegram history (#95800)
* Restore KNX telegram history

* increase default log size

* test removal of telegram history
2023-07-09 21:15:55 +02:00
Joost Lekkerkerker
8bbb395bec Add entity translations to Speedtest.net (#96168)
* Add entity translations to Speedtest.net

* Fix tests
2023-07-09 20:20:39 +02:00
Joost Lekkerkerker
0735b39fbb Use explicit device name for Stookwijzer (#96184) 2023-07-09 20:19:05 +02:00
Luke
ab3b0c9075 Add error sensor to Roborock (#96209)
add error sensor
2023-07-09 20:17:19 +02:00
Joost Lekkerkerker
9ef4b2e5f5 Migrate ring to entity name (#96080)
Migrate ring to has entity name
2023-07-09 13:55:10 -04:00
Franck Nijhof
cfe57f7e0c Update pytest-xdist to 3.3.1 (#96110) 2023-07-09 13:52:45 -04:00
J. Nick Koston
8bfe692eea Update tplink dhcp discovery (#96191)
* Update tplink dhcp discovery

- Found a KP device with 54AF97
- Found ES devices also use the same OUIs as EP

* from issue 95028
2023-07-09 17:36:46 +02:00
Franck Nijhof
18dddd6342 Update Ruff to v0.0.277 (#96108) 2023-07-09 10:10:23 -04:00
Matthias Alphart
479015244d KNX Cover: Use absolute tilt position if available (#96192) 2023-07-09 12:00:51 +02:00
J. Nick Koston
6758292655 Add bthome logbook platform (#96171) 2023-07-08 21:42:48 -10:00
Ernst Klamer
18314b09f6 Bump bthome to 2.12.1 (#96166) 2023-07-08 09:23:25 -10:00
G Johansson
2ebc265184 Bump pysensibo to 1.0.31 (#96154) 2023-07-08 09:23:11 -10:00
Patrick ZAJDA
c27a014a0a Use device name for Nuki door sensor (#95904)
Explicitly set Nuki door sensor name to None

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
2023-07-08 21:13:32 +02:00
dougiteixeira
4b1d096e6b Add device_class and state_class in config flow for SQL (#95020)
* Add device_class and state_class in config flow for SQL

* Update when selected NONE_SENTINEL

* Add tests

* Use SensorDeviceClass and SensorStateClass in tests

* Add volatile_organic_compounds_parts in strings selector

* Add test_attributes_from_entry_config

* Remove test_attributes_from_entry_config and complement test_device_state_class

* Add test_attributes_from_entry_config in test_sensor.py
2023-07-08 21:00:22 +02:00
Arkadii Yakovets
b2bf360297 Update holidays to 0.28 (#95091)
Bump Python Holidays version to 0.28

Set `language` from country's default language
for holidays objects.
2023-07-08 20:27:25 +02:00
G Johansson
2f5ff808a0 Add dim to full state service for Sensibo (#96152)
Add dim to full state service
2023-07-08 20:03:19 +02:00
G Johansson
d37ac5ace9 Fix implicitly using device name in Yale Smart Living (#96161)
Yale Smart Living device name
2023-07-08 20:03:02 +02:00
Joost Lekkerkerker
7f6309c5cb Add entity translations to SkyBell (#96096)
* Add entity translations to SkyBell

* Add entity translations to SkyBell
2023-07-08 19:55:10 +02:00
Franck Nijhof
88d9a29b55 Update Pillow to 10.0.0 (#96106) 2023-07-08 07:30:54 -10:00
Joost Lekkerkerker
92693d5fde Add entity translations to Slack (#96149) 2023-07-08 18:36:24 +02:00
Joost Lekkerkerker
2c9910d9b6 Use default MyStrom devicetype if not present (#96070)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-07-08 17:10:51 +02:00
Joost Lekkerkerker
598610e313 Add entity translations to Sensibo (#96091) 2023-07-08 16:50:46 +02:00
Franck Nijhof
de211de598 Update lxml to 4.9.3 (#96132) 2023-07-08 16:49:17 +02:00
Marc Mueller
5bf1547ebc Update pydantic to 1.10.11 (#96137) 2023-07-08 14:00:51 +02:00
J. Nick Koston
e39f023e3f Refactor ESPHome camera to avoid creating tasks (#95818) 2023-07-08 12:36:40 +02:00
Erik Montnemery
3d064b7d6b Add filters to cover/services.yaml (#95854) 2023-07-08 11:51:02 +02:00
Erik Montnemery
b5678a12ec Add filters to lock/services.yaml (#95860) 2023-07-08 11:50:13 +02:00
Erik Montnemery
602ca5dafe Add filters to humidifier/services.yaml (#95859) 2023-07-08 11:49:38 +02:00
Erik Montnemery
39c386e8b6 Add filters to fan/services.yaml (#95855) 2023-07-08 11:49:09 +02:00
Jan-Philipp Benecke
6f9a640fa3 Make workday integration title translatable (#95803) 2023-07-08 11:48:15 +02:00
Erik Montnemery
b8af7fbd55 Update template vacuum supported features (#95831) 2023-07-08 11:47:49 +02:00
Jan-Philipp Benecke
207721b421 Make generic camera integration title translatable (#95806) 2023-07-08 11:43:14 +02:00
Erik Montnemery
32b7370321 Add filters to alarm_control_panel/services.yaml (#95850) 2023-07-08 11:42:27 +02:00
Álvaro Fernández Rojas
1eb2ddf010 Update aioairzone-cloud to v0.2.1 (#96063) 2023-07-08 11:41:39 +02:00
Joost Lekkerkerker
e0274ec854 Use device class naming for nobo hub v2 (#96022) 2023-07-08 11:39:53 +02:00
Erik Montnemery
6dae3553f2 Add MEDIA_ENQUEUE to MediaPlayerEntityFeature (#95905) 2023-07-08 10:55:25 +02:00
J. Nick Koston
2b4f6ffcd6 Speed up hassio ingress (#95777) 2023-07-08 10:50:39 +02:00
Joost Lekkerkerker
bbf97fdf01 Add entity translations for plugwise (#95808) 2023-07-08 10:48:14 +02:00
Scott Giminiani
f4ad261f51 Use global CONF_API_TOKEN constant rather than defining our own (#96120) 2023-07-08 10:46:34 +02:00
Eric Severance
abdbea8522 Bump pywemo from 0.9.1 to 1.1.0 (#95951) 2023-07-08 09:26:19 +02:00
J. Nick Koston
51344d566e Small speed up to cameras (#96124) 2023-07-08 09:23:45 +02:00
J. Nick Koston
e38f55fdb6 Move ESPHomeManager into its own file (#95870)
* Move ESPHomeManager into its own file

This is not a functional change. This is only a reorganization
ahead of some more test coverage being added so moving tests
around can be avoided later.

* relos

* fixes

* merge a portion of new cover since its small and allows us to remove the __init__ from .coveragerc
2023-07-08 09:19:44 +02:00
Franck Nijhof
967c4d13d8 Update pipdeptree to 2.9.4 (#96115) 2023-07-08 09:17:58 +02:00
Franck Nijhof
7178e1cefe Update apprise to 1.4.5 (#96086) 2023-07-08 08:59:34 +02:00
c0ffeeca7
5d1b4f48e0 Rename 'Switch as X' helper to ... (#96114) 2023-07-08 08:59:26 +02:00
Robert Hillis
8bfac2c46c Correct Goalzero sensor state class (#96122) 2023-07-08 08:52:15 +02:00
Franck Nijhof
a6fe53f2b3 Fix missing name in Fritz!Box service descriptions (#96076) 2023-07-08 08:50:47 +02:00
Robert Hillis
c2ccd18528 Bump goalzero to 0.2.2 (#96121) 2023-07-07 21:40:18 -04:00
Joost Lekkerkerker
a0d54e8f4e Use device class naming for SimpliSafe (#96093) 2023-07-07 17:42:19 -06:00
Jan Bouwhuis
7f184e05e3 Fix reference to translation reference in buienradar translations (#96119)
Do not  reference a reference
2023-07-08 01:36:14 +02:00
Jan Bouwhuis
18ee9f4725 Refactor async_get_hass to rely on threading.local instead of a ContextVar (#96005)
* Test for async_get_hass

* Add Fix
2023-07-07 14:52:38 -04:00
Franck Nijhof
372687fe81 Update PyTurboJPEG to 1.7.1 (#96104) 2023-07-07 08:02:47 -10:00
Patrick ZAJDA
914fc570c6 Set some Switchbot entity names to none (#90846) 2023-07-07 19:38:43 +02:00
J. Nick Koston
f1db497efe Avoid http route linear search fallback when there are multiple paths (#95776) 2023-07-07 19:36:38 +02:00
Joost Lekkerkerker
17440c9608 Add entity translations to Rympro (#96087) 2023-07-07 19:24:52 +02:00
Joost Lekkerkerker
849aa5d9ef Use explicit device name for Yalexs BLE (#96105) 2023-07-07 19:15:41 +02:00
Erik Montnemery
1e4f43452c Warn when vacuum.turn_on or turn_off is called on Tuya vacuums (#95848)
Co-authored-by: Hmmbob <33529490+hmmbob@users.noreply.github.com>
2023-07-07 19:00:06 +02:00
Joost Lekkerkerker
daa9162ca7 Add entity translations to pvoutput (#96029) 2023-07-07 18:58:55 +02:00
Jan-Philipp Benecke
ac19de9857 Make season integration title translatable (#95802) 2023-07-07 18:30:00 +02:00
Joost Lekkerkerker
29d7535b7b Add entity translations to Rainmachine (#96033) 2023-07-07 18:27:44 +02:00
J. Nick Koston
6402e2c140 Bump aioesphomeapi to 15.1.3 (#95819) 2023-07-07 18:25:54 +02:00
Erik Montnemery
d1cfb6e1a8 Remove unreferenced issues (#95976) 2023-07-07 18:19:11 +02:00
Erik Montnemery
298ab05470 Add missing issue translations to the kitchen_sink integration (#95931) 2023-07-07 18:15:06 +02:00
Franck Nijhof
f2990d97b2 Update sentry-sdk to 1.27.1 (#96089) 2023-07-07 18:10:44 +02:00
Joost Lekkerkerker
0f63aaa05b Remove deprecated Pihole binary sensors (#95799) 2023-07-07 18:08:33 +02:00
Joost Lekkerkerker
7026ffe0a3 UPB explicit device name (#96042) 2023-07-07 11:25:58 -04:00
Aaron Bach
3fe180d55c Fix implicit device name for RainMachine update entity (#96094)
Fix implicit device name for RainMachine update entity
2023-07-07 11:25:23 -04:00
Joost Lekkerkerker
ddd0d3faa2 Get MyStrom device state before checking support (#96004)
* Get device state before checking support

* Add full default device response to test

* Add test mocks

* Add test coverage
2023-07-07 11:24:41 -04:00
Franck Nijhof
f205d50ac7 Fix missing name in FluxLED service descriptions (#96077) 2023-07-07 16:42:05 +02:00
Joost Lekkerkerker
fec40ec250 Add entity translations to Recollect waste (#96037) 2023-07-07 16:32:59 +02:00
Franck Nijhof
529846d3a2 Fix implicit use of device name in Slimproto (#96081) 2023-07-07 16:19:29 +02:00
Franck Nijhof
8138c85074 Fix missing name in TP-Link service descriptions (#96074) 2023-07-07 16:12:52 +02:00
Joost Lekkerkerker
c4c4b6c81b Add device class back to Purpleair (#96062) 2023-07-07 16:03:27 +02:00
Franck Nijhof
25b8593486 Fix missing name in Renault service descriptions (#96075) 2023-07-07 16:00:45 +02:00
Jan Stienstra
1aecbb9bd5 Add full test coverage to Jellyfin (#86974)
* Add full test coverage

* Remove unreachable exception

* Remove comment line. Conflicting with codecov

* Use auto fixture and syrupy
2023-07-07 08:42:02 -04:00
Joost Lekkerkerker
d202b7c3c7 Add entity translations to RDW (#96034) 2023-07-07 14:40:22 +02:00
Barry Williams
7d97152593 Remove openhome from discovery component (#96021) 2023-07-07 14:24:42 +02:00
Joost Lekkerkerker
70445c0edd Add RDW codeowner (#96035) 2023-07-07 14:13:01 +02:00
Erik Montnemery
86a397720f Move platform_integration_no_support issue to the homeassistant integration (#95927)
* Move platform_integration_no_support issue to the homeassistant integration

* Update test

* Improve repair text

* Update test
2023-07-07 13:31:54 +02:00
Joost Lekkerkerker
84979f8e92 Use device class naming in Renault (#96038) 2023-07-07 10:34:11 +02:00
Adrián Moreno
8c5df60cc3 Revert zwave_js change to THERMOSTAT_MODE_SETPOINT_MAP (#96058)
Remove THERMOSTAT_MODE_SETPOINT_MAP map

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>
2023-07-07 10:27:28 +02:00
Joost Lekkerkerker
4bf3720911 Add entity translations to RFXTRX (#96041) 2023-07-07 06:44:09 +02:00
Scott Giminiani
66a1e5c2c1 Remove copy/pasted references to GMail in YouTube integration tests (#96048)
These were likely used as an example when writing the tests for this
component and we missed renaming them.

A few unused vars with references to GMail were also removed.
2023-07-07 06:43:46 +02:00
Mike Woudenberg
ba1266a893 Add sensors to LOQED integration for battery percentage and BLE stength (#95726)
* Add sensors for battery percentage and BLE stength

* Use translatable name for BLE strength, no longer pass enity to sensor
2023-07-06 23:09:34 -04:00
Joost Lekkerkerker
d2bcb5fa87 Add entity translations to Rainbird (#96030)
* Add entity translations to Rainbird

* Add entity translations to Rainbird
2023-07-06 16:03:01 -07:00
Joost Lekkerkerker
63bf4b8099 Add entity translations to Purpleair (#95942)
* Add entity translations to Purpleair

* Add entity translations to Purpleair

* Change vocaqi sensor
2023-07-06 23:26:21 +02:00
lymanepp
6c4b5291e1 Add humidity to NWS forecast (#95575)
* Add humidity to NWS forecast to address https://github.com/home-assistant/core/issues/95572

* Use pynws 1.5.0 enhancements for probabilityOfPrecipitation, dewpoint, and relativeHumidity.

* Update requirements to match pynws version

* test for clear night

* update docstring

---------

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
2023-07-06 23:05:46 +02:00
Joost Lekkerkerker
e94726ec84 Use explicit device naming for Switchbot (#96011)
Use explicit entity naming for Switchbot
2023-07-06 23:01:06 +02:00
Joost Lekkerkerker
99430ceb34 Add entity translations for PureEnergie (#95935)
* Add entity translations for PureEnergie

* Fix tests
2023-07-06 22:51:05 +02:00
Joost Lekkerkerker
d1e19c3a85 Add entity translations to Pushbullet (#95943) 2023-07-06 22:39:18 +02:00
Guillaume Duveau
23d5fb9622 Add more device info for SmartThings devices (#95723)
* Add more device info for SmartThings devices

* Fix binary_sensor test

* Fix binary sensor test, try 2

* Fix and add SmartsThings new device info tests
2023-07-06 14:26:46 -04:00
puddly
ecc0917e8f Migrate bracketed IP addresses in ZHA config entry (#95917)
* Automatically correct IP addresses surrounded by brackets

* Simplify regex

* Move pattern inline

* Maintain old behavior of stripping whitespace
2023-07-06 11:47:51 -04:00
micha91
59645344e7 Fix grouping feature for MusicCast (#95958)
check the current source for grouping using the source ID instead of the label
2023-07-06 11:20:20 -04:00
J. Nick Koston
b7b8afffd0 Handle integrations with empty services or failing to load during service description enumeration (#95911)
* wip

* tweaks

* tweaks

* add coverage

* complain loudly as we never execpt this to happen

* ensure not None

* comment it
2023-07-06 11:19:06 -04:00
Jan Bouwhuis
b9c7e7c15e Fix not including device_name in friendly name if it is None (#95485)
* Omit device_name in friendly name if it is None

* Fix test
2023-07-06 11:14:09 -04:00
Bram Kragten
5d9533fb90 Make script services always respond when asked (#95991)
* Make script services always respond when asked

* Update test_init.py
2023-07-06 10:48:03 -04:00
Marcel van der Veldt
2b0f2227fd Fix state of slimproto players (#96000) 2023-07-06 16:28:20 +02:00
Bram Kragten
342d07cb92 Set correct response value in service description when async_set_service_schema is used (#95985)
* Mark scripts as response optional, make it always return a response if return_response is set

* Update test_init.py

* Revert "Update test_init.py"

This reverts commit 8e113e54dbf183db06e1d1f0fea95d6bc59e4e80.

* Split + add test
2023-07-06 10:24:34 -04:00
Joost Lekkerkerker
8015d4c7b4 Fix entity name for Flick Electric (#95947)
Fix entity name
2023-07-06 10:21:15 -04:00
Joost Lekkerkerker
45ae6b3475 Add explicit device naming for Tuya sensors (#95944) 2023-07-06 10:19:42 -04:00
Joost Lekkerkerker
966e89a60c Use device name for Nuki (#95941) 2023-07-06 10:17:59 -04:00
Philip Allgaier
991ff81e46 Mention automatic issue assignment in issue template (#95987)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-06 15:01:03 +02:00
neocolis
63cb50977b Fix matter exception NoneType in set_brightness for optional min/max level values (#95949)
Fix exception NoneType in set_brightness for optional min/max level values
2023-07-06 14:50:51 +02:00
Jan-Philipp Benecke
be01eb5aad Explicitly use device name as entity name for Xiaomi fan and humidifier (#95986) 2023-07-06 13:25:34 +02:00
Erik Montnemery
de24860c87 Add filters to calendar/services.yaml (#95853) 2023-07-06 11:13:43 +02:00
Allen Porter
85e4454d45 Bump pyrainbird to 2.1.0 (#95968) 2023-07-06 10:26:10 +02:00
Erik Montnemery
8a4085011d Add missing qnap translation (#95969) 2023-07-06 09:02:32 +02:00
Michael
af1cb7be58 Migrate from deprecated VacuumEntity to StateVacuumEntity in Ecovacs (#95920)
* migrate to StateVacuumEntity

* harmoize supported features start and stop

* apply suggestions
2023-07-06 08:49:59 +02:00
J. Nick Koston
cb7fa494a4 Make SwitchBot no_devices_found message more helpful (#95916) 2023-07-05 18:56:09 -05:00
Jan Bouwhuis
186295ef8a Correct spelling roborock strings (#95919) 2023-07-05 22:27:03 +02:00
Adrián Moreno
0e428f8d39 Deprecate Dry and Fan preset modes in favor of HVAC modes (#95634)
* zwave_js: deprecate Dry and Fan preset modes

Migrating Dry and Fan presets to HVAC modes

* Move consts. Set Dry and Fan as HVAC-first modes.

* Update homeassistant/components/zwave_js/climate.py

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>

* Fix tests

* Keep track of HA release when deprecation was introduced

---------

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2023-07-05 15:12:21 -04:00
J. Nick Koston
dc5ee71d7a Add slots to core EventBus (#95856) 2023-07-05 11:47:24 -05:00
Bram Kragten
20dc9203dd Update frontend to 20230705.1 (#95913) 2023-07-05 18:20:10 +02:00
Jan Bouwhuis
d9721702af Address late review of freebox tests (#95910)
Use lower case for local variables
2023-07-05 16:59:10 +02:00
Erik Montnemery
c7f6d84058 Warn when changing multipan channel if there are not 2 known users (#95898)
* Warn when changing multipan channel if there are not 2 known users

* Add test

* Improve messages

* Tweak translation string

* Adjust message

* Remove unused translation placeholders
2023-07-05 16:51:28 +02:00
J. Nick Koston
ea57f78392 Add slots to the service registry (#95857) 2023-07-05 15:59:36 +02:00
Florent Thiery
bd7057f7b1 Add raid array degraded state binary sensor to freebox sensors (#95242)
Add raid array degraded state binary sensor
2023-07-05 15:09:12 +02:00
gigatexel
c75c79962a Clarify GPS coordinates for device_tracker.see (#95847) 2023-07-05 14:31:27 +02:00
J. Nick Koston
505f8fa363 Fix ESPHome camera not accepting the same exact image bytes (#95822) 2023-07-05 07:17:28 -05:00
Aaron Collins
f028d1a1ca Bump pydaikin 2.10.5 (#95656) 2023-07-05 07:12:18 -05:00
J. Nick Koston
b2e708834f Add slots to the StateMachine class (#95849) 2023-07-05 14:00:37 +02:00
Erik Montnemery
39dcb5a2b5 Adjust services and properties supported by roborock vacuum (#95789)
* Update supported features

* Raise issue when vacuum.start_pause is called
2023-07-05 12:53:07 +02:00
Bram Kragten
85e8eee94e Update frontend to 20230705.0 (#95890) 2023-07-05 09:54:23 +02:00
J. Nick Koston
91f334ca59 Small cleanups to service calls (#95873) 2023-07-05 09:25:38 +02:00
J. Nick Koston
9109b5fead Bump protobuf to 4.23.3 (#95875) 2023-07-05 08:55:25 +02:00
Daniel Gangl
b7221bfe09 Bump zamg to 0.2.4 (#95874)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-07-05 08:50:30 +02:00
J. Nick Koston
1dfa2f3c6b Use slots in TraceElement (#95877) 2023-07-05 08:44:00 +02:00
J. Nick Koston
659281aab6 Fix ESPHome alarm_control_panel when state is missing (#95871) 2023-07-05 08:35:40 +02:00
Jan-Philipp Benecke
436cda1489 Make local calendar integration title translatable (#95805) 2023-07-04 23:35:32 -07:00
Emilv2
cfe6185c1c Bump pydelijn to 1.1.0 (#95878) 2023-07-05 08:35:02 +02:00
Allen Porter
26f2fabd85 Fix timezones used in list events (#95804)
* Fix timezones used in list events

* Add additional tests that catch floating vs timezone datetime comparisons
2023-07-05 08:25:03 +02:00
Álvaro Fernández Rojas
60e2ee86b2 Add Airzone Cloud Zone running binary sensor (#95606) 2023-07-04 14:29:14 -05:00
J. Nick Koston
ea160c2bad Fix reload in cert_expiry (#95867) 2023-07-04 12:13:52 -05:00
Erik Montnemery
c46495a731 Remove unsupported services and fields from fan/services.yaml (#95858) 2023-07-04 17:58:15 +02:00
Martin Hjelmare
02192ddf82 Set Matter battery sensors as diagnostic (#95794)
* Set matter battery sensor to diagnostic

* Update tests

* Use new eve contact sensor dump across the board

* Assert entity category

* Complete typing
2023-07-04 14:54:37 +02:00
Erik Montnemery
6964a2112a Revert "Remove unsupported services from tuya vacuum" (#95845)
Revert "Remove unsupported services from tuya vacuum (#95790)"

This reverts commit 5712d12c42.
2023-07-04 14:42:44 +02:00
Franck Nijhof
52d57efcbf Revert "Remove airplay filter now that apple tv supports airplay 2" (#95843) 2023-07-04 14:41:19 +02:00
Erik Montnemery
2ca648584d Update mqtt vacuum supported features (#95830)
* Update mqtt vacuum supported features

* Update test
2023-07-04 14:18:42 +02:00
Jan Bouwhuis
c26dc0940c Use common translations for On, Off, Open and Closed (#95779)
* Use common translations for On and Off

* Used common translations for open and closed

* Update homeassistant/components/sensibo/strings.json

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

* Only update state translations

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-04 13:52:01 +02:00
starkillerOG
b3e1a3f624 Reolink fix missing title_placeholders (#95827) 2023-07-04 13:40:22 +02:00
Martin Hjelmare
081e4e03a7 Disable legacy device tracker no platform log (#95839) 2023-07-04 13:26:48 +02:00
Erik Montnemery
c84dacf2fc Update tuya vacuum supported features (#95832) 2023-07-04 13:19:16 +02:00
Martin Hjelmare
91087392fe Disable proximity no platform log (#95838) 2023-07-04 12:52:04 +02:00
Erik Montnemery
8f2a21d270 Update sharkiq vacuum supported features (#95829) 2023-07-04 11:51:42 +02:00
Erik Montnemery
dc34d91da4 Update roomba vacuum supported features (#95828) 2023-07-04 11:03:40 +02:00
Erik Montnemery
10e9b9f813 Fix ring siren test (#95825) 2023-07-04 09:16:40 +02:00
Erik Montnemery
e0c77fba22 Fix siren.toggle service schema (#95770) 2023-07-04 08:48:16 +02:00
Joost Lekkerkerker
234ebdcb84 Add entity translations for P1 Monitor (#95811) 2023-07-04 08:39:24 +02:00
Robert Svensson
fe1430d04b Bump aiounifi to v49 (#95813) 2023-07-03 23:55:23 +02:00
Joost Lekkerkerker
04be7677a9 Add entity translations for Open UV (#95810) 2023-07-03 23:00:12 +02:00
Paul Bottein
4581c36648 Fix datetime parameter validation for list events (#95778) 2023-07-03 15:22:22 -04:00
Allen Porter
2f73be0e50 Ensure that calendar output values are json types (#95797) 2023-07-03 12:05:02 -07:00
Paulus Schoutsen
0f725a24bd Remove the weak ref for tracking update listeners (#95798) 2023-07-03 13:56:21 -05:00
J. Nick Koston
4d3662d4da Tune httpx keep alives for polling integrations (#95782)
* Tune keep alives for polling integrations

aiohttp closes the connection after 15s by default,
and httpx closes the connection after 5s by default.

We have a lot of integrations that poll every 10-60s
which create and tear down connections over and over.

Set the keep alive time to 65s to maximize connection
reuse and avoid tls negotiation overhead

* Apply suggestions from code review

* adjust
2023-07-03 14:21:59 -04:00
Erik Montnemery
78880f0c9d Fix execute device actions with WS execute_script (#95783) 2023-07-03 14:21:01 -04:00
J. Nick Koston
3f9d5a0192 Use the converter factory in sensor.recorder._normalize_states (#95785)
We have a factory to create converters now which avoids
the overhead of calling convert to create the converter
every time
2023-07-03 14:20:23 -04:00
J. Nick Koston
73f90035bb Bump aioesphomeapi to 15.1.2 (#95792)
changelog: https://github.com/esphome/aioesphomeapi/compare/v15.1.1...v15.1.2

intentionally not tagged for beta to give it more time in dev
since we are near the end of the beta cycle
2023-07-03 14:19:41 -04:00
Bram Kragten
aed0c39bc8 Update frontend to 20230703.0 (#95795) 2023-07-03 14:17:24 -04:00
Erik Montnemery
5f9da06e49 Fix flaky websocket_api test (#95786) 2023-07-03 11:53:21 -05:00
Erik Montnemery
5712d12c42 Remove unsupported services from tuya vacuum (#95790) 2023-07-03 18:37:18 +02:00
Joost Lekkerkerker
27e4bca1b3 Fix Growatt translation key (#95784) 2023-07-03 18:36:37 +02:00
Joost Lekkerkerker
f0eb084908 Add entity translations to Notion (#95755)
* Add entity translations to Notion

* Use device class translations

* Use device class translations
2023-07-03 18:31:07 +02:00
Marc Mueller
0a165bb35a Improve opower generic typing (#95758) 2023-07-03 17:43:52 +02:00
Franck Nijhof
430a1bcb3d Fix implicit use of device name in Verisure (#95781) 2023-07-03 17:38:54 +02:00
Franck Nijhof
3fa1e12152 Fix implicit use of device name in TwenteMilieu (#95780) 2023-07-03 17:38:03 +02:00
Jan Bouwhuis
e5eb5dace5 Fix translation growatt inverter temperature (#95775) 2023-07-03 16:41:51 +02:00
tronikos
4e7d8b579a Address Opower review comments (#95763)
* Address comments

* Apply suggestions from code review

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

* Update sensor.py

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-03 14:53:44 +02:00
tronikos
bd6f70c236 Bump opower to 0.0.12 (#95748) 2023-07-03 14:19:40 +02:00
Marcel van der Veldt
266522267a Bump aioslimproto to 2.3.2 (#95754) 2023-07-03 14:19:05 +02:00
Jan-Philipp Benecke
935242e64e Use device info object for Discovergy (#95764) 2023-07-03 14:04:17 +02:00
Joost Lekkerkerker
8062a0a3bd Use device info object for Nuki (#95757) 2023-07-03 14:03:24 +02:00
Joost Lekkerkerker
78cc11ebc4 Use device class naming for Nuki (#95756) 2023-07-03 14:02:49 +02:00
Joost Lekkerkerker
4ee7ea3cba Use DeviceInfo object for Nobo hub (#95753) 2023-07-03 14:01:58 +02:00
hidaris
3bd8955e0e Add Matter Climate support (#95434)
* Add Matter Climate support

* update set target temp and update callback

* remove print

* remove optional property

* Adjust the code to improve readability.

* add thermostat test

* Remove irrelevant cases in setting the target temperature.

* add temp range support

* update hvac action

* support adjust low high setpoint..

* support set hvac mode

* address some review feedback

* move some methods around

* dont discover climate in switch platform

* set some default values

* fix some of the tests

* fix some typos

* Update thermostat.json

* Update homeassistant/components/matter/climate.py

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

* Update homeassistant/components/matter/climate.py

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

* support heat_cool in hvac_modes

* address some review feedback

* handle hvac mode param in set temp service

* check hvac modes by featuremap

* add comment to thermostat feature class

* make ruff happy..

* use enum to enhance readability.

* use builtin feature bitmap

* fix target temp range and address some feedback

* use instance attribute instead of class attr

* make ruff happy...

* address feedback about single case

* add init docstring

* more test

* fix typo in tests

* make ruff happy

* fix hvac modes test

* test case for update callback

* remove optional check

* more tests

* more tests

* update all attributes in the update callback

* Update climate.py

* fix missing test

---------

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-03 12:33:50 +02:00
Michael Davie
367acd0433 Bump env_canada to v0.5.35 (#95497)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-07-03 11:23:32 +02:00
Raman Gupta
de7677b28d Small zwave_js code cleanup (#95745) 2023-07-03 09:30:53 +02:00
Richard Kroegel
cdea33d191 Bump bimmer_connected to 0.13.8 (#95660)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-07-03 09:12:17 +02:00
J. Nick Koston
2b66480894 Speed up routing URLs (#95721)
alternative to #95717
2023-07-02 23:00:33 -04:00
J. Nick Koston
7bdd64a3f7 Handle invalid utf-8 from the ESPHome dashboard (#95743)
If the yaml file has invalid utf-8, the config flow would raise an
unhandled exception. Allow the encryption key to be entered manually
in this case instead of a hard failure

fixes #92772
2023-07-02 22:47:25 -04:00
dougiteixeira
75bdb03363 Fix source device when source entity is changed for Utility Meter (#95636)
* Fix source device when source entity is changed

* Update loop

* Complement and add comments in the test_change_device_source test

* Only clean up dev reg when options change

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-07-02 22:46:21 -04:00
Joost Lekkerkerker
7fdbc7b75d Clean up solarlog const file (#95542)
Move platform specifics to their own file
2023-07-02 22:43:14 -04:00
Allen Porter
7d6595f755 Delete the local calendar store when removing the config entry (#95599)
* Delete calendar store when removing the config entry

* Unlink file on remove with tests
2023-07-02 22:42:39 -04:00
Joost Lekkerkerker
792525b7a2 Add entity translations for Meater (#95732)
* Add entity translations for Meater

* Update homeassistant/components/meater/sensor.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-07-02 22:41:46 -04:00
Joost Lekkerkerker
4551954c85 Add entity translations to LaCrosse View (#95686) 2023-07-02 21:56:37 -04:00
J. Nick Koston
b24c6adc75 Avoid regex for negative zero check in sensor (#95691)
* Avoid regex for negative zero check in sensor

We can avoid calling the regex for every sensor value
since most of the time values are not negative zero

* tweak

* tweak

* Apply suggestions from code review

* simpler

* cover

* safer and still fast

* safer and still fast

* prep for py3.11

* fix check

* add missing cover

* more coverage

* coverage

* coverage
2023-07-02 21:53:50 -04:00
Mike Woudenberg
ab50069918 Quality improvement on LOQED integration (#95725)
Remove generated translation
Raise error correctly
Remove obsolete consts
Remove callback, hass assignment and info log
Use name from LOQED API instead of default name
Correct entity name for assertion
2023-07-02 21:52:52 -04:00
Joost Lekkerkerker
33bc1f01a4 Add entity translations for lifx (#95727) 2023-07-02 21:42:02 -04:00
Joost Lekkerkerker
b2611b595e Use DeviceInfo object for Meater (#95733)
Use DeviceInfo object
2023-07-02 21:36:53 -04:00
Joost Lekkerkerker
259455b32d Add entity translations to melnor (#95734) 2023-07-02 21:36:27 -04:00
Joost Lekkerkerker
4a5a8cdc29 Add entity translations to minecraft server (#95737) 2023-07-02 21:34:58 -04:00
Joost Lekkerkerker
4ff158a105 Remove NAM translations handled by device class (#95740)
Remove translations handled by device class
2023-07-02 21:32:32 -04:00
tronikos
caaeb28cbb Add Opower integration for getting electricity/gas usage and cost for many utilities (#90489)
* Create Opower integration

* fix tests

* Update config_flow.py

* Update coordinator.py

* Update sensor.py

* Update sensor.py

* Update coordinator.py

* Bump opower==0.0.4

* Ignore errors for "recent" PGE accounts

* Add type for forecasts

* Bump opower to 0.0.5

* Bump opower to 0.0.6

* Bump opower to 0.0.7

* Update requirements_all.txt

* Update requirements_test_all.txt

* Update coordinator

Fix exception caused by https://github.com/home-assistant/core/pull/92095
{} is dict but the function expects a set so change it to set()

* Improve exceptions handling

* Bump opower==0.0.9

* Bump opower to 0.0.10

* Bump opower to 0.0.11

* fix issue when integration hasn't run for 30 days

use last stat time instead of now when fetching recent usage/cost

* Allow username to be changed in reauth

* Don't allow changing  username in reauth flow
2023-07-02 21:26:31 -04:00
Joost Lekkerkerker
1ead95f5ea Use device class naming for Nest (#95742) 2023-07-02 18:10:29 -07:00
J. Nick Koston
0ff3836083 Use a normal tuple for the EventBus jobs (#95731) 2023-07-02 16:35:57 -05:00
Aaron Bach
c1b8e4a3e5 Add mold risk sensor to Notion (#95643)
Add mold detection sensor to Notion
2023-07-02 12:13:18 -06:00
Joost Lekkerkerker
2807b6cabc Add entity translations to kaleidescape (#95625) 2023-07-02 19:35:05 +02:00
J. Nick Koston
2aff138b92 Small improvements to websocket api performance (#95693) 2023-07-02 12:33:25 -05:00
Joost Lekkerkerker
65f67669d2 Use device info object in LaCrosse View (#95687)
Use device info object
2023-07-02 19:27:29 +02:00
Joost Lekkerkerker
23a16666c0 Remove obsolete entity name from Lametric (#95688)
Remove obsolete name
2023-07-02 19:25:39 +02:00
J. Nick Koston
953bd60296 Bump zeroconf to 0.70.0 (#95714) 2023-07-02 12:23:41 -05:00
J. Nick Koston
99badceecc Bump python-kasa to 0.5.2 (#95716) 2023-07-02 12:09:20 -05:00
Denis Shulyaka
7026ea643e Add action attribute to generic hygrostat (#95675)
* add action attribute to generic hygrostat

* Simplified initialization
2023-07-02 17:51:11 +02:00
Jan Bouwhuis
b314e2b1a1 Fix songpal test_setup_failed test (#95712) 2023-07-02 16:32:43 +02:00
Paulus Schoutsen
86912d2409 Met Eireann: fix device info (#95683) 2023-07-02 10:31:30 -04:00
J. Nick Koston
f0cb03e631 Handle missing or incorrect device name and unique id for ESPHome during manual add (#95678)
* Handle incorrect or missing device name for ESPHome noise encryption

If we did not have the device name during setup we could never
get the key from the dashboard. The device will send us
its name if we try encryption which allows us to find the
right key from the dashboard.

This should help get users unstuck when they change the key
and cannot get the device back online after deleting and
trying to set it up again manually

* bump lib to get name

* tweak

* reduce number of connections

* less connections when we know we will fail

* coverage shows it works but it does not

* add more coverage

* fix test

* bump again
2023-07-02 10:29:45 -04:00
Maciej Bieniek
79a122e1e5 Fix Shelly button unique_id migration (#95707)
Fix button unique_id migration
2023-07-02 16:28:41 +03:00
Brandon Rothweiler
33cd44ddb7 Upgrade pymazda to 0.3.9 (#95655) 2023-07-02 16:28:18 +03:00
Paulus Schoutsen
e4f617e92e Update log message when referenced entity not found (#95577)
* Update log message when referenced entity not found

* Update homeassistant/helpers/service.py

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

* Update test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-02 00:04:03 +02:00
Aaron Bach
cac6dc0eae Fix implicit device name for SimpliSafe locks (#95681) 2023-07-01 18:53:47 +02:00
ollo69
8108a0f947 Add Bridge module to AsusWRT (#84152)
* Add Bridge module to AsusWRT

* Requested changes

* Requested changes

* Requested changes

* Add check on router attributes value
2023-07-01 13:55:28 +02:00
Matthias Alphart
c81b6255c2 Use async_on_remove for KNX entities removal (#95658)
* Use `async_on_remove` for KNX entities removal

* review
2023-07-01 07:16:45 -04:00
Marc Mueller
432bfffef9 Update ruff pre-commit repo (#95603) 2023-07-01 12:12:24 +02:00
Paulus Schoutsen
923677dae3 Tesla Wall Connector: use correct device info keys (#95647) 2023-07-01 06:06:46 -04:00
Paulus Schoutsen
62ac7973c2 VeSync: use correct device info keys (#95646) 2023-07-01 06:06:27 -04:00
Paulus Schoutsen
2191fb21fa Rainbird: use correct device info keys (#95645) 2023-07-01 06:06:01 -04:00
Paulus Schoutsen
c8d4225117 Met: use correct device info keys (#95644) 2023-07-01 06:05:28 -04:00
Richard Kroegel
591f1ee338 Add bmw connected drive region-specific scan interval (#95649)
Add region-specific scan interval

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-07-01 10:41:03 +02:00
Mick Vleeshouwer
8b159d0f47 Fix missing EntityDescription names in Overkiz (#95583)
* Fix labels

* Update homeassistant/components/overkiz/entity.py

* Check if description.name is string

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-30 23:59:01 -04:00
Paulus Schoutsen
3fbc026d5a Remove passing MAC as an identifier for Fritz (#95648) 2023-06-30 16:13:22 -04:00
puddly
8ddc7f2089 Fix ZHA startup issue with older Silicon Labs firmwares (#95642)
Bump ZHA dependencies
2023-06-30 15:07:20 -04:00
Dave Pearce
982a52b91d Add unique_id to Wirelesstag entities. (#95631)
* Add unique_id to Wirelesstag entities.

* Update homeassistant/components/wirelesstag/binary_sensor.py

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

* Update homeassistant/components/wirelesstag/sensor.py

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

* Update homeassistant/components/wirelesstag/switch.py

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

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-30 15:04:23 -04:00
dougiteixeira
c6210b68bd Fix device source for Riemann sum integral (#95622)
Fix Device Source
2023-06-30 14:49:00 -04:00
dougiteixeira
c472ead4fd Fix device source for Threshold (#95623)
Fix Device Source
2023-06-30 14:48:36 -04:00
dougiteixeira
0431e031ba Fix device source for Utility Meter select (#95624)
Fix Device Source
2023-06-30 14:48:11 -04:00
dougiteixeira
11146ff40b Fix device source for Derivative (#95621)
Fix Device Source
2023-06-30 14:29:44 -04:00
Michael Hansen
6b8ae0ec86 Ensure trigger sentences do not contain punctuation (#95633)
* Ensure trigger sentences do not contain punctuation

* Update homeassistant/components/conversation/trigger.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-30 13:06:26 -05:00
Bram Kragten
958359260e Update frontend to 20230630.0 (#95635) 2023-06-30 13:55:03 -04:00
Paulus Schoutsen
9280dc69ae Default device name to config entry title (#95547)
* Default device name to config entry title

* Only apply name default if device info provided

* Fix logic detecting type of device info
2023-06-30 13:54:20 -04:00
Brett Adams
d4e40ed73f Fix Diagnostics in Advantage Air (#95608)
* Fix diag paths

* Fix key sand add redactions

* Name things better.

* Add super basic test

* Rename docstring

* Add snapshot

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-30 13:52:52 -04:00
J. Nick Koston
376c61c34b Bump aioesphomeapi to 15.0.1 (#95629)
fixes #87223 (the cases were the host gets too far behind,
not the cases were the esp8266 runs out of ram but thats
is not a core issue)
2023-06-30 11:37:04 -04:00
Joost Lekkerkerker
9cf691abdb Fix explicit device naming for integrations m-r (#95620)
Fix explicit device naming for m-r
2023-06-30 11:34:35 -04:00
Joost Lekkerkerker
7eb26cb9c9 Fix explicit device naming for integrations a-j (#95619)
Fix explicit device naming for a-j
2023-06-30 11:33:50 -04:00
J. Nick Koston
beac3c713b Handle DNSError during radio browser setup (#95597)
```
2023-06-29 08:11:06.034 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Radio Browser for radio_browser
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 390, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/radio_browser/__init__.py", line 25, in async_setup_entry
    await radios.stats()
  File "/usr/local/lib/python3.11/site-packages/radios/radio_browser.py", line 124, in stats
    response = await self._request("stats")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/radios/radio_browser.py", line 73, in _request
    result = await resolver.query("_api._tcp.radio-browser.info", "SRV")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiodns.error.DNSError: (12, 'Timeout while contacting DNS servers')
```
2023-06-30 11:21:10 -04:00
Marius
0f1f3bce87 Update services.yaml (#95630)
take out 'templates accepted'
2023-06-30 11:20:20 -04:00
Aaron Bach
39e0662fc8 Add ability to configure map icons for PurpleAir (#86124) 2023-06-30 08:35:19 -06:00
Marc Mueller
522d2496df Update typing-extensions to 4.7.0 (#95539) 2023-06-30 15:00:15 +02:00
Dr. Drinovac
8510d3ad69 Use explicit naming in Sensibo climate entity (#95591)
* Use explicit naming in Sensibo climate entity

* Fix black

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-06-30 14:48:20 +02:00
Joost Lekkerkerker
4ac92d755e Add config flow for zodiac (#95447)
* Add config flow for zodiac

* Add config flow for zodiac

* Fix feedback
2023-06-30 12:58:07 +02:00
Álvaro Fernández Rojas
abf6e0e44d Refactor Airzone Cloud _attr_has_entity_name in sensor (#95609)
airzone_cloud: sensor: refactor _attr_has_entity_name

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-30 11:39:10 +02:00
Brett Adams
78de5f8e3e Explicity use device name in Advantage Air (#95611)
Explicity use device name
2023-06-30 11:37:57 +02:00
tronikos
17ceacd083 Google Assistant SDK: Always enable conversation agent and support multiple languages (#93201)
* Enable agent and support multiple languages

* fix test
2023-06-29 23:00:17 -04:00
tronikos
1dcaec4ece Bump google-generativeai to 0.1.0 (#95515) 2023-06-29 22:55:51 -04:00
Paulus Schoutsen
e77f419142 Wiz set name explicitely to None (#95593) 2023-06-29 22:20:53 -04:00
puddly
b44e15415f Fix ZHA multi-PAN startup issue (#95595)
Bump ZHA dependencies
2023-06-29 22:20:33 -04:00
dougiteixeira
f2f0c38fae Fix device source for Utility Meter (#95585)
* Fix Device Source

* Remove debug
2023-06-29 21:52:48 -04:00
J. Nick Koston
734614bdda Fix device_id not set in esphome (#95580) 2023-06-29 18:04:13 -05:00
J. Nick Koston
93b4e6404b Bump bluetooth-data-tools to 1.3.0 (#95576) 2023-06-29 18:03:59 -05:00
RenierM26
449109abd5 Ezviz IR string align with depreciation. (#95563) 2023-06-29 14:20:14 -04:00
Paulus Schoutsen
decb1a3118 Fix entity name for iBeacon and Roku (#95574)
* Fix entity nmae for iBeacon and Roku

* Roku remote too
2023-06-29 13:43:13 -04:00
Allen Porter
7252c33df8 Limit fields returned for the list events service (#95506)
* Limit fields returned for the list events service

* Update websocket tests and fix bugs in response fields

* Omit 'None' fields in the list events response
2023-06-29 13:25:25 -04:00
Bram Kragten
63218adb65 Update frontend to 20230629.0 (#95570) 2023-06-29 13:18:24 -04:00
Luke
3474f46b09 Bump Roborock to 0.29.2 (#95549)
* init work

* fix tests
2023-06-29 13:13:37 -04:00
Paulus Schoutsen
9cace8e4bd Fix some entity naming (#95562) 2023-06-29 13:11:17 -04:00
Artem Draft
33be262ad7 Fix Android TV Remote entity naming (#95568)
Return None as Android TV Remote entity name
2023-06-29 18:53:50 +02:00
Raman Gupta
1f840db333 Fix binary sensor device trigger for lock class (#95505) 2023-06-29 12:29:27 -04:00
Franck Nijhof
23e23ae80e Mark text input required for conversation.process service (#95520) 2023-06-29 17:39:08 +02:00
Joost Lekkerkerker
45bbbeee19 Use explicit naming in workday sensor (#95531) 2023-06-29 11:36:39 -04:00
J. Nick Koston
e3e1bef376 Fix manual specification of multiple advertise_ip with HomeKit (#95548)
fixes #95508
2023-06-29 11:35:32 -04:00
Joost Lekkerkerker
8e00bd4436 Philips.js explicit device naming (#95551) 2023-06-29 16:40:35 +02:00
Marcel van der Veldt
e9d8fff0dd Bump Matter Server to 3.6.3 (#95519) 2023-06-29 15:28:34 +02:00
Joost Lekkerkerker
9d7007df63 Use explicit naming in Nest (#95532) 2023-06-29 14:49:46 +02:00
Franck Nijhof
a3ffa0aed7 Revert "Remove Brottsplatskartan YAML configuration (#94101)" (#95521) 2023-06-29 12:03:42 +02:00
Joost Lekkerkerker
369de1cad3 Add explicit device name to Broadlink (#95516) 2023-06-29 12:03:25 +02:00
Joost Lekkerkerker
5d1c1b35d3 Add explicit device name to Roborock (#95513) 2023-06-29 12:02:09 +02:00
Franck Nijhof
a6cfef3029 Revert "Remove qbittorrent YAML configuration (#93548)" (#95522) 2023-06-29 12:01:26 +02:00
Franck Nijhof
06d47185fe Revert "Remove snapcast YAML configuration (#93547)" (#95523) 2023-06-29 12:00:41 +02:00
Franck Nijhof
34ac541493 Revert "Remove Workday YAML configuration (#94102)" (#95524) 2023-06-29 12:00:13 +02:00
Franck Nijhof
ed16fffa79 Bump breaking version for YAML features ADR-0021 (#95525) 2023-06-29 11:59:36 +02:00
Evan Jarrett
2205f62cc1 Update matter locks to support pin code validation (#95481)
Update matter locks to support PINCode validation based on device attributes
2023-06-29 11:29:54 +02:00
Joost Lekkerkerker
9fb3d4de30 Add explicit device name to Switchbot (#95512) 2023-06-29 11:25:39 +02:00
Joost Lekkerkerker
e6c4f98354 Add explicit device name to Tuya (#95511)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-29 11:24:59 +02:00
Joost Lekkerkerker
3c7912f7a4 Add explicit device name to Spotify (#95509) 2023-06-29 11:09:45 +02:00
Joost Lekkerkerker
48049d588c Add entity translations to iOS (#95467) 2023-06-28 22:22:55 -04:00
Joost Lekkerkerker
b0c0b58340 Remove statement in iss config flow (#95472)
Remove conf name
2023-06-28 22:21:50 -04:00
Brandon Rothweiler
c93c3bbdcd Remove incompatible button entities for Mazda electric vehicles (#95486)
* Remove incompatible button entities for Mazda electric vehicles

* Update tests
2023-06-28 21:46:08 -04:00
Matthias Alphart
1615f3e1fd Add reload service to KNX (#95489) 2023-06-28 21:45:17 -04:00
Joost Lekkerkerker
b86b41ebe5 Fix YouTube coordinator bug (#95492)
Fix coordinator bug
2023-06-28 21:43:42 -04:00
Michael Hansen
33c7cdcdb3 Disconnect VoIP on RTCP bye message (#95452)
* Support RTCP BYE message

* Make RtcpState optional
2023-06-28 21:41:11 -04:00
J. Nick Koston
54255331d5 Small cleanups to bluetooth manager advertisement processing (#95453)
Avoid a few lookups that are rarely used now
2023-06-28 21:40:03 -04:00
J. Nick Koston
dfe7c5ebed Refactor ESPHome connection management logic into a class (#95457)
* Refactor ESPHome setup logic into a class

Avoids all the nonlocals and fixes the C901

* cleanup

* touch ups

* touch ups

* touch ups

* make easier to read

* stale
2023-06-28 21:39:31 -04:00
Bram Kragten
a7dfe46fb1 Add conversation agent selector, use in conversation.process service (#95462) 2023-06-28 21:38:06 -04:00
Joost Lekkerkerker
1a6c32f8e9 Update featured integrations screenshot (#95473) 2023-06-28 21:36:46 -04:00
puddly
392e2af2b7 Bump ZHA dependencies (#95478)
* Bump ZHA dependencies

* Account for new EZSP metadata keys
2023-06-28 18:35:05 -04:00
Michael Hansen
487dd3f956 Add targeted entities to sentence debug API (#95480)
* Return targets with debug sentence API

* Update test

* Update homeassistant/components/conversation/__init__.py

* Include area/domain in test sentences

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-28 18:34:43 -04:00
Marcel van der Veldt
0b81550092 Fix Matter entity names (#95477) 2023-06-28 23:40:12 +02:00
Franck Nijhof
ec7beee4c1 Bump version to 2023.8.0dev0 (#95476) 2023-06-28 16:07:54 -04:00
Barry Williams
aaf2846a53 Add Update Entity for Linn devices (#95217)
* added update entity for Linn devices

* Update homeassistant/components/openhome/update.py

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

* use parent methods for version attributes

* fixed issue with mocking openhome device

* Update homeassistant/components/openhome/update.py

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

* update entity name in tests

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-28 16:06:24 -04:00
2368 changed files with 54930 additions and 21398 deletions

View File

@@ -24,6 +24,7 @@ base_platforms: &base_platforms
- homeassistant/components/datetime/**
- homeassistant/components/device_tracker/**
- homeassistant/components/diagnostics/**
- homeassistant/components/event/**
- homeassistant/components/fan/**
- homeassistant/components/geo_location/**
- homeassistant/components/humidifier/**

View File

@@ -82,6 +82,7 @@ omit =
homeassistant/components/arwn/sensor.py
homeassistant/components/aseko_pool_live/__init__.py
homeassistant/components/aseko_pool_live/binary_sensor.py
homeassistant/components/aseko_pool_live/coordinator.py
homeassistant/components/aseko_pool_live/entity.py
homeassistant/components/aseko_pool_live/sensor.py
homeassistant/components/asterisk_cdr/mailbox.py
@@ -229,6 +230,10 @@ omit =
homeassistant/components/dublin_bus_transport/sensor.py
homeassistant/components/dunehd/__init__.py
homeassistant/components/dunehd/media_player.py
homeassistant/components/duotecno/__init__.py
homeassistant/components/duotecno/entity.py
homeassistant/components/duotecno/switch.py
homeassistant/components/duotecno/cover.py
homeassistant/components/dwd_weather_warnings/const.py
homeassistant/components/dwd_weather_warnings/coordinator.py
homeassistant/components/dwd_weather_warnings/sensor.py
@@ -260,6 +265,11 @@ omit =
homeassistant/components/eight_sleep/__init__.py
homeassistant/components/eight_sleep/binary_sensor.py
homeassistant/components/eight_sleep/sensor.py
homeassistant/components/electric_kiwi/__init__.py
homeassistant/components/electric_kiwi/api.py
homeassistant/components/electric_kiwi/oauth2.py
homeassistant/components/electric_kiwi/sensor.py
homeassistant/components/electric_kiwi/coordinator.py
homeassistant/components/eliqonline/sensor.py
homeassistant/components/elkm1/__init__.py
homeassistant/components/elkm1/alarm_control_panel.py
@@ -304,11 +314,8 @@ omit =
homeassistant/components/escea/__init__.py
homeassistant/components/escea/climate.py
homeassistant/components/escea/discovery.py
homeassistant/components/esphome/__init__.py
homeassistant/components/esphome/bluetooth/*
homeassistant/components/esphome/camera.py
homeassistant/components/esphome/domain_data.py
homeassistant/components/esphome/entry_data.py
homeassistant/components/esphome/manager.py
homeassistant/components/etherscan/sensor.py
homeassistant/components/eufy/*
homeassistant/components/eufylife_ble/__init__.py
@@ -316,12 +323,16 @@ omit =
homeassistant/components/everlights/light.py
homeassistant/components/evohome/*
homeassistant/components/ezviz/__init__.py
homeassistant/components/ezviz/alarm_control_panel.py
homeassistant/components/ezviz/binary_sensor.py
homeassistant/components/ezviz/button.py
homeassistant/components/ezviz/camera.py
homeassistant/components/ezviz/image.py
homeassistant/components/ezviz/light.py
homeassistant/components/ezviz/coordinator.py
homeassistant/components/ezviz/number.py
homeassistant/components/ezviz/entity.py
homeassistant/components/ezviz/select.py
homeassistant/components/ezviz/sensor.py
homeassistant/components/ezviz/switch.py
homeassistant/components/ezviz/update.py
@@ -594,6 +605,7 @@ omit =
homeassistant/components/keymitt_ble/entity.py
homeassistant/components/keymitt_ble/switch.py
homeassistant/components/keymitt_ble/coordinator.py
homeassistant/components/kitchen_sink/weather.py
homeassistant/components/kiwi/lock.py
homeassistant/components/kodi/__init__.py
homeassistant/components/kodi/browse_media.py
@@ -651,6 +663,7 @@ omit =
homeassistant/components/lookin/light.py
homeassistant/components/lookin/media_player.py
homeassistant/components/lookin/sensor.py
homeassistant/components/loqed/sensor.py
homeassistant/components/luci/device_tracker.py
homeassistant/components/luftdaten/sensor.py
homeassistant/components/lupusec/*
@@ -698,13 +711,14 @@ omit =
homeassistant/components/metoffice/sensor.py
homeassistant/components/metoffice/weather.py
homeassistant/components/microsoft/tts.py
homeassistant/components/miflora/sensor.py
homeassistant/components/mikrotik/hub.py
homeassistant/components/mill/climate.py
homeassistant/components/mill/sensor.py
homeassistant/components/minecraft_server/__init__.py
homeassistant/components/minecraft_server/binary_sensor.py
homeassistant/components/minecraft_server/entity.py
homeassistant/components/minecraft_server/sensor.py
homeassistant/components/minio/minio_helper.py
homeassistant/components/mitemp_bt/sensor.py
homeassistant/components/mjpeg/camera.py
homeassistant/components/mjpeg/util.py
homeassistant/components/mochad/__init__.py
@@ -755,7 +769,6 @@ omit =
homeassistant/components/neato/switch.py
homeassistant/components/neato/vacuum.py
homeassistant/components/nederlandse_spoorwegen/sensor.py
homeassistant/components/nest/legacy/*
homeassistant/components/netdata/sensor.py
homeassistant/components/netgear/__init__.py
homeassistant/components/netgear/button.py
@@ -858,6 +871,9 @@ omit =
homeassistant/components/openweathermap/sensor.py
homeassistant/components/openweathermap/weather_update_coordinator.py
homeassistant/components/opnsense/__init__.py
homeassistant/components/opower/__init__.py
homeassistant/components/opower/coordinator.py
homeassistant/components/opower/sensor.py
homeassistant/components/opnsense/device_tracker.py
homeassistant/components/opple/light.py
homeassistant/components/oru/*
@@ -989,6 +1005,7 @@ omit =
homeassistant/components/reolink/light.py
homeassistant/components/reolink/number.py
homeassistant/components/reolink/select.py
homeassistant/components/reolink/sensor.py
homeassistant/components/reolink/siren.py
homeassistant/components/reolink/switch.py
homeassistant/components/reolink/update.py
@@ -1314,6 +1331,7 @@ omit =
homeassistant/components/tradfri/sensor.py
homeassistant/components/tradfri/switch.py
homeassistant/components/trafikverket_train/__init__.py
homeassistant/components/trafikverket_train/coordinator.py
homeassistant/components/trafikverket_train/sensor.py
homeassistant/components/trafikverket_weatherstation/__init__.py
homeassistant/components/trafikverket_weatherstation/coordinator.py

View File

@@ -7,42 +7,46 @@
"containerEnv": { "DEVCONTAINER": "1" },
"appPort": ["8123:8123"],
"runArgs": ["-e", "GIT_EDITOR=code --wait"],
"extensions": [
"ms-python.vscode-pylance",
"visualstudioexptteam.vscodeintellicode",
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"GitHub.vscode-pull-request-github"
],
// Please keep this file in sync with settings in home-assistant/.vscode/settings.default.json
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.blackPath": "/usr/local/bin/black",
"python.linting.pycodestylePath": "/usr/local/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/bin/pydocstyle",
"python.linting.mypyPath": "/usr/local/bin/mypy",
"python.linting.pylintPath": "/usr/local/bin/pylint",
"python.formatting.provider": "black",
"python.testing.pytestArgs": ["--no-cov"],
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
"customizations": {
"vscode": {
"extensions": [
"ms-python.vscode-pylance",
"visualstudioexptteam.vscodeintellicode",
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"GitHub.vscode-pull-request-github"
],
// Please keep this file in sync with settings in home-assistant/.vscode/settings.default.json
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.blackPath": "/usr/local/bin/black",
"python.linting.pycodestylePath": "/usr/local/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/bin/pydocstyle",
"python.linting.mypyPath": "/usr/local/bin/mypy",
"python.linting.pylintPath": "/usr/local/bin/pylint",
"python.formatting.provider": "black",
"python.testing.pytestArgs": ["--no-cov"],
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh",
"yaml.customTags": [
"!input scalar",
"!secret scalar",
"!include_dir_named scalar",
"!include_dir_list scalar",
"!include_dir_merge_list scalar",
"!include_dir_merge_named scalar"
]
}
},
"terminal.integrated.defaultProfile.linux": "zsh",
"yaml.customTags": [
"!input scalar",
"!secret scalar",
"!include_dir_named scalar",
"!include_dir_list scalar",
"!include_dir_merge_list scalar",
"!include_dir_merge_named scalar"
]
}
}
}

View File

@@ -59,15 +59,15 @@ body:
attributes:
label: Integration causing the issue
description: >
The name of the integration. For example: Automation, Philips Hue
The name of the integration, for example Automation or Philips Hue.
- type: input
id: integration_link
attributes:
label: Link to integration documentation on our website
placeholder: "https://www.home-assistant.io/integrations/..."
description: |
Providing a link [to the documentation][docs] helps us categorize the
issue, while also providing a useful reference for others.
Providing a link [to the documentation][docs] helps us categorize the issue and might speed up the
investigation by automatically informing a contributor, while also providing a useful reference for others.
[docs]: https://www.home-assistant.io/integrations

View File

@@ -29,7 +29,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -59,7 +59,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -124,7 +124,7 @@ jobs:
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
if: needs.init.outputs.channel == 'dev'
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}

View File

@@ -32,9 +32,9 @@ env:
CACHE_VERSION: 5
PIP_CACHE_VERSION: 4
MYPY_CACHE_VERSION: 4
HA_SHORT_VERSION: 2023.7
DEFAULT_PYTHON: "3.10"
ALL_PYTHON_VERSIONS: "['3.10', '3.11']"
HA_SHORT_VERSION: 2023.8
DEFAULT_PYTHON: "3.11"
ALL_PYTHON_VERSIONS: "['3.11']"
# 10.3 is the oldest supported version
# - 10.3.32 is the version currently shipped with Synology (as of 17 Feb 2022)
# 10.6 is the current long-term-support
@@ -209,7 +209,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -253,7 +253,7 @@ jobs:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -299,7 +299,7 @@ jobs:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -348,7 +348,7 @@ jobs:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -443,7 +443,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -492,9 +492,9 @@ jobs:
python -m venv venv
. venv/bin/activate
python --version
pip install --cache-dir=$PIP_CACHE -U "pip>=21.3.1,<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_CACHE_DIR=$PIP_CACHE pip install -U "pip>=21.3.1" setuptools wheel
PIP_CACHE_DIR=$PIP_CACHE pip install -r requirements_all.txt
PIP_CACHE_DIR=$PIP_CACHE pip install -r requirements_test.txt
pip install -e . --config-settings editable_mode=compat
hassfest:
@@ -511,7 +511,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -543,7 +543,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -576,7 +576,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -620,7 +620,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -702,7 +702,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -827,7 +827,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -934,7 +934,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -1019,6 +1019,7 @@ jobs:
with: |
fail_ci_if_error: true
flags: full-suite
token: ${{ env.CODECOV_TOKEN }}
attempt_limit: 5
attempt_delay: 30000
- name: Upload coverage to Codecov (partial coverage)
@@ -1028,5 +1029,6 @@ jobs:
action: codecov/codecov-action@v3.1.3
with: |
fail_ci_if_error: true
token: ${{ env.CODECOV_TOKEN }}
attempt_limit: 5
attempt_delay: 30000

View File

@@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}

View File

@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.280
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
args:
@@ -17,8 +17,8 @@ repos:
hooks:
- id: codespell
args:
- --ignore-words-list=additionals,alle,alot,ba,bre,bund,currenty,datas,dof,dur,ether,farenheit,falsy,fo,haa,hass,hist,iam,iff,iif,incomfort,ines,ist,lightsensor,mut,nam,nd,pres,pullrequests,referer,resset,rime,ser,serie,sur,te,technik,ue,uint,unsecure,visability,wan,wanna,withing,zar
- --skip="./.*,*.csv,*.json"
- --ignore-words-list=additionals,alle,alot,bund,currenty,datas,farenheit,falsy,fo,haa,hass,iif,incomfort,ines,ist,nam,nd,pres,pullrequests,resset,rime,ser,serie,te,technik,ue,unsecure,withing,zar
- --skip="./.*,*.csv,*.json,*.ambr"
- --quiet-level=2
exclude_types: [csv, json]
exclude: ^tests/fixtures/|homeassistant/generated/
@@ -35,7 +35,7 @@ repos:
- --branch=master
- --branch=rc
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.28.0
rev: v1.32.0
hooks:
- id: yamllint
- repo: https://github.com/pre-commit/mirrors-prettier

View File

@@ -108,11 +108,13 @@ homeassistant.components.dsmr.*
homeassistant.components.dunehd.*
homeassistant.components.efergy.*
homeassistant.components.electrasmart.*
homeassistant.components.electric_kiwi.*
homeassistant.components.elgato.*
homeassistant.components.elkm1.*
homeassistant.components.emulated_hue.*
homeassistant.components.energy.*
homeassistant.components.esphome.*
homeassistant.components.event.*
homeassistant.components.evil_genius_labs.*
homeassistant.components.fan.*
homeassistant.components.fastdotcom.*

View File

@@ -195,8 +195,8 @@ build.json @home-assistant/supervisor
/tests/components/camera/ @home-assistant/core
/homeassistant/components/cast/ @emontnemery
/tests/components/cast/ @emontnemery
/homeassistant/components/cert_expiry/ @Cereal2nd @jjlawren
/tests/components/cert_expiry/ @Cereal2nd @jjlawren
/homeassistant/components/cert_expiry/ @jjlawren
/tests/components/cert_expiry/ @jjlawren
/homeassistant/components/circuit/ @braam
/homeassistant/components/cisco_ios/ @fbradyirl
/homeassistant/components/cisco_mobility_express/ @fbradyirl
@@ -277,8 +277,6 @@ build.json @home-assistant/supervisor
/tests/components/discord/ @tkdrob
/homeassistant/components/discovergy/ @jpbede
/tests/components/discovergy/ @jpbede
/homeassistant/components/discovery/ @home-assistant/core
/tests/components/discovery/ @home-assistant/core
/homeassistant/components/dlink/ @tkdrob
/tests/components/dlink/ @tkdrob
/homeassistant/components/dlna_dmr/ @StevenLooman @chishm
@@ -299,6 +297,8 @@ build.json @home-assistant/supervisor
/tests/components/dsmr_reader/ @depl0y @glodenox
/homeassistant/components/dunehd/ @bieniu
/tests/components/dunehd/ @bieniu
/homeassistant/components/duotecno/ @cereal2nd
/tests/components/duotecno/ @cereal2nd
/homeassistant/components/dwd_weather_warnings/ @runningman84 @stephan192 @Hummel95 @andarotajo
/tests/components/dwd_weather_warnings/ @runningman84 @stephan192 @Hummel95 @andarotajo
/homeassistant/components/dynalite/ @ziv1234
@@ -321,6 +321,8 @@ build.json @home-assistant/supervisor
/tests/components/eight_sleep/ @mezz64 @raman325
/homeassistant/components/electrasmart/ @jafar-atili
/tests/components/electrasmart/ @jafar-atili
/homeassistant/components/electric_kiwi/ @mikey0000
/tests/components/electric_kiwi/ @mikey0000
/homeassistant/components/elgato/ @frenck
/tests/components/elgato/ @frenck
/homeassistant/components/elkm1/ @gwww @bdraco
@@ -360,6 +362,8 @@ build.json @home-assistant/supervisor
/tests/components/esphome/ @OttoWinter @jesserockz @bdraco
/homeassistant/components/eufylife_ble/ @bdr99
/tests/components/eufylife_ble/ @bdr99
/homeassistant/components/event/ @home-assistant/core
/tests/components/event/ @home-assistant/core
/homeassistant/components/evil_genius_labs/ @balloob
/tests/components/evil_genius_labs/ @balloob
/homeassistant/components/evohome/ @zxdavb
@@ -425,6 +429,8 @@ build.json @home-assistant/supervisor
/tests/components/fully_kiosk/ @cgarwood
/homeassistant/components/garages_amsterdam/ @klaasnicolaas
/tests/components/garages_amsterdam/ @klaasnicolaas
/homeassistant/components/gardena_bluetooth/ @elupus
/tests/components/gardena_bluetooth/ @elupus
/homeassistant/components/gdacs/ @exxamalte
/tests/components/gdacs/ @exxamalte
/homeassistant/components/generic/ @davet2001
@@ -745,7 +751,6 @@ build.json @home-assistant/supervisor
/tests/components/meteoclimatic/ @adrianmo
/homeassistant/components/metoffice/ @MrHarcombe @avee87
/tests/components/metoffice/ @MrHarcombe @avee87
/homeassistant/components/miflora/ @danielhiversen @basnijholt
/homeassistant/components/mikrotik/ @engrbm87
/tests/components/mikrotik/ @engrbm87
/homeassistant/components/mill/ @danielhiversen
@@ -889,6 +894,7 @@ build.json @home-assistant/supervisor
/homeassistant/components/openhome/ @bazwilliams
/tests/components/openhome/ @bazwilliams
/homeassistant/components/opensky/ @joostlek
/tests/components/opensky/ @joostlek
/homeassistant/components/opentherm_gw/ @mvn23
/tests/components/opentherm_gw/ @mvn23
/homeassistant/components/openuv/ @bachya
@@ -897,6 +903,8 @@ build.json @home-assistant/supervisor
/tests/components/openweathermap/ @fabaff @freekode @nzapponi
/homeassistant/components/opnsense/ @mtreinish
/tests/components/opnsense/ @mtreinish
/homeassistant/components/opower/ @tronikos
/tests/components/opower/ @tronikos
/homeassistant/components/oralb/ @bdraco @Lash-L
/tests/components/oralb/ @bdraco @Lash-L
/homeassistant/components/oru/ @bvlaicu
@@ -914,6 +922,8 @@ build.json @home-assistant/supervisor
/tests/components/panel_iframe/ @home-assistant/frontend
/homeassistant/components/peco/ @IceBotYT
/tests/components/peco/ @IceBotYT
/homeassistant/components/pegel_online/ @mib1185
/tests/components/pegel_online/ @mib1185
/homeassistant/components/persistent_notification/ @home-assistant/core
/tests/components/persistent_notification/ @home-assistant/core
/homeassistant/components/philips_js/ @elupus
@@ -1000,8 +1010,8 @@ build.json @home-assistant/supervisor
/tests/components/rapt_ble/ @sairon
/homeassistant/components/raspberry_pi/ @home-assistant/core
/tests/components/raspberry_pi/ @home-assistant/core
/homeassistant/components/rdw/ @frenck
/tests/components/rdw/ @frenck
/homeassistant/components/rdw/ @frenck @joostlek
/tests/components/rdw/ @frenck @joostlek
/homeassistant/components/recollect_waste/ @bachya
/tests/components/recollect_waste/ @bachya
/homeassistant/components/recorder/ @home-assistant/core

View File

@@ -1,10 +1,10 @@
image: ghcr.io/home-assistant/{arch}-homeassistant
build_from:
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2023.06.1
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2023.06.1
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2023.06.1
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2023.06.1
i386: ghcr.io/home-assistant/i386-homeassistant-base:2023.06.1
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2023.07.0
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2023.07.0
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2023.07.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2023.07.0
i386: ghcr.io/home-assistant/i386-homeassistant-base:2023.07.0
codenotary:
signer: notary@home-assistant.io
base_image: notary@home-assistant.io

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 174 KiB

View File

@@ -1,32 +1,15 @@
"""Enum backports from standard lib."""
"""Enum backports from standard lib.
This file contained the backport of the StrEnum of Python 3.11.
Since we have dropped support for Python 3.10, we can remove this backport.
This file is kept for now to avoid breaking custom components that might
import it.
"""
from __future__ import annotations
from enum import Enum
from typing import Any
from enum import StrEnum
from typing_extensions import Self
class StrEnum(str, Enum):
"""Partial backport of Python 3.11's StrEnum for our basic use cases."""
def __new__(cls, value: str, *args: Any, **kwargs: Any) -> Self:
"""Create a new StrEnum instance."""
if not isinstance(value, str):
raise TypeError(f"{value!r} is not a string")
return super().__new__(cls, value, *args, **kwargs)
def __str__(self) -> str:
"""Return self.value."""
return str(self.value)
@staticmethod
def _generate_next_value_(
name: str, start: int, count: int, last_values: list[Any]
) -> Any:
"""Make `auto()` explicitly unsupported.
We may revisit this when it's very clear that Python 3.11's
`StrEnum.auto()` behavior will no longer change.
"""
raise TypeError("auto() is not supported by this implementation")
__all__ = [
"StrEnum",
]

View File

@@ -3,27 +3,24 @@ from __future__ import annotations
from collections.abc import Callable
from types import GenericAlias
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Self
from typing import Any, Generic, Self, TypeVar, overload
_T = TypeVar("_T")
_R = TypeVar("_R")
class cached_property(Generic[_T, _R]): # pylint: disable=invalid-name
class cached_property(Generic[_T]): # pylint: disable=invalid-name
"""Backport of Python 3.12's cached_property.
Includes https://github.com/python/cpython/pull/101890/files
"""
def __init__(self, func: Callable[[_T], _R]) -> None:
def __init__(self, func: Callable[[Any], _T]) -> None:
"""Initialize."""
self.func = func
self.attrname: Any = None
self.func: Callable[[Any], _T] = func
self.attrname: str | None = None
self.__doc__ = func.__doc__
def __set_name__(self, owner: type[_T], name: str) -> None:
def __set_name__(self, owner: type[Any], name: str) -> None:
"""Set name."""
if self.attrname is None:
self.attrname = name
@@ -34,14 +31,16 @@ class cached_property(Generic[_T, _R]): # pylint: disable=invalid-name
)
@overload
def __get__(self, instance: None, owner: type[_T]) -> Self:
def __get__(self, instance: None, owner: type[Any] | None = None) -> Self:
...
@overload
def __get__(self, instance: _T, owner: type[_T]) -> _R:
def __get__(self, instance: Any, owner: type[Any] | None = None) -> _T:
...
def __get__(self, instance: _T | None, owner: type[_T] | None = None) -> _R | Self:
def __get__(
self, instance: Any | None, owner: type[Any] | None = None
) -> _T | Self:
"""Get."""
if instance is None:
return self

View File

@@ -1,5 +1,5 @@
{
"domain": "u_tec",
"name": "U-tec",
"integrations": ["ultraloq"]
"iot_standards": ["zwave"]
}

View File

@@ -1,10 +1,6 @@
capture_image:
name: Capture image
description: Request a new image capture from a camera device.
fields:
entity_id:
name: Entity
description: Entity id of the camera to request an image.
required: true
selector:
entity:
@@ -12,31 +8,21 @@ capture_image:
domain: camera
change_setting:
name: Change setting
description: Change an Abode system setting.
fields:
setting:
name: Setting
description: Setting to change.
required: true
example: beeper_mute
selector:
text:
value:
name: Value
description: Value of the setting.
required: true
example: "1"
selector:
text:
trigger_automation:
name: Trigger automation
description: Trigger an Abode automation.
fields:
entity_id:
name: Entity
description: Entity id of the automation to trigger.
required: true
selector:
entity:

View File

@@ -15,7 +15,7 @@
}
},
"reauth_confirm": {
"title": "Fill in your Abode login information",
"title": "[%key:component::abode::config::step::user::title%]",
"data": {
"username": "[%key:common::config_flow::data::email%]",
"password": "[%key:common::config_flow::data::password%]"
@@ -31,5 +31,41 @@
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
}
},
"services": {
"capture_image": {
"name": "Capture image",
"description": "Request a new image capture from a camera device.",
"fields": {
"entity_id": {
"name": "Entity",
"description": "Entity id of the camera to request an image."
}
}
},
"change_setting": {
"name": "Change setting",
"description": "Change an Abode system setting.",
"fields": {
"setting": {
"name": "Setting",
"description": "Setting to change."
},
"value": {
"name": "Value",
"description": "Value of the setting."
}
}
},
"trigger_automation": {
"name": "Trigger automation",
"description": "Trigger an Abode automation.",
"fields": {
"entity_id": {
"name": "Entity",
"description": "Entity id of the automation to trigger."
}
}
}
}
}

View File

@@ -3,7 +3,7 @@
"name": "AccuWeather",
"codeowners": ["@bieniu"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/accuweather/",
"documentation": "https://www.home-assistant.io/integrations/accuweather",
"integration_type": "service",
"iot_class": "cloud_polling",
"loggers": ["accuweather"],

View File

@@ -25,7 +25,6 @@ from homeassistant.const import (
)
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 . import AccuWeatherDataUpdateCoordinator
@@ -50,7 +49,7 @@ PARALLEL_UPDATES = 1
class AccuWeatherSensorDescriptionMixin:
"""Mixin for AccuWeather sensor."""
value_fn: Callable[[dict[str, Any]], StateType]
value_fn: Callable[[dict[str, Any]], str | int | float | None]
@dataclass
@@ -59,7 +58,7 @@ class AccuWeatherSensorDescription(
):
"""Class describing AccuWeather sensor entities."""
attr_fn: Callable[[dict[str, Any]], dict[str, StateType]] = lambda _: {}
attr_fn: Callable[[dict[str, Any]], dict[str, Any]] = lambda _: {}
FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
@@ -428,7 +427,7 @@ class AccuWeatherSensor(
self.forecast_day = forecast_day
@property
def native_value(self) -> StateType:
def native_value(self) -> str | int | float | None:
"""Return the state."""
return self.entity_description.value_fn(self._sensor_data)

View File

@@ -14,6 +14,7 @@ from homeassistant.components.weather import (
ATTR_FORECAST_NATIVE_WIND_SPEED,
ATTR_FORECAST_PRECIPITATION_PROBABILITY,
ATTR_FORECAST_TIME,
ATTR_FORECAST_UV_INDEX,
ATTR_FORECAST_WIND_BEARING,
Forecast,
WeatherEntity,
@@ -147,6 +148,11 @@ class AccuWeatherEntity(
"""Return the visibility."""
return cast(float, self.coordinator.data["Visibility"][API_METRIC][ATTR_VALUE])
@property
def uv_index(self) -> float:
"""Return the UV index."""
return cast(float, self.coordinator.data["UVIndex"])
@property
def forecast(self) -> list[Forecast] | None:
"""Return the forecast array."""
@@ -172,6 +178,7 @@ class AccuWeatherEntity(
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED: item["WindGustDay"][ATTR_SPEED][
ATTR_VALUE
],
ATTR_FORECAST_UV_INDEX: item["UVIndex"][ATTR_VALUE],
ATTR_FORECAST_WIND_BEARING: item["WindDay"][ATTR_DIRECTION]["Degrees"],
ATTR_FORECAST_CONDITION: [
k for k, v in CONDITION_CLASSES.items() if item["IconDay"] in v

View File

@@ -2,7 +2,7 @@
from __future__ import annotations
import logging
import telnetlib
import telnetlib # pylint: disable=deprecated-module
from typing import Final
import voluptuous as vol

View File

@@ -1,65 +1,43 @@
add_url:
name: Add url
description: Add a new filter subscription to AdGuard Home.
fields:
name:
name: Name
description: The name of the filter subscription.
required: true
example: Example
selector:
text:
url:
name: Url
description: The filter URL to subscribe to, containing the filter rules.
required: true
example: https://www.example.com/filter/1.txt
selector:
text:
remove_url:
name: Remove url
description: Removes a filter subscription from AdGuard Home.
fields:
url:
name: Url
description: The filter subscription URL to remove.
required: true
example: https://www.example.com/filter/1.txt
selector:
text:
enable_url:
name: Enable url
description: Enables a filter subscription in AdGuard Home.
fields:
url:
name: Url
description: The filter subscription URL to enable.
required: true
example: https://www.example.com/filter/1.txt
selector:
text:
disable_url:
name: Disable url
description: Disables a filter subscription in AdGuard Home.
fields:
url:
name: Url
description: The filter subscription URL to disable.
required: true
example: https://www.example.com/filter/1.txt
selector:
text:
refresh:
name: Refresh
description: Refresh all filter subscriptions in AdGuard Home.
fields:
force:
name: Force
description: Force update (bypasses AdGuard Home throttling). "true" to force, or "false" to omit for a regular refresh.
default: false
selector:
boolean:

View File

@@ -72,5 +72,61 @@
"name": "Query log"
}
}
},
"services": {
"add_url": {
"name": "Add URL",
"description": "Add a new filter subscription to AdGuard Home.",
"fields": {
"name": {
"name": "[%key:common::config_flow::data::name%]",
"description": "The name of the filter subscription."
},
"url": {
"name": "[%key:common::config_flow::data::url%]",
"description": "The filter URL to subscribe to, containing the filter rules."
}
}
},
"remove_url": {
"name": "Remove URL",
"description": "Removes a filter subscription from AdGuard Home.",
"fields": {
"url": {
"name": "[%key:common::config_flow::data::url%]",
"description": "The filter subscription URL to remove."
}
}
},
"enable_url": {
"name": "Enable URL",
"description": "Enables a filter subscription in AdGuard Home.",
"fields": {
"url": {
"name": "[%key:common::config_flow::data::url%]",
"description": "The filter subscription URL to enable."
}
}
},
"disable_url": {
"name": "Disable URL",
"description": "Disables a filter subscription in AdGuard Home.",
"fields": {
"url": {
"name": "[%key:common::config_flow::data::url%]",
"description": "The filter subscription URL to disable."
}
}
},
"refresh": {
"name": "Refresh",
"description": "Refresh all filter subscriptions in AdGuard Home.",
"fields": {
"force": {
"name": "Force",
"description": "Force update (bypasses AdGuard Home throttling). \"true\" to force, or \"false\" to omit for a regular refresh."
}
}
}
}
}

View File

@@ -1,19 +1,13 @@
# Describes the format for available ADS services
write_data_by_name:
name: Write data by name
description: Write a value to the connected ADS device.
fields:
adsvar:
name: ADS variable
description: The name of the variable to write to.
required: true
example: ".global_var"
selector:
text:
adstype:
name: ADS type
description: The data type of the variable to write to.
required: true
selector:
select:
@@ -25,8 +19,6 @@ write_data_by_name:
- "udint"
- "uint"
value:
name: Value
description: The value to write to the variable.
required: true
selector:
number:

View File

@@ -0,0 +1,22 @@
{
"services": {
"write_data_by_name": {
"name": "Write data by name",
"description": "Write a value to the connected ADS device.",
"fields": {
"adsvar": {
"name": "ADS variable",
"description": "The name of the variable to write to."
},
"adstype": {
"name": "ADS type",
"description": "The data type of the variable to write to."
},
"value": {
"name": "Value",
"description": "The value to write to the variable."
}
}
}
}
}

View File

@@ -1,14 +1,10 @@
set_time_to:
name: Set Time To
description: Control timers to turn the system on or off after a set number of minutes
target:
entity:
integration: advantage_air
domain: sensor
fields:
minutes:
name: Minutes
description: Minutes until action
required: true
selector:
number:

View File

@@ -13,7 +13,19 @@
"port": "[%key:common::config_flow::data::port%]"
},
"description": "Connect to the API of your Advantage Air wall mounted tablet.",
"title": "Connect"
"title": "[%key:common::action::connect%]"
}
}
},
"services": {
"set_time_to": {
"name": "Set time to",
"description": "Controls timers to turn the system on or off after a set number of minutes.",
"fields": {
"minutes": {
"name": "Minutes",
"description": "Minutes until action."
}
}
}
}

View File

@@ -1,43 +1,29 @@
# Describes the format for available aftership services
add_tracking:
name: Add tracking
description: Add new tracking number to Aftership.
fields:
tracking_number:
name: Tracking number
description: Tracking number for the new tracking
required: true
example: "123456789"
selector:
text:
title:
name: Title
description: A custom title for the new tracking
example: "Laptop"
selector:
text:
slug:
name: Slug
description: Slug (carrier) of the new tracking
example: "USPS"
selector:
text:
remove_tracking:
name: Remove tracking
description: Remove a tracking number from Aftership.
fields:
tracking_number:
name: Tracking number
description: Tracking number of the tracking to remove
required: true
example: "123456789"
selector:
text:
slug:
name: Slug
description: Slug (carrier) of the tracking to remove
example: "USPS"
selector:
text:

View File

@@ -0,0 +1,36 @@
{
"services": {
"add_tracking": {
"name": "Add tracking",
"description": "Adds a new tracking number to Aftership.",
"fields": {
"tracking_number": {
"name": "Tracking number",
"description": "Tracking number for the new tracking."
},
"title": {
"name": "Title",
"description": "A custom title for the new tracking."
},
"slug": {
"name": "Slug",
"description": "Slug (carrier) of the new tracking."
}
}
},
"remove_tracking": {
"name": "Remove tracking",
"description": "Removes a tracking number from Aftership.",
"fields": {
"tracking_number": {
"name": "[%key:component::aftership::services::add_tracking::fields::tracking_number::name%]",
"description": "Tracking number of the tracking to remove."
},
"slug": {
"name": "[%key:component::aftership::services::add_tracking::fields::slug::name%]",
"description": "Slug (carrier) of the tracking to remove."
}
}
}
}
}

View File

@@ -47,14 +47,16 @@ class AgentBaseStation(AlarmControlPanelEntity):
| AlarmControlPanelEntityFeature.ARM_AWAY
| AlarmControlPanelEntityFeature.ARM_NIGHT
)
_attr_has_entity_name = True
_attr_name = None
def __init__(self, client):
"""Initialize the alarm control panel."""
self._client = client
self._attr_name = f"{client.name} {CONST_ALARM_CONTROL_PANEL_NAME}"
self._attr_unique_id = f"{client.unique}_CP"
self._attr_device_info = DeviceInfo(
identifiers={(AGENT_DOMAIN, client.unique)},
name=f"{client.name} {CONST_ALARM_CONTROL_PANEL_NAME}",
manufacturer="Agent",
model=CONST_ALARM_CONTROL_PANEL_NAME,
sw_version=client.version,

View File

@@ -72,12 +72,13 @@ class AgentCamera(MjpegCamera):
_attr_attribution = ATTRIBUTION
_attr_should_poll = True # Cameras default to False
_attr_supported_features = CameraEntityFeature.ON_OFF
_attr_has_entity_name = True
_attr_name = None
def __init__(self, device):
"""Initialize as a subclass of MjpegCamera."""
self.device = device
self._removed = False
self._attr_name = f"{device.client.name} {device.name}"
self._attr_unique_id = f"{device._client.unique}_{device.typeID}_{device.id}"
super().__init__(
name=device.name,
@@ -88,7 +89,7 @@ class AgentCamera(MjpegCamera):
identifiers={(AGENT_DOMAIN, self.unique_id)},
manufacturer="Agent",
model="Camera",
name=self.name,
name=f"{device.client.name} {device.name}",
sw_version=device.client.version,
)

View File

@@ -3,7 +3,7 @@
"name": "Agent DVR",
"codeowners": ["@ispysoftware"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/agent_dvr/",
"documentation": "https://www.home-assistant.io/integrations/agent_dvr",
"iot_class": "local_polling",
"loggers": ["agent"],
"requirements": ["agent-py==0.0.23"]

View File

@@ -1,38 +1,28 @@
start_recording:
name: Start recording
description: Enable continuous recording.
target:
entity:
integration: agent_dvr
domain: camera
stop_recording:
name: Stop recording
description: Disable continuous recording.
target:
entity:
integration: agent_dvr
domain: camera
enable_alerts:
name: Enable alerts
description: Enable alerts
target:
entity:
integration: agent_dvr
domain: camera
disable_alerts:
name: Disable alerts
description: Disable alerts
target:
entity:
integration: agent_dvr
domain: camera
snapshot:
name: Snapshot
description: Take a photo
target:
entity:
integration: agent_dvr

View File

@@ -16,5 +16,27 @@
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
}
},
"services": {
"start_recording": {
"name": "Start recording",
"description": "Enables continuous recording."
},
"stop_recording": {
"name": "Stop recording",
"description": "Disables continuous recording."
},
"enable_alerts": {
"name": "Enable alerts",
"description": "Enables alerts."
},
"disable_alerts": {
"name": "Disable alerts",
"description": "Disables alerts."
},
"snapshot": {
"name": "Snapshot",
"description": "Takes a photo."
}
}
}

View File

@@ -90,7 +90,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
str(longitude),
),
):
device_entry = device_registry.async_get_device({old_ids}) # type: ignore[arg-type]
device_entry = device_registry.async_get_device(identifiers={old_ids}) # type: ignore[arg-type]
if device_entry and entry.entry_id in device_entry.config_entries:
new_ids = (DOMAIN, f"{latitude}-{longitude}")
device_registry.async_update_device(

View File

@@ -17,7 +17,7 @@
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_location%]",
"wrong_location": "No Airly measuring stations in this area."
"wrong_location": "[%key:component::airly::config::error::wrong_location%]"
}
},
"system_health": {

View File

@@ -2,7 +2,7 @@
import logging
from pyairnow import WebServiceAPI
from pyairnow.errors import AirNowError, InvalidKeyError
from pyairnow.errors import AirNowError, EmptyResponseError, InvalidKeyError
import voluptuous as vol
from homeassistant import config_entries, core, exceptions
@@ -35,6 +35,8 @@ async def validate_input(hass: core.HomeAssistant, data):
raise InvalidAuth from exc
except AirNowError as exc:
raise CannotConnect from exc
except EmptyResponseError as exc:
raise InvalidLocation from exc
if not test_data:
raise InvalidLocation

View File

@@ -14,7 +14,7 @@
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"invalid_location": "No results found for that location",
"invalid_location": "No results found for that location, try changing the location or station radius.",
"unknown": "[%key:common::config_flow::error::unknown%]"
},
"abort": {

View File

@@ -3,7 +3,20 @@
"name": "Airthings BLE",
"bluetooth": [
{
"manufacturer_id": 820
"manufacturer_id": 820,
"service_uuid": "b42e1f6e-ade7-11e4-89d3-123b93f75cba"
},
{
"manufacturer_id": 820,
"service_uuid": "b42e4a8e-ade7-11e4-89d3-123b93f75cba"
},
{
"manufacturer_id": 820,
"service_uuid": "b42e1c08-ade7-11e4-89d3-123b93f75cba"
},
{
"manufacturer_id": 820,
"service_uuid": "b42e3882-ade7-11e4-89d3-123b93f75cba"
}
],
"codeowners": ["@vincegio"],

View File

@@ -84,6 +84,9 @@ async def async_setup_entry(
class AirtouchAC(CoordinatorEntity, ClimateEntity):
"""Representation of an AirTouch 4 ac."""
_attr_has_entity_name = True
_attr_name = None
_attr_supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
)
@@ -107,7 +110,7 @@ class AirtouchAC(CoordinatorEntity, ClimateEntity):
"""Return device info for this device."""
return DeviceInfo(
identifiers={(DOMAIN, self.unique_id)},
name=self.name,
name=f"AC {self._ac_number}",
manufacturer="Airtouch",
model="Airtouch 4",
)
@@ -122,11 +125,6 @@ class AirtouchAC(CoordinatorEntity, ClimateEntity):
"""Return the current temperature."""
return self._unit.Temperature
@property
def name(self):
"""Return the name of the climate device."""
return f"AC {self._ac_number}"
@property
def fan_mode(self):
"""Return fan mode of the AC this group belongs to."""
@@ -200,6 +198,8 @@ class AirtouchAC(CoordinatorEntity, ClimateEntity):
class AirtouchGroup(CoordinatorEntity, ClimateEntity):
"""Representation of an AirTouch 4 group."""
_attr_has_entity_name = True
_attr_name = None
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_hvac_modes = AT_GROUP_MODES
@@ -224,7 +224,7 @@ class AirtouchGroup(CoordinatorEntity, ClimateEntity):
identifiers={(DOMAIN, self.unique_id)},
manufacturer="Airtouch",
model="Airtouch 4",
name=self.name,
name=self._unit.GroupName,
)
@property
@@ -242,11 +242,6 @@ class AirtouchGroup(CoordinatorEntity, ClimateEntity):
"""Return Max Temperature for AC of this group."""
return self._airtouch.acs[self._unit.BelongsToAc].MaxSetpoint
@property
def name(self):
"""Return the name of the climate device."""
return self._unit.GroupName
@property
def current_temperature(self):
"""Return the current temperature."""

View File

@@ -11,7 +11,7 @@
}
},
"geography_by_name": {
"title": "Configure a Geography",
"title": "[%key:component::airvisual::config::step::geography_by_coords::title%]",
"description": "Use the AirVisual cloud API to monitor a city/state/country.",
"data": {
"api_key": "[%key:common::config_flow::data::api_key%]",
@@ -45,7 +45,7 @@
"options": {
"step": {
"init": {
"title": "Configure AirVisual",
"title": "[%key:component::airvisual::config::step::user::title%]",
"data": {
"show_on_map": "Show monitored geography on the map"
}

View File

@@ -60,6 +60,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Get data from the device."""
try:
data = await node.async_get_latest_measurements()
data["history"] = {}
if data["settings"].get("follow_mode") == "device":
history = await node.async_get_history(include_trends=False)
data["history"] = history.get("measurements", [])[-1]
except InvalidAuthenticationError as err:
raise ConfigEntryAuthFailed("Invalid Samba password") from err
except NodeConnectionError as err:

View File

@@ -30,7 +30,9 @@ from .const import DOMAIN
class AirVisualProMeasurementKeyMixin:
"""Define an entity description mixin to include a measurement key."""
value_fn: Callable[[dict[str, Any], dict[str, Any], dict[str, Any]], float | int]
value_fn: Callable[
[dict[str, Any], dict[str, Any], dict[str, Any], dict[str, Any]], float | int
]
@dataclass
@@ -43,75 +45,81 @@ class AirVisualProMeasurementDescription(
SENSOR_DESCRIPTIONS = (
AirVisualProMeasurementDescription(
key="air_quality_index",
name="Air quality index",
device_class=SensorDeviceClass.AQI,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements: measurements[
value_fn=lambda settings, status, measurements, history: measurements[
async_get_aqi_locale(settings)
],
),
AirVisualProMeasurementDescription(
key="outdoor_air_quality_index",
device_class=SensorDeviceClass.AQI,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements, history: int(
history.get(
f'Outdoor {"AQI(US)" if settings["is_aqi_usa"] else "AQI(CN)"}', -1
)
),
translation_key="outdoor_air_quality_index",
),
AirVisualProMeasurementDescription(
key="battery_level",
name="Battery",
device_class=SensorDeviceClass.BATTERY,
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda settings, status, measurements: status["battery"],
value_fn=lambda settings, status, measurements, history: status["battery"],
),
AirVisualProMeasurementDescription(
key="carbon_dioxide",
name="C02",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements: measurements["co2"],
value_fn=lambda settings, status, measurements, history: measurements["co2"],
),
AirVisualProMeasurementDescription(
key="humidity",
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda settings, status, measurements: measurements["humidity"],
value_fn=lambda settings, status, measurements, history: measurements[
"humidity"
],
),
AirVisualProMeasurementDescription(
key="particulate_matter_0_1",
name="PM 0.1",
device_class=SensorDeviceClass.PM1,
translation_key="pm01",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements: measurements["pm0_1"],
value_fn=lambda settings, status, measurements, history: measurements["pm0_1"],
),
AirVisualProMeasurementDescription(
key="particulate_matter_1_0",
name="PM 1.0",
device_class=SensorDeviceClass.PM10,
device_class=SensorDeviceClass.PM1,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements: measurements["pm1_0"],
value_fn=lambda settings, status, measurements, history: measurements["pm1_0"],
),
AirVisualProMeasurementDescription(
key="particulate_matter_2_5",
name="PM 2.5",
device_class=SensorDeviceClass.PM25,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements: measurements["pm2_5"],
value_fn=lambda settings, status, measurements, history: measurements["pm2_5"],
),
AirVisualProMeasurementDescription(
key="temperature",
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements: measurements["temperature_C"],
value_fn=lambda settings, status, measurements, history: measurements[
"temperature_C"
],
),
AirVisualProMeasurementDescription(
key="voc",
name="VOC",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda settings, status, measurements: measurements["voc"],
value_fn=lambda settings, status, measurements, history: measurements["voc"],
),
)
@@ -150,4 +158,5 @@ class AirVisualProSensor(AirVisualProEntity, SensorEntity):
self.coordinator.data["settings"],
self.coordinator.data["status"],
self.coordinator.data["measurements"],
self.coordinator.data["history"],
)

View File

@@ -24,5 +24,15 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
}
},
"entity": {
"sensor": {
"pm01": {
"name": "PM0.1"
},
"outdoor_air_quality_index": {
"name": "Outdoor air quality index"
}
}
}
}

View File

@@ -4,7 +4,14 @@ from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Final
from aioairzone_cloud.const import AZD_PROBLEMS, AZD_WARNINGS, AZD_ZONES
from aioairzone_cloud.const import (
AZD_ACTIVE,
AZD_AIDOOS,
AZD_ERRORS,
AZD_PROBLEMS,
AZD_WARNINGS,
AZD_ZONES,
)
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
@@ -18,7 +25,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneZoneEntity
from .entity import AirzoneAidooEntity, AirzoneEntity, AirzoneZoneEntity
@dataclass
@@ -28,7 +35,27 @@ class AirzoneBinarySensorEntityDescription(BinarySensorEntityDescription):
attributes: dict[str, str] | None = None
AIDOO_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]] = (
AirzoneBinarySensorEntityDescription(
device_class=BinarySensorDeviceClass.RUNNING,
key=AZD_ACTIVE,
),
AirzoneBinarySensorEntityDescription(
attributes={
"errors": AZD_ERRORS,
"warnings": AZD_WARNINGS,
},
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
key=AZD_PROBLEMS,
),
)
ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]] = (
AirzoneBinarySensorEntityDescription(
device_class=BinarySensorDeviceClass.RUNNING,
key=AZD_ACTIVE,
),
AirzoneBinarySensorEntityDescription(
attributes={
"warnings": AZD_WARNINGS,
@@ -48,6 +75,18 @@ async def async_setup_entry(
binary_sensors: list[AirzoneBinarySensor] = []
for aidoo_id, aidoo_data in coordinator.data.get(AZD_AIDOOS, {}).items():
for description in AIDOO_BINARY_SENSOR_TYPES:
if description.key in aidoo_data:
binary_sensors.append(
AirzoneAidooBinarySensor(
coordinator,
description,
aidoo_id,
aidoo_data,
)
)
for zone_id, zone_data in coordinator.data.get(AZD_ZONES, {}).items():
for description in ZONE_BINARY_SENSOR_TYPES:
if description.key in zone_data:
@@ -85,6 +124,27 @@ class AirzoneBinarySensor(AirzoneEntity, BinarySensorEntity):
}
class AirzoneAidooBinarySensor(AirzoneAidooEntity, AirzoneBinarySensor):
"""Define an Airzone Cloud Aidoo binary sensor."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: AirzoneBinarySensorEntityDescription,
aidoo_id: str,
aidoo_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, aidoo_id, aidoo_data)
self._attr_unique_id = f"{aidoo_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()
class AirzoneZoneBinarySensor(AirzoneZoneEntity, AirzoneBinarySensor):
"""Define an Airzone Cloud Zone binary sensor."""

View File

@@ -7,6 +7,7 @@ from typing import Any
from aioairzone_cloud.const import (
API_CITY,
API_GROUP_ID,
API_GROUPS,
API_LOCATION_ID,
API_OLD_ID,
API_PIN,
@@ -29,7 +30,6 @@ from .coordinator import AirzoneUpdateCoordinator
TO_REDACT_API = [
API_CITY,
API_GROUP_ID,
API_LOCATION_ID,
API_OLD_ID,
API_PIN,
@@ -58,11 +58,17 @@ def gather_ids(api_data: dict[str, Any]) -> dict[str, Any]:
ids[dev_id] = f"device{dev_idx}"
dev_idx += 1
group_idx = 1
inst_idx = 1
for inst_id in api_data[RAW_INSTALLATIONS]:
for inst_id, inst_data in api_data[RAW_INSTALLATIONS].items():
if inst_id not in ids:
ids[inst_id] = f"installation{inst_idx}"
inst_idx += 1
for group in inst_data[API_GROUPS]:
group_id = group[API_GROUP_ID]
if group_id not in ids:
ids[group_id] = f"group{group_idx}"
group_idx += 1
ws_idx = 1
for ws_id in api_data[RAW_WEBSERVERS]:

View File

@@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/airzone_cloud",
"iot_class": "cloud_polling",
"loggers": ["aioairzone_cloud"],
"requirements": ["aioairzone-cloud==0.2.0"]
"requirements": ["aioairzone-cloud==0.2.1"]
}

View File

@@ -141,6 +141,8 @@ class AirzoneSensor(AirzoneEntity, SensorEntity):
class AirzoneAidooSensor(AirzoneAidooEntity, AirzoneSensor):
"""Define an Airzone Cloud Aidoo sensor."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
@@ -151,7 +153,6 @@ class AirzoneAidooSensor(AirzoneAidooEntity, AirzoneSensor):
"""Initialize."""
super().__init__(coordinator, aidoo_id, aidoo_data)
self._attr_has_entity_name = True
self._attr_unique_id = f"{aidoo_id}_{description.key}"
self.entity_description = description
@@ -161,6 +162,8 @@ class AirzoneAidooSensor(AirzoneAidooEntity, AirzoneSensor):
class AirzoneWebServerSensor(AirzoneWebServerEntity, AirzoneSensor):
"""Define an Airzone Cloud WebServer sensor."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
@@ -171,7 +174,6 @@ class AirzoneWebServerSensor(AirzoneWebServerEntity, AirzoneSensor):
"""Initialize."""
super().__init__(coordinator, ws_id, ws_data)
self._attr_has_entity_name = True
self._attr_unique_id = f"{ws_id}_{description.key}"
self.entity_description = description
@@ -181,6 +183,8 @@ class AirzoneWebServerSensor(AirzoneWebServerEntity, AirzoneSensor):
class AirzoneZoneSensor(AirzoneZoneEntity, AirzoneSensor):
"""Define an Airzone Cloud Zone sensor."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
@@ -191,7 +195,6 @@ class AirzoneZoneSensor(AirzoneZoneEntity, AirzoneSensor):
"""Initialize."""
super().__init__(coordinator, zone_id, zone_data)
self._attr_has_entity_name = True
self._attr_unique_id = f"{zone_id}_{description.key}"
self.entity_description = description

View File

@@ -1,9 +1,7 @@
"""Provides the constants needed for component."""
from enum import IntFlag
from enum import IntFlag, StrEnum
from typing import Final
from homeassistant.backports.enum import StrEnum
DOMAIN: Final = "alarm_control_panel"
ATTR_CHANGED_BY: Final = "changed_by"

View File

@@ -1,99 +1,83 @@
# Describes the format for available alarm control panel services
alarm_disarm:
name: Disarm
description: Send the alarm the command for disarm.
target:
entity:
domain: alarm_control_panel
fields:
code:
name: Code
description: An optional code to disarm the alarm control panel with.
example: "1234"
selector:
text:
alarm_arm_custom_bypass:
name: Arm with custom bypass
description: Send arm custom bypass command.
target:
entity:
domain: alarm_control_panel
supported_features:
- alarm_control_panel.AlarmControlPanelEntityFeature.ARM_CUSTOM_BYPASS
fields:
code:
name: Code
description: An optional code to arm custom bypass the alarm control panel with.
example: "1234"
selector:
text:
alarm_arm_home:
name: Arm home
description: Send the alarm the command for arm home.
target:
entity:
domain: alarm_control_panel
supported_features:
- alarm_control_panel.AlarmControlPanelEntityFeature.ARM_HOME
fields:
code:
name: Code
description: An optional code to arm home the alarm control panel with.
example: "1234"
selector:
text:
alarm_arm_away:
name: Arm away
description: Send the alarm the command for arm away.
target:
entity:
domain: alarm_control_panel
supported_features:
- alarm_control_panel.AlarmControlPanelEntityFeature.ARM_AWAY
fields:
code:
name: Code
description: An optional code to arm away the alarm control panel with.
example: "1234"
selector:
text:
alarm_arm_night:
name: Arm night
description: Send the alarm the command for arm night.
target:
entity:
domain: alarm_control_panel
supported_features:
- alarm_control_panel.AlarmControlPanelEntityFeature.ARM_NIGHT
fields:
code:
name: Code
description: An optional code to arm night the alarm control panel with.
example: "1234"
selector:
text:
alarm_arm_vacation:
name: Arm vacation
description: Send the alarm the command for arm vacation.
target:
entity:
domain: alarm_control_panel
supported_features:
- alarm_control_panel.AlarmControlPanelEntityFeature.ARM_VACATION
fields:
code:
name: Code
description: An optional code to arm vacation the alarm control panel with.
example: "1234"
selector:
text:
alarm_trigger:
name: Trigger
description: Send the alarm the command for trigger.
target:
entity:
domain: alarm_control_panel
supported_features:
- alarm_control_panel.AlarmControlPanelEntityFeature.TRIGGER
fields:
code:
name: Code
description: An optional code to trigger the alarm control panel with.
example: "1234"
selector:
text:

View File

@@ -63,10 +63,76 @@
}
}
},
"issues": {
"platform_integration_no_support": {
"title": "[%key:common::issues::platform_integration_no_support_title%]",
"description": "[%key:common::issues::platform_integration_no_support_description%]"
"services": {
"alarm_disarm": {
"name": "Disarm",
"description": "Disarms the alarm.",
"fields": {
"code": {
"name": "Code",
"description": "Code to disarm the alarm."
}
}
},
"alarm_arm_custom_bypass": {
"name": "Arm with custom bypass",
"description": "Arms the alarm while allowing to bypass a custom area.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
"description": "Code to arm the alarm."
}
}
},
"alarm_arm_home": {
"name": "Arm home",
"description": "Sets the alarm to: _armed, but someone is home_.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
"description": "[%key:component::alarm_control_panel::services::alarm_arm_custom_bypass::fields::code::description%]"
}
}
},
"alarm_arm_away": {
"name": "Arm away",
"description": "Sets the alarm to: _armed, no one home_.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
"description": "[%key:component::alarm_control_panel::services::alarm_arm_custom_bypass::fields::code::description%]"
}
}
},
"alarm_arm_night": {
"name": "Arm night",
"description": "Sets the alarm to: _armed for the night_.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
"description": "[%key:component::alarm_control_panel::services::alarm_arm_custom_bypass::fields::code::description%]"
}
}
},
"alarm_arm_vacation": {
"name": "Arm vacation",
"description": "Sets the alarm to: _armed for vacation_.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
"description": "[%key:component::alarm_control_panel::services::alarm_arm_custom_bypass::fields::code::description%]"
}
}
},
"alarm_trigger": {
"name": "Trigger",
"description": "Enables an external alarm trigger.",
"fields": {
"code": {
"name": "[%key:component::alarm_control_panel::services::alarm_disarm::fields::code::name%]",
"description": "[%key:component::alarm_control_panel::services::alarm_arm_custom_bypass::fields::code::description%]"
}
}
}
}
}

View File

@@ -1,30 +1,22 @@
alarm_keypress:
name: Key press
description: Send custom keypresses to the alarm.
target:
entity:
integration: alarmdecoder
domain: alarm_control_panel
fields:
keypress:
name: Key press
description: "String to send to the alarm panel."
required: true
example: "*71"
selector:
text:
alarm_toggle_chime:
name: Toggle Chime
description: Send the alarm the toggle chime command.
target:
entity:
integration: alarmdecoder
domain: alarm_control_panel
fields:
code:
name: Code
description: A code to toggle the alarm control panel chime with.
required: true
example: 1234
selector:

View File

@@ -20,7 +20,9 @@
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
},
"create_entry": { "default": "Successfully connected to AlarmDecoder." },
"create_entry": {
"default": "Successfully connected to AlarmDecoder."
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
@@ -35,7 +37,7 @@
}
},
"arm_settings": {
"title": "Configure AlarmDecoder",
"title": "[%key:component::alarmdecoder::options::step::init::title%]",
"data": {
"auto_bypass": "Auto Bypass on Arm",
"code_arm_required": "Code Required for Arming",
@@ -43,14 +45,14 @@
}
},
"zone_select": {
"title": "Configure AlarmDecoder",
"title": "[%key:component::alarmdecoder::options::step::init::title%]",
"description": "Enter the zone number you'd like to to add, edit, or remove.",
"data": {
"zone_number": "Zone Number"
}
},
"zone_details": {
"title": "Configure AlarmDecoder",
"title": "[%key:component::alarmdecoder::options::step::init::title%]",
"description": "Enter details for zone {zone_number}. To delete zone {zone_number}, leave Zone Name blank.",
"data": {
"zone_name": "Zone Name",
@@ -68,5 +70,27 @@
"loop_rfid": "RF Loop cannot be used without RF Serial.",
"loop_range": "RF Loop must be an integer between 1 and 4."
}
},
"services": {
"alarm_keypress": {
"name": "Key press",
"description": "Sends custom keypresses to the alarm.",
"fields": {
"keypress": {
"name": "[%key:component::alarmdecoder::services::alarm_keypress::name%]",
"description": "String to send to the alarm panel."
}
}
},
"alarm_toggle_chime": {
"name": "Toggle chime",
"description": "Sends the alarm the toggle chime command.",
"fields": {
"code": {
"name": "Code",
"description": "Code to toggle the alarm control panel chime with."
}
}
}
}
}

View File

@@ -25,16 +25,17 @@ from homeassistant.const import (
STATE_OFF,
STATE_ON,
)
from homeassistant.core import Event, HassJob, HomeAssistant
from homeassistant.core import HassJob, HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.event import (
EventStateChangedData,
async_track_point_in_time,
async_track_state_change_event,
)
from homeassistant.helpers.template import Template
from homeassistant.helpers.typing import ConfigType
from homeassistant.helpers.typing import ConfigType, EventType
from homeassistant.util.dt import now
from .const import (
@@ -196,11 +197,13 @@ class Alert(Entity):
return STATE_ON
return STATE_IDLE
async def watched_entity_change(self, event: Event) -> None:
async def watched_entity_change(
self, event: EventType[EventStateChangedData]
) -> None:
"""Determine if the alert should start or stop."""
if (to_state := event.data.get("new_state")) is None:
if (to_state := event.data["new_state"]) is None:
return
LOGGER.debug("Watched entity (%s) has changed", event.data.get("entity_id"))
LOGGER.debug("Watched entity (%s) has changed", event.data["entity_id"])
if to_state.state == self._alert_state and not self._firing:
await self.begin_alerting()
if to_state.state != self._alert_state and self._firing:

View File

@@ -1,20 +1,14 @@
toggle:
name: Toggle
description: Toggle alert's notifications.
target:
entity:
domain: alert
turn_off:
name: Turn off
description: Silence alert's notifications.
target:
entity:
domain: alert
turn_on:
name: Turn on
description: Reset alert's notifications.
target:
entity:
domain: alert

View File

@@ -9,5 +9,19 @@
"on": "[%key:common::state::active%]"
}
}
},
"services": {
"toggle": {
"name": "[%key:common::action::toggle%]",
"description": "Toggles alert's notifications."
},
"turn_off": {
"name": "[%key:common::action::turn_off%]",
"description": "Silences alert's notifications."
},
"turn_on": {
"name": "[%key:common::action::turn_on%]",
"description": "Resets alert's notifications."
}
}
}

View File

@@ -14,6 +14,7 @@ from homeassistant.components import (
camera,
climate,
cover,
event,
fan,
group,
humidifier,
@@ -527,6 +528,26 @@ class CoverCapabilities(AlexaEntity):
yield Alexa(self.entity)
@ENTITY_ADAPTERS.register(event.DOMAIN)
class EventCapabilities(AlexaEntity):
"""Class to represent doorbel event capabilities."""
def default_display_categories(self) -> list[str] | None:
"""Return the display categories for this entity."""
attrs = self.entity.attributes
device_class: event.EventDeviceClass | None = attrs.get(ATTR_DEVICE_CLASS)
if device_class == event.EventDeviceClass.DOORBELL:
return [DisplayCategory.DOORBELL]
return None
def interfaces(self) -> Generator[AlexaCapability, None, None]:
"""Yield the supported interfaces."""
if self.default_display_categories() is not None:
yield AlexaDoorbellEventSource(self.entity)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.entity)
@ENTITY_ADAPTERS.register(light.DOMAIN)
class LightCapabilities(AlexaEntity):
"""Class to represent Light capabilities."""

View File

@@ -857,14 +857,55 @@ async def async_api_adjust_target_temp(
temp_delta = temperature_from_object(
hass, directive.payload["targetSetpointDelta"], interval=True
)
target_temp = float(entity.attributes.get(ATTR_TEMPERATURE)) + temp_delta
if target_temp < min_temp or target_temp > max_temp:
raise AlexaTempRangeError(hass, target_temp, min_temp, max_temp)
data = {ATTR_ENTITY_ID: entity.entity_id, ATTR_TEMPERATURE: target_temp}
response = directive.response()
current_target_temp_high = entity.attributes.get(climate.ATTR_TARGET_TEMP_HIGH)
current_target_temp_low = entity.attributes.get(climate.ATTR_TARGET_TEMP_LOW)
if current_target_temp_high and current_target_temp_low:
target_temp_high = float(current_target_temp_high) + temp_delta
if target_temp_high < min_temp or target_temp_high > max_temp:
raise AlexaTempRangeError(hass, target_temp_high, min_temp, max_temp)
target_temp_low = float(current_target_temp_low) + temp_delta
if target_temp_low < min_temp or target_temp_low > max_temp:
raise AlexaTempRangeError(hass, target_temp_low, min_temp, max_temp)
data = {
ATTR_ENTITY_ID: entity.entity_id,
climate.ATTR_TARGET_TEMP_HIGH: target_temp_high,
climate.ATTR_TARGET_TEMP_LOW: target_temp_low,
}
response.add_context_property(
{
"name": "upperSetpoint",
"namespace": "Alexa.ThermostatController",
"value": {"value": target_temp_high, "scale": API_TEMP_UNITS[unit]},
}
)
response.add_context_property(
{
"name": "lowerSetpoint",
"namespace": "Alexa.ThermostatController",
"value": {"value": target_temp_low, "scale": API_TEMP_UNITS[unit]},
}
)
else:
target_temp = float(entity.attributes.get(ATTR_TEMPERATURE)) + temp_delta
if target_temp < min_temp or target_temp > max_temp:
raise AlexaTempRangeError(hass, target_temp, min_temp, max_temp)
data = {ATTR_ENTITY_ID: entity.entity_id, ATTR_TEMPERATURE: target_temp}
response.add_context_property(
{
"name": "targetSetpoint",
"namespace": "Alexa.ThermostatController",
"value": {"value": target_temp, "scale": API_TEMP_UNITS[unit]},
}
)
await hass.services.async_call(
entity.domain,
climate.SERVICE_SET_TEMPERATURE,
@@ -872,13 +913,6 @@ async def async_api_adjust_target_temp(
blocking=False,
context=context,
)
response.add_context_property(
{
"name": "targetSetpoint",
"namespace": "Alexa.ThermostatController",
"value": {"value": target_temp, "scale": API_TEMP_UNITS[unit]},
}
)
return response

View File

@@ -10,6 +10,7 @@ from typing import TYPE_CHECKING, cast
import aiohttp
import async_timeout
from homeassistant.components import event
from homeassistant.const import MATCH_ALL, STATE_ON
from homeassistant.core import HomeAssistant, State, callback
from homeassistant.helpers.aiohttp_client import async_get_clientsession
@@ -91,8 +92,10 @@ async def async_enable_proactive_mode(hass, smart_home_config):
return
if should_doorbell:
if new_state.state == STATE_ON and (
old_state is None or old_state.state != STATE_ON
if (
new_state.domain == event.DOMAIN
or new_state.state == STATE_ON
and (old_state is None or old_state.state != STATE_ON)
):
await async_send_doorbell_event_message(
hass, smart_home_config, alexa_changed_entity

View File

@@ -4,9 +4,10 @@ from amberelectric import Configuration
from amberelectric.api import amber_api
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_API_TOKEN
from homeassistant.core import HomeAssistant
from .const import CONF_API_TOKEN, CONF_SITE_ID, DOMAIN, PLATFORMS
from .const import CONF_SITE_ID, DOMAIN, PLATFORMS
from .coordinator import AmberUpdateCoordinator

View File

@@ -3,7 +3,7 @@
"step": {
"user": {
"data": {
"api_token": "API Token",
"api_token": "[%key:common::config_flow::data::api_token%]",
"site_id": "Site ID"
},
"description": "Go to {api_url} to generate an API key"

View File

@@ -154,17 +154,18 @@ class AmbiclimateEntity(ClimateEntity):
_attr_target_temperature_step = 1
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF]
_attr_has_entity_name = True
_attr_name = None
def __init__(self, heater, store):
"""Initialize the thermostat."""
self._heater = heater
self._store = store
self._attr_unique_id = heater.device_id
self._attr_name = heater.name
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, self.unique_id)},
manufacturer="Ambiclimate",
name=self.name,
name=heater.name,
)
async def async_set_temperature(self, **kwargs: Any) -> None:

View File

@@ -1,53 +1,34 @@
# Describes the format for available services for ambiclimate
set_comfort_mode:
name: Set comfort mode
description: >
Enable comfort mode on your AC.
fields:
name:
description: >
String with device name.
required: true
example: Bedroom
selector:
text:
send_comfort_feedback:
name: Send comfort feedback
description: >
Send feedback for comfort mode.
fields:
name:
description: >
String with device name.
required: true
example: Bedroom
selector:
text:
value:
description: >
Send any of the following comfort values: too_hot, too_warm, bit_warm, comfortable, bit_cold, too_cold, freezing
required: true
example: bit_warm
selector:
text:
set_temperature_mode:
name: Set temperature mode
description: >
Enable temperature mode on your AC.
fields:
name:
description: >
String with device name.
required: true
example: Bedroom
selector:
text:
value:
description: >
Target value in celsius
required: true
example: 22
selector:

View File

@@ -18,5 +18,45 @@
"missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]",
"access_token": "Unknown error generating an access token."
}
},
"services": {
"set_comfort_mode": {
"name": "Set comfort mode",
"description": "Enables comfort mode on your AC.",
"fields": {
"name": {
"name": "Device name",
"description": "String with device name."
}
}
},
"send_comfort_feedback": {
"name": "Send comfort feedback",
"description": "Sends feedback for comfort mode.",
"fields": {
"name": {
"name": "[%key:component::ambiclimate::services::set_comfort_mode::fields::name::name%]",
"description": "[%key:component::ambiclimate::services::set_comfort_mode::fields::name::description%]"
},
"value": {
"name": "Comfort value",
"description": "Send any of the following comfort values: too_hot, too_warm, bit_warm, comfortable, bit_cold, too_cold, freezing\n."
}
}
},
"set_temperature_mode": {
"name": "Set temperature mode",
"description": "Enables temperature mode on your AC.",
"fields": {
"name": {
"name": "[%key:component::ambiclimate::services::set_comfort_mode::fields::name::name%]",
"description": "[%key:component::ambiclimate::services::set_comfort_mode::fields::name::description%]"
},
"value": {
"name": "Temperature",
"description": "Target value in celsius."
}
}
}
}
}

View File

@@ -210,9 +210,10 @@ class AmcrestChecker(ApiWrapper):
self, *args: Any, **kwargs: Any
) -> AsyncIterator[httpx.Response]:
"""amcrest.ApiWrapper.command wrapper to catch errors."""
async with self._async_command_wrapper():
async with super().async_stream_command(*args, **kwargs) as ret:
yield ret
async with self._async_command_wrapper(), super().async_stream_command(
*args, **kwargs
) as ret:
yield ret
@asynccontextmanager
async def _async_command_wrapper(self) -> AsyncIterator[None]:

View File

@@ -1,82 +1,53 @@
enable_recording:
name: Enable recording
description: Enable continuous recording to camera storage.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
disable_recording:
name: Disable recording
description: Disable continuous recording to camera storage.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
enable_audio:
name: Enable audio
description: Enable audio stream.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
disable_audio:
name: Disable audio
description: Disable audio stream.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
enable_motion_recording:
name: Enable motion recording
description: Enable recording a clip to camera storage when motion is detected.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
disable_motion_recording:
name: Disable motion recording
description: Disable recording a clip to camera storage when motion is detected.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
goto_preset:
name: Go to preset
description: Move camera to PTZ preset.
fields:
entity_id:
description: "Name(s) of the cameras, or 'all' for all cameras."
selector:
entity:
integration: amcrest
domain: camera
preset:
name: Preset
description: Preset number.
required: true
selector:
number:
@@ -84,18 +55,12 @@ goto_preset:
max: 1000
set_color_bw:
name: Set color
description: Set camera color mode.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
color_bw:
name: Color
description: Color mode.
selector:
select:
options:
@@ -104,40 +69,26 @@ set_color_bw:
- "color"
start_tour:
name: Start tour
description: Start camera's PTZ tour function.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
stop_tour:
name: Stop tour
description: Stop camera's PTZ tour function.
fields:
entity_id:
name: Entity
description: "Name(s) of the cameras, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
ptz_control:
name: PTZ control
description: Move (Pan/Tilt) and/or Zoom a PTZ camera.
fields:
entity_id:
name: Entity
description: "Name of the camera, or 'all' for all cameras."
example: "camera.house_front"
selector:
text:
movement:
name: Movement
description: "Direction to move the camera."
required: true
selector:
select:
@@ -153,8 +104,6 @@ ptz_control:
- "zoom_in"
- "zoom_out"
travel_time:
name: Travel time
description: "Travel time in fractional seconds: from 0 to 1."
default: .2
selector:
number:

View File

@@ -0,0 +1,130 @@
{
"services": {
"enable_recording": {
"name": "Enable recording",
"description": "Enables continuous recording to camera storage.",
"fields": {
"entity_id": {
"name": "Entity",
"description": "Name(s) of the cameras, or 'all' for all cameras."
}
}
},
"disable_recording": {
"name": "Disable recording",
"description": "Disables continuous recording to camera storage.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
}
}
},
"enable_audio": {
"name": "Enable audio",
"description": "Enables audio stream.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
}
}
},
"disable_audio": {
"name": "Disable audio",
"description": "Disables audio stream.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
}
}
},
"enable_motion_recording": {
"name": "Enables motion recording",
"description": "Enables recording a clip to camera storage when motion is detected.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
}
}
},
"disable_motion_recording": {
"name": "Disables motion recording",
"description": "Disable recording a clip to camera storage when motion is detected.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
}
}
},
"goto_preset": {
"name": "Go to preset",
"description": "Moves camera to PTZ preset.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
},
"preset": {
"name": "Preset",
"description": "Preset number."
}
}
},
"set_color_bw": {
"name": "Set color",
"description": "Sets camera color mode.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
},
"color_bw": {
"name": "Color",
"description": "Color mode."
}
}
},
"start_tour": {
"name": "Start tour",
"description": "Starts camera's PTZ tour function.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
}
}
},
"stop_tour": {
"name": "Stop tour",
"description": "Stops camera's PTZ tour function.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
}
}
},
"ptz_control": {
"name": "PTZ control",
"description": "Moves (pan/tilt) and/or zoom a PTZ camera.",
"fields": {
"entity_id": {
"name": "[%key:component::amcrest::services::enable_recording::fields::entity_id::name%]",
"description": "[%key:component::amcrest::services::enable_recording::fields::entity_id::description%]"
},
"movement": {
"name": "Movement",
"description": "Direction to move the camera."
},
"travel_time": {
"name": "Travel time",
"description": "Travel time in fractional seconds: from 0 to 1."
}
}
}
}
}

View File

@@ -17,11 +17,5 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"issues": {
"deprecated_yaml": {
"title": "The Android IP Webcam YAML configuration is being removed",
"description": "Configuring Android IP Webcam using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the Android IP Webcam YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
}
}
}

View File

@@ -2,13 +2,15 @@
from __future__ import annotations
from collections.abc import Awaitable, Callable, Coroutine
from datetime import datetime
from datetime import timedelta
import functools
import hashlib
import logging
from typing import Any, Concatenate, ParamSpec, TypeVar
from androidtv.constants import APPS, KEYS
from androidtv.exceptions import LockNotAcquiredException
from androidtv.setup_async import AndroidTVAsync, FireTVAsync
import voluptuous as vol
from homeassistant.components import persistent_notification
@@ -34,6 +36,7 @@ from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util import Throttle
from . import ADB_PYTHON_EXCEPTIONS, ADB_TCP_EXCEPTIONS, get_androidtv_mac
from .const import (
@@ -64,6 +67,8 @@ ATTR_DEVICE_PATH = "device_path"
ATTR_HDMI_INPUT = "hdmi_input"
ATTR_LOCAL_PATH = "local_path"
MIN_TIME_BETWEEN_SCREENCAPS = timedelta(seconds=60)
SERVICE_ADB_COMMAND = "adb_command"
SERVICE_DOWNLOAD = "download"
SERVICE_LEARN_SENDEVENT = "learn_sendevent"
@@ -88,13 +93,15 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the Android Debug Bridge entity."""
aftv = hass.data[DOMAIN][entry.entry_id][ANDROID_DEV]
aftv: AndroidTVAsync | FireTVAsync = hass.data[DOMAIN][entry.entry_id][ANDROID_DEV]
device_class = aftv.DEVICE_CLASS
device_type = (
PREFIX_ANDROIDTV if device_class == DEVICE_ANDROIDTV else PREFIX_FIRETV
)
# CONF_NAME may be present in entry.data for configuration imported from YAML
device_name = entry.data.get(CONF_NAME) or f"{device_type} {entry.data[CONF_HOST]}"
device_name: str = entry.data.get(
CONF_NAME, f"{device_type} {entry.data[CONF_HOST]}"
)
device_args = [
aftv,
@@ -171,8 +178,11 @@ def adb_decorator(
except LockNotAcquiredException:
# If the ADB lock could not be acquired, skip this command
_LOGGER.info(
"ADB command not executed because the connection is currently"
" in use"
(
"ADB command %s not executed because the connection is"
" currently in use"
),
func.__name__,
)
return None
except self.exceptions as err:
@@ -204,23 +214,27 @@ class ADBDevice(MediaPlayerEntity):
"""Representation of an Android or Fire TV device."""
_attr_device_class = MediaPlayerDeviceClass.TV
_attr_has_entity_name = True
_attr_name = None
def __init__(
self,
aftv,
name,
dev_type,
unique_id,
entry_id,
entry_data,
):
aftv: AndroidTVAsync | FireTVAsync,
name: str,
dev_type: str,
unique_id: str,
entry_id: str,
entry_data: dict[str, Any],
) -> None:
"""Initialize the Android / Fire TV device."""
self.aftv = aftv
self._attr_name = name
self._attr_unique_id = unique_id
self._entry_id = entry_id
self._entry_data = entry_data
self._media_image: tuple[bytes | None, str | None] = None, None
self._attr_media_image_hash = None
info = aftv.device_properties
model = info.get(ATTR_MODEL)
self._attr_device_info = DeviceInfo(
@@ -235,13 +249,13 @@ class ADBDevice(MediaPlayerEntity):
if mac := get_androidtv_mac(info):
self._attr_device_info[ATTR_CONNECTIONS] = {(CONNECTION_NETWORK_MAC, mac)}
self._app_id_to_name = {}
self._app_name_to_id = {}
self._app_id_to_name: dict[str, str] = {}
self._app_name_to_id: dict[str, str] = {}
self._get_sources = DEFAULT_GET_SOURCES
self._exclude_unnamed_apps = DEFAULT_EXCLUDE_UNNAMED_APPS
self._screencap = DEFAULT_SCREENCAP
self.turn_on_command = None
self.turn_off_command = None
self.turn_on_command: str | None = None
self.turn_off_command: str | None = None
# ADB exceptions to catch
if not aftv.adb_server_ip:
@@ -260,7 +274,7 @@ class ADBDevice(MediaPlayerEntity):
# The number of consecutive failed connect attempts
self._failed_connect_count = 0
def _process_config(self):
def _process_config(self) -> None:
"""Load the config options."""
_LOGGER.debug("Loading configuration options")
options = self._entry_data[ANDROID_DEV_OPT]
@@ -297,34 +311,39 @@ class ADBDevice(MediaPlayerEntity):
)
)
@property
def media_image_hash(self) -> str | None:
"""Hash value for media image."""
return f"{datetime.now().timestamp()}" if self._screencap else None
@adb_decorator()
async def _adb_screencap(self):
async def _adb_screencap(self) -> bytes | None:
"""Take a screen capture from the device."""
return await self.aftv.adb_screencap()
async def async_get_media_image(self) -> tuple[bytes | None, str | None]:
"""Fetch current playing image."""
async def _async_get_screencap(self, prev_app_id: str | None = None) -> None:
"""Take a screen capture from the device when enabled."""
if (
not self._screencap
or self.state in {MediaPlayerState.OFF, None}
or not self.available
):
return None, None
self._media_image = None, None
self._attr_media_image_hash = None
else:
force: bool = prev_app_id is not None
if force:
force = prev_app_id != self._attr_app_id
await self._adb_get_screencap(no_throttle=force)
media_data = await self._adb_screencap()
if media_data:
return media_data, "image/png"
@Throttle(MIN_TIME_BETWEEN_SCREENCAPS)
async def _adb_get_screencap(self, **kwargs) -> None:
"""Take a screen capture from the device every 60 seconds."""
if media_data := await self._adb_screencap():
self._media_image = media_data, "image/png"
self._attr_media_image_hash = hashlib.sha256(media_data).hexdigest()[:16]
else:
self._media_image = None, None
self._attr_media_image_hash = None
# If an exception occurred and the device is no longer available, write the state
if not self.available:
self.async_write_ha_state()
return None, None
async def async_get_media_image(self) -> tuple[bytes | None, str | None]:
"""Fetch current playing image."""
return self._media_image
@adb_decorator()
async def async_media_play(self) -> None:
@@ -382,7 +401,7 @@ class ADBDevice(MediaPlayerEntity):
await self.aftv.stop_app(self._app_name_to_id.get(source_, source_))
@adb_decorator()
async def adb_command(self, command):
async def adb_command(self, command: str) -> None:
"""Send an ADB command to an Android / Fire TV device."""
if key := KEYS.get(command):
await self.aftv.adb_shell(f"input keyevent {key}")
@@ -407,7 +426,7 @@ class ADBDevice(MediaPlayerEntity):
return
@adb_decorator()
async def learn_sendevent(self):
async def learn_sendevent(self) -> None:
"""Translate a key press on a remote to ADB 'sendevent' commands."""
output = await self.aftv.learn_sendevent()
if output:
@@ -426,7 +445,7 @@ class ADBDevice(MediaPlayerEntity):
_LOGGER.info("%s", msg)
@adb_decorator()
async def service_download(self, device_path, local_path):
async def service_download(self, device_path: str, local_path: str) -> None:
"""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)
@@ -435,7 +454,7 @@ class ADBDevice(MediaPlayerEntity):
await self.aftv.adb_pull(local_path, device_path)
@adb_decorator()
async def service_upload(self, device_path, local_path):
async def service_upload(self, device_path: str, local_path: str) -> None:
"""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)
@@ -460,6 +479,7 @@ class AndroidTVDevice(ADBDevice):
| MediaPlayerEntityFeature.VOLUME_SET
| MediaPlayerEntityFeature.VOLUME_STEP
)
aftv: AndroidTVAsync
@adb_decorator(override_available=True)
async def async_update(self) -> None:
@@ -477,6 +497,7 @@ class AndroidTVDevice(ADBDevice):
if not self.available:
return
prev_app_id = self._attr_app_id
# Get the updated state and attributes.
(
state,
@@ -492,7 +513,7 @@ class AndroidTVDevice(ADBDevice):
if self._attr_state is None:
self._attr_available = False
if running_apps:
if running_apps and self._attr_app_id:
self._attr_source = self._attr_app_name = self._app_id_to_name.get(
self._attr_app_id, self._attr_app_id
)
@@ -506,6 +527,8 @@ class AndroidTVDevice(ADBDevice):
else:
self._attr_source_list = None
await self._async_get_screencap(prev_app_id)
@adb_decorator()
async def async_media_stop(self) -> None:
"""Send stop command."""
@@ -549,6 +572,7 @@ class FireTVDevice(ADBDevice):
| MediaPlayerEntityFeature.SELECT_SOURCE
| MediaPlayerEntityFeature.STOP
)
aftv: FireTVAsync
@adb_decorator(override_available=True)
async def async_update(self) -> None:
@@ -566,6 +590,7 @@ class FireTVDevice(ADBDevice):
if not self.available:
return
prev_app_id = self._attr_app_id
# Get the `state`, `current_app`, `running_apps` and `hdmi_input`.
(
state,
@@ -578,7 +603,7 @@ class FireTVDevice(ADBDevice):
if self._attr_state is None:
self._attr_available = False
if running_apps:
if running_apps and self._attr_app_id:
self._attr_source = self._app_id_to_name.get(
self._attr_app_id, self._attr_app_id
)
@@ -592,6 +617,8 @@ class FireTVDevice(ADBDevice):
else:
self._attr_source_list = None
await self._async_get_screencap(prev_app_id)
@adb_decorator()
async def async_media_stop(self) -> None:
"""Send stop (back) command."""

View File

@@ -1,67 +1,49 @@
# Describes the format for available Android and Fire TV services
adb_command:
name: ADB command
description: Send an ADB command to an Android / Fire TV device.
target:
entity:
integration: androidtv
domain: media_player
fields:
command:
name: Command
description: Either a key command or an ADB shell command.
required: true
example: "HOME"
selector:
text:
download:
name: Download
description: Download a file from your Android / Fire TV device to your Home Assistant instance.
target:
entity:
integration: androidtv
domain: media_player
fields:
device_path:
name: Device path
description: The filepath on the Android / Fire TV device.
required: true
example: "/storage/emulated/0/Download/example.txt"
selector:
text:
local_path:
name: Local path
description: The filepath on your Home Assistant instance.
required: true
example: "/config/www/example.txt"
selector:
text:
upload:
name: Upload
description: Upload a file from your Home Assistant instance to an Android / Fire TV device.
target:
entity:
integration: androidtv
domain: media_player
fields:
device_path:
name: Device path
description: The filepath on the Android / Fire TV device.
required: true
example: "/storage/emulated/0/Download/example.txt"
selector:
text:
local_path:
name: Local path
description: The filepath on your Home Assistant instance.
required: true
example: "/config/www/example.txt"
selector:
text:
learn_sendevent:
name: Learn sendevent
description: Translate a key press on a remote into ADB 'sendevent' commands. You must press one button on the remote within 8 seconds of calling this service.
target:
entity:
integration: androidtv

View File

@@ -50,7 +50,7 @@
"title": "Configure Android state detection rules",
"description": "Configure detection rule for application id {rule_id}",
"data": {
"rule_id": "Application ID",
"rule_id": "[%key:component::androidtv::options::step::apps::data::app_id%]",
"rule_values": "List of state detection rules (see documentation)",
"rule_delete": "Check to delete this rule"
}
@@ -59,5 +59,49 @@
"error": {
"invalid_det_rules": "Invalid state detection rules"
}
},
"services": {
"adb_command": {
"name": "ADB command",
"description": "Sends an ADB command to an Android / Fire TV device.",
"fields": {
"command": {
"name": "Command",
"description": "Either a key command or an ADB shell command."
}
}
},
"download": {
"name": "Download",
"description": "Downloads a file from your Android / Fire TV device to your Home Assistant instance.",
"fields": {
"device_path": {
"name": "Device path",
"description": "The filepath on the Android / Fire TV device."
},
"local_path": {
"name": "Local path",
"description": "The filepath on your Home Assistant instance."
}
}
},
"upload": {
"name": "Upload",
"description": "Uploads a file from your Home Assistant instance to an Android / Fire TV device.",
"fields": {
"device_path": {
"name": "[%key:component::androidtv::services::download::fields::device_path::name%]",
"description": "[%key:component::androidtv::services::download::fields::device_path::description%]"
},
"local_path": {
"name": "[%key:component::androidtv::services::download::fields::local_path::name%]",
"description": "[%key:component::androidtv::services::download::fields::local_path::description%]"
}
}
},
"learn_sendevent": {
"name": "Learn sendevent",
"description": "Translates a key press on a remote into ADB 'sendevent' commands. You must press one button on the remote within 8 seconds of calling this service."
}
}
}

View File

@@ -18,7 +18,7 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from .const import DOMAIN
from .helpers import create_api
from .helpers import create_api, get_enable_ime
_LOGGER = logging.getLogger(__name__)
@@ -27,7 +27,7 @@ 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])
api = create_api(hass, entry.data[CONF_HOST], get_enable_ime(entry))
@callback
def is_available_updated(is_available: bool) -> None:
@@ -76,6 +76,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
)
entry.async_on_unload(entry.add_update_listener(update_listener))
return True
@@ -87,3 +88,8 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
api.disconnect()
return unload_ok
async def update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(entry.entry_id)

View File

@@ -15,11 +15,12 @@ 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.core import callback
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.device_registry import format_mac
from .const import DOMAIN
from .helpers import create_api
from .const import CONF_ENABLE_IME, DOMAIN
from .helpers import create_api, get_enable_ime
STEP_USER_DATA_SCHEMA = vol.Schema(
{
@@ -55,7 +56,7 @@ class AndroidTVRemoteConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
if user_input is not None:
self.host = user_input["host"]
assert self.host
api = create_api(self.hass, self.host)
api = create_api(self.hass, self.host, enable_ime=False)
try:
self.name, self.mac = await api.async_get_name_and_mac()
assert self.mac
@@ -75,7 +76,7 @@ class AndroidTVRemoteConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
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)
self.api = create_api(self.hass, self.host, enable_ime=False)
await self.api.async_generate_cert_if_missing()
await self.api.async_start_pairing()
return await self.async_step_pair()
@@ -186,3 +187,38 @@ class AndroidTVRemoteConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
description_placeholders={CONF_NAME: self.name},
errors=errors,
)
@staticmethod
@callback
def async_get_options_flow(
config_entry: config_entries.ConfigEntry,
) -> config_entries.OptionsFlow:
"""Create the options flow."""
return OptionsFlowHandler(config_entry)
class OptionsFlowHandler(config_entries.OptionsFlow):
"""Android TV Remote options flow."""
def __init__(self, config_entry: config_entries.ConfigEntry) -> None:
"""Initialize options flow."""
self.config_entry = config_entry
async def async_step_init(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Manage the options."""
if user_input is not None:
return self.async_create_entry(title="", data=user_input)
return self.async_show_form(
step_id="init",
data_schema=vol.Schema(
{
vol.Required(
CONF_ENABLE_IME,
default=get_enable_ime(self.config_entry),
): bool,
}
),
)

View File

@@ -4,3 +4,6 @@ from __future__ import annotations
from typing import Final
DOMAIN: Final = "androidtv_remote"
CONF_ENABLE_IME: Final = "enable_ime"
CONF_ENABLE_IME_DEFAULT_VALUE: Final = True

View File

@@ -3,11 +3,14 @@ from __future__ import annotations
from androidtvremote2 import AndroidTVRemote
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.storage import STORAGE_DIR
from .const import CONF_ENABLE_IME, CONF_ENABLE_IME_DEFAULT_VALUE
def create_api(hass: HomeAssistant, host: str) -> AndroidTVRemote:
def create_api(hass: HomeAssistant, host: str, enable_ime: bool) -> AndroidTVRemote:
"""Create an AndroidTVRemote instance."""
return AndroidTVRemote(
client_name="Home Assistant",
@@ -15,4 +18,10 @@ def create_api(hass: HomeAssistant, host: str) -> AndroidTVRemote:
keyfile=hass.config.path(STORAGE_DIR, "androidtv_remote_key.pem"),
host=host,
loop=hass.loop,
enable_ime=enable_ime,
)
def get_enable_ime(entry: ConfigEntry) -> bool:
"""Get value of enable_ime option or its default value."""
return entry.options.get(CONF_ENABLE_IME, CONF_ENABLE_IME_DEFAULT_VALUE)

View File

@@ -8,6 +8,6 @@
"iot_class": "local_push",
"loggers": ["androidtvremote2"],
"quality_scale": "platinum",
"requirements": ["androidtvremote2==0.0.9"],
"requirements": ["androidtvremote2==0.0.12"],
"zeroconf": ["_androidtvremote2._tcp.local."]
}

View File

@@ -34,5 +34,14 @@
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
}
},
"options": {
"step": {
"init": {
"data": {
"enable_ime": "Enable IME. Needed for getting the current app. Disable for devices that show 'Use keyboard on mobile device screen' instead of the on screen keyboard."
}
}
}
}
}

View File

@@ -29,7 +29,7 @@
"name": "State"
},
"mode": {
"name": "Mode"
"name": "[%key:common::config_flow::data::mode%]"
},
"target_temperature": {
"name": "Target temperature"

View File

@@ -11,6 +11,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_PORT, Platform
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.util import Throttle
_LOGGER = logging.getLogger(__name__)
@@ -79,16 +80,6 @@ class APCUPSdData:
return self.status[model_key]
return None
@property
def sw_version(self) -> str | None:
"""Return the software version of the APCUPSd, if available."""
return self.status.get("VERSION")
@property
def hw_version(self) -> str | None:
"""Return the firmware version of the UPS, if available."""
return self.status.get("FIRMWARE")
@property
def serial_no(self) -> str | None:
"""Return the unique serial number of the UPS, if available."""
@@ -99,6 +90,21 @@ class APCUPSdData:
"""Return the STATFLAG indicating the status of the UPS, if available."""
return self.status.get("STATFLAG")
@property
def device_info(self) -> DeviceInfo | None:
"""Return the DeviceInfo of this APC UPS for the sensors, if serial number is available."""
if self.serial_no is None:
return None
return DeviceInfo(
identifiers={(DOMAIN, self.serial_no)},
model=self.model,
manufacturer="APC",
name=self.name if self.name is not None else "APC UPS",
hw_version=self.status.get("FIRMWARE"),
sw_version=self.status.get("VERSION"),
)
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self, **kwargs: Any) -> None:
"""Fetch the latest status from APCUPSd.

View File

@@ -9,7 +9,6 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import DOMAIN, VALUE_ONLINE, APCUPSdData
@@ -53,13 +52,8 @@ class OnlineStatus(BinarySensorEntity):
# Set up unique id and device info if serial number is available.
if (serial_no := data_service.serial_no) is not None:
self._attr_unique_id = f"{serial_no}_{description.key}"
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, serial_no)},
model=data_service.model,
manufacturer="APC",
hw_version=data_service.hw_version,
sw_version=data_service.sw_version,
)
self._attr_device_info = data_service.device_info
self.entity_description = description
self._data_service = data_service

View File

@@ -21,7 +21,6 @@ from homeassistant.const import (
UnitOfTime,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import DOMAIN, APCUPSdData
@@ -496,13 +495,7 @@ class APCUPSdSensor(SensorEntity):
# Set up unique id and device info if serial number is available.
if (serial_no := data_service.serial_no) is not None:
self._attr_unique_id = f"{serial_no}_{description.key}"
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, serial_no)},
model=data_service.model,
manufacturer="APC",
hw_version=data_service.hw_version,
sw_version=data_service.sw_version,
)
self._attr_device_info = data_service.device_info
self.entity_description = description
self._data_service = data_service

View File

@@ -16,11 +16,5 @@
"description": "Enter the host and port on which the apcupsd NIS is being served."
}
}
},
"issues": {
"deprecated_yaml": {
"title": "The APC UPS Daemon YAML configuration is being removed",
"description": "Configuring APC UPS Daemon using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the APC UPS Daemon YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
}
}
}

View File

@@ -18,6 +18,7 @@ from homeassistant.const import (
URL_API,
URL_API_COMPONENTS,
URL_API_CONFIG,
URL_API_CORE_STATE,
URL_API_ERROR_LOG,
URL_API_EVENTS,
URL_API_SERVICES,
@@ -55,6 +56,7 @@ CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Register the API with the HTTP interface."""
hass.http.register_view(APIStatusView)
hass.http.register_view(APICoreStateView)
hass.http.register_view(APIEventStream)
hass.http.register_view(APIConfigView)
hass.http.register_view(APIStatesView)
@@ -84,6 +86,24 @@ class APIStatusView(HomeAssistantView):
return self.json_message("API running.")
class APICoreStateView(HomeAssistantView):
"""View to handle core state requests."""
url = URL_API_CORE_STATE
name = "api:core:state"
@ha.callback
def get(self, request: web.Request) -> web.Response:
"""Retrieve the current core state.
This API is intended to be a fast and lightweight way to check if the
Home Assistant core is running. Its primary use case is for supervisor
to check if Home Assistant is running.
"""
hass: HomeAssistant = request.app["hass"]
return self.json({"state": hass.state.value})
class APIEventStream(HomeAssistantView):
"""View to handle EventStream requests."""

View File

@@ -88,14 +88,18 @@ class AppleTVEntity(Entity):
"""Device that sends commands to an Apple TV."""
_attr_should_poll = False
_attr_has_entity_name = True
_attr_name = None
def __init__(self, name, identifier, manager):
"""Initialize device."""
self.atv = None
self.manager = manager
self._attr_name = name
self._attr_unique_id = identifier
self._attr_device_info = DeviceInfo(identifiers={(DOMAIN, identifier)})
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, identifier)},
name=name,
)
async def async_added_to_hass(self):
"""Handle when an entity is about to be added to Home Assistant."""

View File

@@ -6,7 +6,7 @@
"title": "Set up a new Apple TV",
"description": "Start by entering the device name (e.g. Kitchen or Bedroom) or IP address of the Apple TV you want to add.\n\nIf you cannot see your device or experience any issues, try specifying the device IP address.",
"data": {
"device_input": "Device"
"device_input": "[%key:common::config_flow::data::device%]"
}
},
"reconfigure": {

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/apprise",
"iot_class": "cloud_push",
"loggers": ["apprise"],
"requirements": ["apprise==1.4.0"]
"requirements": ["apprise==1.4.5"]
}

View File

@@ -1,19 +1,18 @@
"""The Aseko Pool Live integration."""
from __future__ import annotations
from datetime import timedelta
import logging
from aioaseko import APIUnavailable, MobileAccount, Unit, Variable
from aioaseko import APIUnavailable, MobileAccount
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ACCESS_TOKEN, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from .const import DOMAIN
from .coordinator import AsekoDataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
@@ -49,28 +48,3 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.data[DOMAIN].pop(entry.entry_id)
return unload_ok
class AsekoDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Variable]]):
"""Class to manage fetching Aseko unit data from single endpoint."""
def __init__(self, hass: HomeAssistant, unit: Unit) -> None:
"""Initialize global Aseko unit data updater."""
self._unit = unit
if self._unit.name:
name = self._unit.name
else:
name = f"{self._unit.type}-{self._unit.serial_number}"
super().__init__(
hass,
_LOGGER,
name=name,
update_interval=timedelta(minutes=2),
)
async def _async_update_data(self) -> dict[str, Variable]:
"""Fetch unit data."""
await self._unit.get_state()
return {variable.type: variable for variable in self._unit.variables}

View File

@@ -15,8 +15,8 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import AsekoDataUpdateCoordinator
from .const import DOMAIN
from .coordinator import AsekoDataUpdateCoordinator
from .entity import AsekoEntity
@@ -31,7 +31,7 @@ class AsekoBinarySensorDescriptionMixin:
class AsekoBinarySensorEntityDescription(
BinarySensorEntityDescription, AsekoBinarySensorDescriptionMixin
):
"""Describes a Aseko binary sensor entity."""
"""Describes an Aseko binary sensor entity."""
UNIT_BINARY_SENSORS: tuple[AsekoBinarySensorEntityDescription, ...] = (

View File

@@ -0,0 +1,37 @@
"""The Aseko Pool Live integration."""
from __future__ import annotations
from datetime import timedelta
import logging
from aioaseko import Unit, Variable
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
class AsekoDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Variable]]):
"""Class to manage fetching Aseko unit data from single endpoint."""
def __init__(self, hass: HomeAssistant, unit: Unit) -> None:
"""Initialize global Aseko unit data updater."""
self._unit = unit
if self._unit.name:
name = self._unit.name
else:
name = f"{self._unit.type}-{self._unit.serial_number}"
super().__init__(
hass,
_LOGGER,
name=name,
update_interval=timedelta(minutes=2),
)
async def _async_update_data(self) -> dict[str, Variable]:
"""Fetch unit data."""
await self._unit.get_state()
return {variable.type: variable for variable in self._unit.variables}

View File

@@ -4,8 +4,8 @@ from aioaseko import Unit
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from . import AsekoDataUpdateCoordinator
from .const import DOMAIN
from .coordinator import AsekoDataUpdateCoordinator
class AsekoEntity(CoordinatorEntity[AsekoDataUpdateCoordinator]):

View File

@@ -12,8 +12,8 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import AsekoDataUpdateCoordinator
from .const import DOMAIN
from .coordinator import AsekoDataUpdateCoordinator
from .entity import AsekoEntity
@@ -36,7 +36,7 @@ async def async_setup_entry(
class VariableSensorEntity(AsekoEntity, SensorEntity):
"""Representation of a unit variable sensor entity."""
attr_state_class = SensorStateClass.MEASUREMENT
_attr_state_class = SensorStateClass.MEASUREMENT
def __init__(
self, unit: Unit, variable: Variable, coordinator: AsekoDataUpdateCoordinator

View File

@@ -4,12 +4,12 @@ from __future__ import annotations
import asyncio
from collections.abc import AsyncIterable, Callable, Iterable
from dataclasses import asdict, dataclass, field
from enum import StrEnum
import logging
from typing import Any, cast
import voluptuous as vol
from homeassistant.backports.enum import StrEnum
from homeassistant.components import conversation, media_source, stt, tts, websocket_api
from homeassistant.components.tts.media_source import (
generate_media_source_id as tts_generate_media_source_id,

View File

@@ -2,11 +2,10 @@
from __future__ import annotations
from dataclasses import dataclass, field
from enum import StrEnum
import webrtcvad
from homeassistant.backports.enum import StrEnum
_SAMPLE_RATE = 16000

View File

@@ -111,7 +111,7 @@ async def websocket_run(
if start_stage == PipelineStage.STT:
# Audio pipeline that will receive audio as binary websocket messages
audio_queue: "asyncio.Queue[bytes]" = asyncio.Queue()
audio_queue: asyncio.Queue[bytes] = asyncio.Queue()
incoming_sample_rate = msg["input"]["sample_rate"]
async def stt_stream() -> AsyncGenerator[bytes, None]:

View File

@@ -0,0 +1,273 @@
"""aioasuswrt and pyasuswrt bridge classes."""
from __future__ import annotations
from abc import ABC, abstractmethod
from collections import namedtuple
import logging
from typing import Any, cast
from aioasuswrt.asuswrt import AsusWrt as AsusWrtLegacy
from homeassistant.const import (
CONF_HOST,
CONF_MODE,
CONF_PASSWORD,
CONF_PORT,
CONF_PROTOCOL,
CONF_USERNAME,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import format_mac
from homeassistant.helpers.update_coordinator import UpdateFailed
from .const import (
CONF_DNSMASQ,
CONF_INTERFACE,
CONF_REQUIRE_IP,
CONF_SSH_KEY,
DEFAULT_DNSMASQ,
DEFAULT_INTERFACE,
KEY_METHOD,
KEY_SENSORS,
PROTOCOL_TELNET,
SENSORS_BYTES,
SENSORS_LOAD_AVG,
SENSORS_RATES,
SENSORS_TEMPERATURES,
)
SENSORS_TYPE_BYTES = "sensors_bytes"
SENSORS_TYPE_COUNT = "sensors_count"
SENSORS_TYPE_LOAD_AVG = "sensors_load_avg"
SENSORS_TYPE_RATES = "sensors_rates"
SENSORS_TYPE_TEMPERATURES = "sensors_temperatures"
WrtDevice = namedtuple("WrtDevice", ["ip", "name", "connected_to"])
_LOGGER = logging.getLogger(__name__)
def _get_dict(keys: list, values: list) -> dict[str, Any]:
"""Create a dict from a list of keys and values."""
return dict(zip(keys, values))
class AsusWrtBridge(ABC):
"""The Base Bridge abstract class."""
@staticmethod
def get_bridge(
hass: HomeAssistant, conf: dict[str, Any], options: dict[str, Any] | None = None
) -> AsusWrtBridge:
"""Get Bridge instance."""
return AsusWrtLegacyBridge(conf, options)
def __init__(self, host: str) -> None:
"""Initialize Bridge."""
self._host = host
self._firmware: str | None = None
self._label_mac: str | None = None
self._model: str | None = None
@property
def host(self) -> str:
"""Return hostname."""
return self._host
@property
def firmware(self) -> str | None:
"""Return firmware information."""
return self._firmware
@property
def label_mac(self) -> str | None:
"""Return label mac information."""
return self._label_mac
@property
def model(self) -> str | None:
"""Return model information."""
return self._model
@property
@abstractmethod
def is_connected(self) -> bool:
"""Get connected status."""
@abstractmethod
async def async_connect(self) -> None:
"""Connect to the device."""
@abstractmethod
async def async_disconnect(self) -> None:
"""Disconnect to the device."""
@abstractmethod
async def async_get_connected_devices(self) -> dict[str, WrtDevice]:
"""Get list of connected devices."""
@abstractmethod
async def async_get_available_sensors(self) -> dict[str, dict[str, Any]]:
"""Return a dictionary of available sensors for this bridge."""
class AsusWrtLegacyBridge(AsusWrtBridge):
"""The Bridge that use legacy library."""
def __init__(
self, conf: dict[str, Any], options: dict[str, Any] | None = None
) -> None:
"""Initialize Bridge."""
super().__init__(conf[CONF_HOST])
self._protocol: str = conf[CONF_PROTOCOL]
self._api: AsusWrtLegacy = self._get_api(conf, options)
@staticmethod
def _get_api(
conf: dict[str, Any], options: dict[str, Any] | None = None
) -> AsusWrtLegacy:
"""Get the AsusWrtLegacy API."""
opt = options or {}
return AsusWrtLegacy(
conf[CONF_HOST],
conf.get(CONF_PORT),
conf[CONF_PROTOCOL] == PROTOCOL_TELNET,
conf[CONF_USERNAME],
conf.get(CONF_PASSWORD, ""),
conf.get(CONF_SSH_KEY, ""),
conf[CONF_MODE],
opt.get(CONF_REQUIRE_IP, True),
interface=opt.get(CONF_INTERFACE, DEFAULT_INTERFACE),
dnsmasq=opt.get(CONF_DNSMASQ, DEFAULT_DNSMASQ),
)
@property
def is_connected(self) -> bool:
"""Get connected status."""
return cast(bool, self._api.is_connected)
async def async_connect(self) -> None:
"""Connect to the device."""
await self._api.connection.async_connect()
# get main router properties
if self._label_mac is None:
await self._get_label_mac()
if self._firmware is None:
await self._get_firmware()
if self._model is None:
await self._get_model()
async def async_disconnect(self) -> None:
"""Disconnect to the device."""
if self._api is not None and self._protocol == PROTOCOL_TELNET:
self._api.connection.disconnect()
async def async_get_connected_devices(self) -> dict[str, WrtDevice]:
"""Get list of connected devices."""
try:
api_devices = await self._api.async_get_connected_devices()
except OSError as exc:
raise UpdateFailed(exc) from exc
return {
format_mac(mac): WrtDevice(dev.ip, dev.name, None)
for mac, dev in api_devices.items()
}
async def _get_nvram_info(self, info_type: str) -> dict[str, Any]:
"""Get AsusWrt router info from nvram."""
info = {}
try:
info = await self._api.async_get_nvram(info_type)
except OSError as exc:
_LOGGER.warning(
"Error calling method async_get_nvram(%s): %s", info_type, exc
)
return info
async def _get_label_mac(self) -> None:
"""Get label mac information."""
label_mac = await self._get_nvram_info("LABEL_MAC")
if label_mac and "label_mac" in label_mac:
self._label_mac = format_mac(label_mac["label_mac"])
async def _get_firmware(self) -> None:
"""Get firmware information."""
firmware = await self._get_nvram_info("FIRMWARE")
if firmware and "firmver" in firmware:
firmver: str = firmware["firmver"]
if "buildno" in firmware:
firmver += f" (build {firmware['buildno']})"
self._firmware = firmver
async def _get_model(self) -> None:
"""Get model information."""
model = await self._get_nvram_info("MODEL")
if model and "model" in model:
self._model = model["model"]
async def async_get_available_sensors(self) -> dict[str, dict[str, Any]]:
"""Return a dictionary of available sensors for this bridge."""
sensors_temperatures = await self._get_available_temperature_sensors()
sensors_types = {
SENSORS_TYPE_BYTES: {
KEY_SENSORS: SENSORS_BYTES,
KEY_METHOD: self._get_bytes,
},
SENSORS_TYPE_LOAD_AVG: {
KEY_SENSORS: SENSORS_LOAD_AVG,
KEY_METHOD: self._get_load_avg,
},
SENSORS_TYPE_RATES: {
KEY_SENSORS: SENSORS_RATES,
KEY_METHOD: self._get_rates,
},
SENSORS_TYPE_TEMPERATURES: {
KEY_SENSORS: sensors_temperatures,
KEY_METHOD: self._get_temperatures,
},
}
return sensors_types
async def _get_available_temperature_sensors(self) -> list[str]:
"""Check which temperature information is available on the router."""
availability = await self._api.async_find_temperature_commands()
return [SENSORS_TEMPERATURES[i] for i in range(3) if availability[i]]
async def _get_bytes(self) -> dict[str, Any]:
"""Fetch byte information from the router."""
try:
datas = await self._api.async_get_bytes_total()
except (IndexError, OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return _get_dict(SENSORS_BYTES, datas)
async def _get_rates(self) -> dict[str, Any]:
"""Fetch rates information from the router."""
try:
rates = await self._api.async_get_current_transfer_rates()
except (IndexError, OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return _get_dict(SENSORS_RATES, rates)
async def _get_load_avg(self) -> dict[str, Any]:
"""Fetch load average information from the router."""
try:
avg = await self._api.async_get_loadavg()
except (IndexError, OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return _get_dict(SENSORS_LOAD_AVG, avg)
async def _get_temperatures(self) -> dict[str, Any]:
"""Fetch temperatures information from the router."""
try:
temperatures: dict[str, Any] = await self._api.async_get_temperature()
except (OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return temperatures

View File

@@ -25,13 +25,13 @@ from homeassistant.const import (
from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.device_registry import format_mac
from homeassistant.helpers.schema_config_entry_flow import (
SchemaCommonFlowHandler,
SchemaFlowFormStep,
SchemaOptionsFlowHandler,
)
from .bridge import AsusWrtBridge
from .const import (
CONF_DNSMASQ,
CONF_INTERFACE,
@@ -47,7 +47,6 @@ from .const import (
PROTOCOL_SSH,
PROTOCOL_TELNET,
)
from .router import get_api, get_nvram_info
LABEL_MAC = "LABEL_MAC"
@@ -143,16 +142,15 @@ class AsusWrtFlowHandler(ConfigFlow, domain=DOMAIN):
errors=errors or {},
)
@staticmethod
async def _async_check_connection(
user_input: dict[str, Any]
self, user_input: dict[str, Any]
) -> tuple[str, str | None]:
"""Attempt to connect the AsusWrt router."""
host: str = user_input[CONF_HOST]
api = get_api(user_input)
api = AsusWrtBridge.get_bridge(self.hass, user_input)
try:
await api.connection.async_connect()
await api.async_connect()
except OSError:
_LOGGER.error("Error connecting to the AsusWrt router at %s", host)
@@ -168,14 +166,9 @@ class AsusWrtFlowHandler(ConfigFlow, domain=DOMAIN):
_LOGGER.error("Error connecting to the AsusWrt router at %s", host)
return RESULT_CONN_ERROR, None
label_mac = await get_nvram_info(api, LABEL_MAC)
conf_protocol = user_input[CONF_PROTOCOL]
if conf_protocol == PROTOCOL_TELNET:
api.connection.disconnect()
unique_id = api.label_mac
await api.async_disconnect()
unique_id = None
if label_mac and "label_mac" in label_mac:
unique_id = format_mac(label_mac["label_mac"])
return RESULT_SUCCESS, unique_id
async def async_step_user(

View File

@@ -13,6 +13,10 @@ DEFAULT_DNSMASQ = "/var/lib/misc"
DEFAULT_INTERFACE = "eth0"
DEFAULT_TRACK_UNKNOWN = False
KEY_COORDINATOR = "coordinator"
KEY_METHOD = "method"
KEY_SENSORS = "sensors"
MODE_AP = "ap"
MODE_ROUTER = "router"

View File

@@ -6,22 +6,12 @@ from datetime import datetime, timedelta
import logging
from typing import Any
from aioasuswrt.asuswrt import AsusWrt, Device as WrtDevice
from homeassistant.components.device_tracker import (
CONF_CONSIDER_HOME,
DEFAULT_CONSIDER_HOME,
DOMAIN as TRACKER_DOMAIN,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_HOST,
CONF_MODE,
CONF_PASSWORD,
CONF_PORT,
CONF_PROTOCOL,
CONF_USERNAME,
)
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import entity_registry as er
@@ -30,57 +20,37 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from homeassistant.util import dt as dt_util
from homeassistant.util import dt as dt_util, slugify
from .bridge import AsusWrtBridge, WrtDevice
from .const import (
CONF_DNSMASQ,
CONF_INTERFACE,
CONF_REQUIRE_IP,
CONF_SSH_KEY,
CONF_TRACK_UNKNOWN,
DEFAULT_DNSMASQ,
DEFAULT_INTERFACE,
DEFAULT_TRACK_UNKNOWN,
DOMAIN,
PROTOCOL_TELNET,
SENSORS_BYTES,
KEY_COORDINATOR,
KEY_METHOD,
KEY_SENSORS,
SENSORS_CONNECTED_DEVICE,
SENSORS_LOAD_AVG,
SENSORS_RATES,
SENSORS_TEMPERATURES,
)
CONF_REQ_RELOAD = [CONF_DNSMASQ, CONF_INTERFACE, CONF_REQUIRE_IP]
DEFAULT_NAME = "Asuswrt"
KEY_COORDINATOR = "coordinator"
KEY_SENSORS = "sensors"
SCAN_INTERVAL = timedelta(seconds=30)
SENSORS_TYPE_BYTES = "sensors_bytes"
SENSORS_TYPE_COUNT = "sensors_count"
SENSORS_TYPE_LOAD_AVG = "sensors_load_avg"
SENSORS_TYPE_RATES = "sensors_rates"
SENSORS_TYPE_TEMPERATURES = "sensors_temperatures"
_LOGGER = logging.getLogger(__name__)
def _get_dict(keys: list, values: list) -> dict[str, Any]:
"""Create a dict from a list of keys and values."""
ret_dict: dict[str, Any] = dict.fromkeys(keys)
for index, key in enumerate(ret_dict):
ret_dict[key] = values[index]
return ret_dict
class AsusWrtSensorDataHandler:
"""Data handler for AsusWrt sensor."""
def __init__(self, hass: HomeAssistant, api: AsusWrt) -> None:
def __init__(self, hass: HomeAssistant, api: AsusWrtBridge) -> None:
"""Initialize a AsusWrt sensor data handler."""
self._hass = hass
self._api = api
@@ -90,42 +60,6 @@ class AsusWrtSensorDataHandler:
"""Return number of connected devices."""
return {SENSORS_CONNECTED_DEVICE[0]: self._connected_devices}
async def _get_bytes(self) -> dict[str, Any]:
"""Fetch byte information from the router."""
try:
datas = await self._api.async_get_bytes_total()
except (OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return _get_dict(SENSORS_BYTES, datas)
async def _get_rates(self) -> dict[str, Any]:
"""Fetch rates information from the router."""
try:
rates = await self._api.async_get_current_transfer_rates()
except (OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return _get_dict(SENSORS_RATES, rates)
async def _get_load_avg(self) -> dict[str, Any]:
"""Fetch load average information from the router."""
try:
avg = await self._api.async_get_loadavg()
except (OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return _get_dict(SENSORS_LOAD_AVG, avg)
async def _get_temperatures(self) -> dict[str, Any]:
"""Fetch temperatures information from the router."""
try:
temperatures: dict[str, Any] = await self._api.async_get_temperature()
except (OSError, ValueError) as exc:
raise UpdateFailed(exc) from exc
return temperatures
def update_device_count(self, conn_devices: int) -> bool:
"""Update connected devices attribute."""
if self._connected_devices == conn_devices:
@@ -134,19 +68,17 @@ class AsusWrtSensorDataHandler:
return True
async def get_coordinator(
self, sensor_type: str, should_poll: bool = True
self,
sensor_type: str,
update_method: Callable[[], Any] | None = None,
) -> DataUpdateCoordinator:
"""Get the coordinator for a specific sensor type."""
should_poll = True
if sensor_type == SENSORS_TYPE_COUNT:
should_poll = False
method = self._get_connected_devices
elif sensor_type == SENSORS_TYPE_BYTES:
method = self._get_bytes
elif sensor_type == SENSORS_TYPE_LOAD_AVG:
method = self._get_load_avg
elif sensor_type == SENSORS_TYPE_RATES:
method = self._get_rates
elif sensor_type == SENSORS_TYPE_TEMPERATURES:
method = self._get_temperatures
elif update_method is not None:
method = update_method
else:
raise RuntimeError(f"Invalid sensor type: {sensor_type}")
@@ -226,12 +158,6 @@ class AsusWrtRouter:
self.hass = hass
self._entry = entry
self._api: AsusWrt = None
self._protocol: str = entry.data[CONF_PROTOCOL]
self._host: str = entry.data[CONF_HOST]
self._model: str = "Asus Router"
self._sw_v: str | None = None
self._devices: dict[str, AsusWrtDevInfo] = {}
self._connected_devices: int = 0
self._connect_error: bool = False
@@ -248,26 +174,57 @@ class AsusWrtRouter:
}
self._options.update(entry.options)
self._api: AsusWrtBridge = AsusWrtBridge.get_bridge(
self.hass, dict(self._entry.data), self._options
)
def _migrate_entities_unique_id(self) -> None:
"""Migrate router entities to new unique id format."""
_ENTITY_MIGRATION_ID = {
"sensor_connected_device": "Devices Connected",
"sensor_rx_bytes": "Download",
"sensor_tx_bytes": "Upload",
"sensor_rx_rates": "Download Speed",
"sensor_tx_rates": "Upload Speed",
"sensor_load_avg1": "Load Avg (1m)",
"sensor_load_avg5": "Load Avg (5m)",
"sensor_load_avg15": "Load Avg (15m)",
"2.4GHz": "2.4GHz Temperature",
"5.0GHz": "5GHz Temperature",
"CPU": "CPU Temperature",
}
entity_reg = er.async_get(self.hass)
router_entries = er.async_entries_for_config_entry(
entity_reg, self._entry.entry_id
)
migrate_entities: dict[str, str] = {}
for entry in router_entries:
if entry.domain == TRACKER_DOMAIN:
continue
old_unique_id = entry.unique_id
if not old_unique_id.startswith(DOMAIN):
continue
for new_id, old_id in _ENTITY_MIGRATION_ID.items():
if old_unique_id.endswith(old_id):
migrate_entities[entry.entity_id] = slugify(
f"{self.unique_id}_{new_id}"
)
break
for entity_id, unique_id in migrate_entities.items():
entity_reg.async_update_entity(entity_id, new_unique_id=unique_id)
async def setup(self) -> None:
"""Set up a AsusWrt router."""
self._api = get_api(dict(self._entry.data), self._options)
try:
await self._api.connection.async_connect()
except OSError as exp:
raise ConfigEntryNotReady from exp
await self._api.async_connect()
except OSError as exc:
raise ConfigEntryNotReady from exc
if not self._api.is_connected:
raise ConfigEntryNotReady
# System
model = await get_nvram_info(self._api, "MODEL")
if model and "model" in model:
self._model = model["model"]
firmware = await get_nvram_info(self._api, "FIRMWARE")
if firmware and "firmver" in firmware and "buildno" in firmware:
self._sw_v = f"{firmware['firmver']} (build {firmware['buildno']})"
# Load tracked entities from registry
entity_reg = er.async_get(self.hass)
track_entries = er.async_entries_for_config_entry(
@@ -295,6 +252,9 @@ class AsusWrtRouter:
self._devices[device_mac] = AsusWrtDevInfo(device_mac, entry.original_name)
# Migrate entities to new unique id format
self._migrate_entities_unique_id()
# Update devices
await self.update_devices()
@@ -312,24 +272,24 @@ class AsusWrtRouter:
async def update_devices(self) -> None:
"""Update AsusWrt devices tracker."""
new_device = False
_LOGGER.debug("Checking devices for ASUS router %s", self._host)
_LOGGER.debug("Checking devices for ASUS router %s", self.host)
try:
api_devices = await self._api.async_get_connected_devices()
except OSError as exc:
wrt_devices = await self._api.async_get_connected_devices()
except UpdateFailed as exc:
if not self._connect_error:
self._connect_error = True
_LOGGER.error(
"Error connecting to ASUS router %s for device update: %s",
self._host,
self.host,
exc,
)
return
if self._connect_error:
self._connect_error = False
_LOGGER.info("Reconnected to ASUS router %s", self._host)
_LOGGER.info("Reconnected to ASUS router %s", self.host)
self._connected_devices = len(api_devices)
self._connected_devices = len(wrt_devices)
consider_home: int = self._options.get(
CONF_CONSIDER_HOME, DEFAULT_CONSIDER_HOME.total_seconds()
)
@@ -337,7 +297,6 @@ class AsusWrtRouter:
CONF_TRACK_UNKNOWN, DEFAULT_TRACK_UNKNOWN
)
wrt_devices = {format_mac(mac): dev for mac, dev in api_devices.items()}
for device_mac, device in self._devices.items():
dev_info = wrt_devices.pop(device_mac, None)
device.update(dev_info, consider_home)
@@ -363,19 +322,14 @@ class AsusWrtRouter:
self._sensors_data_handler = AsusWrtSensorDataHandler(self.hass, self._api)
self._sensors_data_handler.update_device_count(self._connected_devices)
sensors_types: dict[str, list[str]] = {
SENSORS_TYPE_BYTES: SENSORS_BYTES,
SENSORS_TYPE_COUNT: SENSORS_CONNECTED_DEVICE,
SENSORS_TYPE_LOAD_AVG: SENSORS_LOAD_AVG,
SENSORS_TYPE_RATES: SENSORS_RATES,
SENSORS_TYPE_TEMPERATURES: await self._get_available_temperature_sensors(),
}
sensors_types = await self._api.async_get_available_sensors()
sensors_types[SENSORS_TYPE_COUNT] = {KEY_SENSORS: SENSORS_CONNECTED_DEVICE}
for sensor_type, sensor_names in sensors_types.items():
if not sensor_names:
for sensor_type, sensor_def in sensors_types.items():
if not (sensor_names := sensor_def.get(KEY_SENSORS)):
continue
coordinator = await self._sensors_data_handler.get_coordinator(
sensor_type, sensor_type != SENSORS_TYPE_COUNT
sensor_type, update_method=sensor_def.get(KEY_METHOD)
)
self._sensors_coordinator[sensor_type] = {
KEY_COORDINATOR: coordinator,
@@ -392,31 +346,10 @@ class AsusWrtRouter:
if self._sensors_data_handler.update_device_count(self._connected_devices):
await coordinator.async_refresh()
async def _get_available_temperature_sensors(self) -> list[str]:
"""Check which temperature information is available on the router."""
try:
availability = await self._api.async_find_temperature_commands()
available_sensors = [
SENSORS_TEMPERATURES[i] for i in range(3) if availability[i]
]
except Exception as exc: # pylint: disable=broad-except
_LOGGER.debug(
(
"Failed checking temperature sensor availability for ASUS router"
" %s. Exception: %s"
),
self._host,
exc,
)
return []
return available_sensors
async def close(self) -> None:
"""Close the connection."""
if self._api is not None and self._protocol == PROTOCOL_TELNET:
self._api.connection.disconnect()
self._api = None
if self._api is not None:
await self._api.async_disconnect()
for func in self._on_close:
func()
@@ -443,14 +376,17 @@ class AsusWrtRouter:
@property
def device_info(self) -> DeviceInfo:
"""Return the device information."""
return DeviceInfo(
identifiers={(DOMAIN, self.unique_id or "AsusWRT")},
name=self._host,
model=self._model,
info = DeviceInfo(
identifiers={(DOMAIN, self._entry.unique_id or "AsusWRT")},
name=self.host,
model=self._api.model or "Asus Router",
manufacturer="Asus",
sw_version=self._sw_v,
configuration_url=f"http://{self._host}",
configuration_url=f"http://{self.host}",
)
if self._api.firmware:
info["sw_version"] = self._api.firmware
return info
@property
def signal_device_new(self) -> str:
@@ -465,17 +401,12 @@ class AsusWrtRouter:
@property
def host(self) -> str:
"""Return router hostname."""
return self._host
return self._api.host
@property
def unique_id(self) -> str | None:
def unique_id(self) -> str:
"""Return router unique id."""
return self._entry.unique_id
@property
def name(self) -> str:
"""Return router name."""
return self._host if self.unique_id else DEFAULT_NAME
return self._entry.unique_id or self._entry.entry_id
@property
def devices(self) -> dict[str, AsusWrtDevInfo]:
@@ -486,32 +417,3 @@ class AsusWrtRouter:
def sensors_coordinator(self) -> dict[str, Any]:
"""Return sensors coordinators."""
return self._sensors_coordinator
async def get_nvram_info(api: AsusWrt, info_type: str) -> dict[str, Any]:
"""Get AsusWrt router info from nvram."""
info = {}
try:
info = await api.async_get_nvram(info_type)
except OSError as exc:
_LOGGER.warning("Error calling method async_get_nvram(%s): %s", info_type, exc)
return info
def get_api(conf: dict[str, Any], options: dict[str, Any] | None = None) -> AsusWrt:
"""Get the AsusWrt API."""
opt = options or {}
return AsusWrt(
conf[CONF_HOST],
conf.get(CONF_PORT),
conf[CONF_PROTOCOL] == PROTOCOL_TELNET,
conf[CONF_USERNAME],
conf.get(CONF_PASSWORD, ""),
conf.get(CONF_SSH_KEY, ""),
conf[CONF_MODE],
opt.get(CONF_REQUIRE_IP, True),
interface=opt.get(CONF_INTERFACE, DEFAULT_INTERFACE),
dnsmasq=opt.get(CONF_DNSMASQ, DEFAULT_DNSMASQ),
)

View File

@@ -22,17 +22,20 @@ from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
DataUpdateCoordinator,
)
from homeassistant.util import slugify
from .const import (
DATA_ASUSWRT,
DOMAIN,
KEY_COORDINATOR,
KEY_SENSORS,
SENSORS_BYTES,
SENSORS_CONNECTED_DEVICE,
SENSORS_LOAD_AVG,
SENSORS_RATES,
SENSORS_TEMPERATURES,
)
from .router import KEY_COORDINATOR, KEY_SENSORS, AsusWrtRouter
from .router import AsusWrtRouter
@dataclass
@@ -47,14 +50,14 @@ UNIT_DEVICES = "Devices"
CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
AsusWrtSensorEntityDescription(
key=SENSORS_CONNECTED_DEVICE[0],
name="Devices Connected",
translation_key="devices_connected",
icon="mdi:router-network",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UNIT_DEVICES,
),
AsusWrtSensorEntityDescription(
key=SENSORS_RATES[0],
name="Download Speed",
translation_key="download_speed",
icon="mdi:download-network",
device_class=SensorDeviceClass.DATA_RATE,
state_class=SensorStateClass.MEASUREMENT,
@@ -65,7 +68,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_RATES[1],
name="Upload Speed",
translation_key="upload_speed",
icon="mdi:upload-network",
device_class=SensorDeviceClass.DATA_RATE,
state_class=SensorStateClass.MEASUREMENT,
@@ -76,7 +79,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_BYTES[0],
name="Download",
translation_key="download",
icon="mdi:download",
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.GIGABYTES,
@@ -87,7 +90,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_BYTES[1],
name="Upload",
translation_key="upload",
icon="mdi:upload",
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.GIGABYTES,
@@ -98,7 +101,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_LOAD_AVG[0],
name="Load Avg (1m)",
translation_key="load_avg_1m",
icon="mdi:cpu-32-bit",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
@@ -107,7 +110,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_LOAD_AVG[1],
name="Load Avg (5m)",
translation_key="load_avg_5m",
icon="mdi:cpu-32-bit",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
@@ -116,7 +119,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_LOAD_AVG[2],
name="Load Avg (15m)",
translation_key="load_avg_15m",
icon="mdi:cpu-32-bit",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
@@ -125,7 +128,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_TEMPERATURES[0],
name="2.4GHz Temperature",
translation_key="24ghz_temperature",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
@@ -135,7 +138,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_TEMPERATURES[1],
name="5GHz Temperature",
translation_key="5ghz_temperature",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
@@ -145,7 +148,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
),
AsusWrtSensorEntityDescription(
key=SENSORS_TEMPERATURES[2],
name="CPU Temperature",
translation_key="cpu_temperature",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
@@ -180,6 +183,9 @@ async def async_setup_entry(
class AsusWrtSensor(CoordinatorEntity, SensorEntity):
"""Representation of a AsusWrt sensor."""
entity_description: AsusWrtSensorEntityDescription
_attr_has_entity_name = True
def __init__(
self,
coordinator: DataUpdateCoordinator,
@@ -188,13 +194,9 @@ class AsusWrtSensor(CoordinatorEntity, SensorEntity):
) -> None:
"""Initialize a AsusWrt sensor."""
super().__init__(coordinator)
self.entity_description: AsusWrtSensorEntityDescription = description
self.entity_description = description
self._attr_name = f"{router.name} {description.name}"
if router.unique_id:
self._attr_unique_id = f"{DOMAIN} {router.unique_id} {description.name}"
else:
self._attr_unique_id = f"{DOMAIN} {self.name}"
self._attr_unique_id = slugify(f"{router.unique_id}_{description.key}")
self._attr_device_info = router.device_info
self._attr_extra_state_attributes = {"hostname": router.host}

View File

@@ -36,11 +36,48 @@
"data": {
"consider_home": "Seconds to wait before considering a device away",
"track_unknown": "Track unknown / unnamed devices",
"interface": "The interface that you want statistics from (e.g. eth0,eth1 etc)",
"interface": "The interface that you want statistics from (e.g. eth0, eth1 etc)",
"dnsmasq": "The location in the router of the dnsmasq.leases files",
"require_ip": "Devices must have IP (for access point mode)"
}
}
}
},
"entity": {
"sensor": {
"devices_connected": {
"name": "Devices connected"
},
"download_speed": {
"name": "Download speed"
},
"upload_speed": {
"name": "Upload speed"
},
"download": {
"name": "Download"
},
"upload": {
"name": "Upload"
},
"load_avg_1m": {
"name": "Average load (1m)"
},
"load_avg_5m": {
"name": "Average load (5m)"
},
"load_avg_15m": {
"name": "Average load (15m)"
},
"24ghz_temperature": {
"name": "2.4GHz Temperature"
},
"5ghz_temperature": {
"name": "5GHz Temperature"
},
"cpu_temperature": {
"name": "CPU Temperature"
}
}
}
}

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