Compare commits

..

1461 Commits

Author SHA1 Message Date
Erik
dd15059cfb Improve type annotations 2023-06-26 23:28:39 +02:00
Erik
c71768445b Improve type annotations 2023-06-26 23:11:38 +02:00
Erik
96a276a30c Add backport of cached_property from CPython 3.12 2023-06-26 20:26:27 +02:00
Erik Montnemery
89c9e72768 Use entity registry id in alarm_control_panel device actions (#95241) 2023-06-26 16:59:43 +02:00
Erik Montnemery
8e2ba81995 Add image platform to the template integration (#94928)
* Add image platform to the template integration

* Set a default name

* Fix typo

* Add tests

* Improve test coverage

* Derive content-type from fetched image
2023-06-26 15:54:51 +02:00
Erik Montnemery
8fda56d2c9 Stable entity registry id when a deleted entity is restored (#77710)
* Stable entity_id and registry id when a deleted entity is restored

* Don't restore area_id

* Don't restore entity_id

* Address review comments
2023-06-26 15:54:35 +02:00
Nalin Mahajan
f08f0fbb8b Fix control4 light switches on OS 3.3+ (#95196) 2023-06-26 15:49:44 +02:00
Franck Nijhof
5bd5ca8433 Add identify device class to button (#95244) 2023-06-26 15:46:37 +02:00
Jan Bouwhuis
1029bcbbd3 Add mqtt image platform (#94769)
* Add mqtt image platform

* Follow up comments

* Use separate topics

* Set last_ image to `None` on error

* Fix encoding and schema validation

* Assing None to last_image when get image fails

* Follow up comment

* Remove content_type validation

* Add validation

* Rename options according suggestions

* Remove url_topic / template feature from PR

* Always set content_type
2023-06-26 14:42:24 +02:00
Joost Lekkerkerker
7dae17a404 Add entity translations to Dremel 3D printer (#95234) 2023-06-26 14:37:04 +02:00
Pascal Vizeli
c75e831b65 Cosign support (#95236) 2023-06-26 14:32:02 +02:00
Dan
45ff9d8f63 Allow rounding two decimal places for Flume usage sensors (#95219) 2023-06-26 14:31:28 +02:00
Paulus Schoutsen
a31e899741 Pass correct parameter when resolving media via WS (#90897) 2023-06-26 14:24:12 +02:00
J. Nick Koston
021a39a09c Make deep sleep esphome entities unavailable on unexpected disconnect (#95211) 2023-06-26 14:21:45 +02:00
Joost Lekkerkerker
5a98155700 Add entity translations for EasyEnergy (#95235) 2023-06-26 14:17:15 +02:00
Joost Lekkerkerker
d14f04eb7e Move Aurora coordinator to separate file (#95130) 2023-06-26 12:52:31 +02:00
Marc Mueller
8ccb0c3e14 Update types packages (#95222) 2023-06-26 12:49:18 +02:00
J. Nick Koston
ad17a89531 Add additional coverage for ESPHome sensor and number (#95226) 2023-06-26 12:29:38 +02:00
Álvaro Fernández Rojas
74fb1ba51d Update aioairzone-cloud to v0.1.9 (#95155) 2023-06-26 12:02:32 +02:00
Erik Montnemery
a338e7e242 Use entity registry id in toggle_entity device automations (#94995)
* Use entity registry id in toggle_entity device automations

* Update tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-26 09:59:01 +02:00
Marc Mueller
408c613731 Update mypy to 1.4.1 (#95220) 2023-06-25 21:32:06 -05:00
J. Nick Koston
3b7095c63b Fix esphome not removing entities when static info changes (#95202)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-25 21:31:31 -05:00
Kevin Cathcart
d700415045 Support notification_id in notify.persistent_notification (#74822)
* Support notification_id in notify.persistent_notification

* Apply suggestions from code review

Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>
2023-06-25 22:25:58 -04:00
J. Nick Koston
85d6e03dd3 Require newly configured esphome device to allow Home Assistant service calls (#95143)
* Require esphome service calls to be enabled

For existing devices, calling Home Assistant services continues
to be allowed.

For newly configured devices, it must now be enabled in the options
flow

* fix

* adjust

* coverage

* adjust

* fix test

* Update homeassistant/components/esphome/strings.json

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

* Update homeassistant/components/esphome/strings.json

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

* Update homeassistant/components/esphome/strings.json

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

* Update homeassistant/components/esphome/__init__.py

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

* Update homeassistant/components/esphome/__init__.py

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

* Update homeassistant/components/esphome/__init__.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-25 21:18:21 -04:00
Matthias Alphart
f4756fe1f9 Update xknx to 2.11.0: Add support for Light DPT 9 color temperature (#95213)
Update xknx to 2.11.0
2023-06-25 21:05:35 -04:00
Allen Porter
1d9821efa2 Fix spelling mistake in script.py (#95210)
Update script.py
2023-06-25 21:00:50 -04:00
J. Nick Koston
c1045d6c82 Fix hass_storage not clearing task (#95209)
hass_storage would never allow another load if the
no data path was hit

discovered while writing tests for https://github.com/home-assistant/core/pull/95202
2023-06-25 19:54:02 -04:00
Maciej Bieniek
62e518badb Add new attributes to OpenWeatherMap weather entity (#95173)
* Add new attrs to current condition

* Add new attrs to forecast
2023-06-25 16:30:59 +02:00
G Johansson
67586caaf9 Cleanup ping (#95168) 2023-06-25 09:00:52 -05:00
J. Nick Koston
9051750add Cache entity translation lookups and keys (#95180) 2023-06-25 08:50:48 -05:00
Matthias Alphart
2ce23c17ca Update KNX frontend - add Group monitor telegram detail view (#95144)
* Use TelegramDict for WS communication

* Update knx_frontend
2023-06-25 14:58:08 +02:00
Joost Lekkerkerker
f84887d5f8 Use device class translations for Coolmaster (#95182) 2023-06-25 13:10:37 +02:00
Joost Lekkerkerker
dffe468ceb Use device class translations for Broadlink (#95183) 2023-06-25 13:01:22 +02:00
Joost Lekkerkerker
58ddd17495 Add entity translations to Deluge (#95184)
* Add entity translations to Deluge

* Update sensor.py

* Fix black
2023-06-25 12:59:04 +02:00
Allen Porter
528c206094 Add script specific error messages for response_variable (#95188) 2023-06-24 21:34:57 -07:00
J. Nick Koston
ef2e55ecec Add dual IP stack support to HomeKit (#94126)
* Add dual IP stack support to HomeKit

* fix tests

* Update homeassistant/components/network/__init__.py

* remove scopes

* Bump HAP-python to 4.7.0

fixes pairing with newer iOS

changelog: https://github.com/ikalchev/HAP-python/compare/v4.6.0...4.7.0

* fixes

* update tests

* Relocate get_announced_addresses from zeroconf to network

needed for #94126

* rename

* rename

* Update homeassistant/components/network/__init__.py

* Update homeassistant/components/network/__init__.py

* rename

* fix import

* coverage
2023-06-24 23:18:38 -04:00
J. Nick Koston
57a910a144 Relocate esphome entity code into its own module (#95092) 2023-06-24 23:12:36 -04:00
J. Nick Koston
79f9a8a257 Add test coverage for esphome lock platform (#95023) 2023-06-24 23:10:47 -04:00
J. Nick Koston
9eedc8a602 Fix esphome binary sensors when state is missing (#95140)
* Fix esphome binary sensors when state is missing

* Fix esphome binary sensors when state is missing

* Fix esphome binary sensors when state is missing
2023-06-24 23:09:26 -04:00
J. Nick Koston
c6b3d538de Remove deprecated non-native number support (#95178)
* Remove deprecated non-native number support

These were scheduled to be removed in 2022.10 but were left
in to give custom component authors a bit more time.

Its been a year since they were deprecated so its time
to remove the old code

https://developers.home-assistant.io/blog/2022/06/14/number_entity_refactoring/

* strip unneeded change from testing
2023-06-24 23:01:44 -04:00
Joost Lekkerkerker
fa334cf2bd Add entity translations to Big Ass Fans (#95136) 2023-06-24 19:00:20 -05:00
J. Nick Koston
c8430e4557 Bump aiooncue to 0.3.5 (#95148) 2023-06-24 15:12:02 -05:00
J. Nick Koston
74d342a000 Bump sense-energy to 0.12.0 (#95151) 2023-06-24 15:11:13 -05:00
J. Nick Koston
3ea26efac9 Retry solaredge on socket.gaierror (#95153) 2023-06-24 15:10:54 -05:00
J. Nick Koston
5059cee53f Reduce overhead to fire events (#95163) 2023-06-24 14:39:13 -05:00
J. Nick Koston
9354df975c Reduce overhead to set up and write entity state (#95162) 2023-06-24 14:16:28 -05:00
J. Nick Koston
7c49324f18 Bump aioesphomeapi to 14.1.1 (#95166) 2023-06-24 14:15:51 -05:00
Joost Lekkerkerker
e4a7c57b81 Use device class translations for Airly (#95115)
* Use device class translations for Airly

* Use device class translations for Airly

* Use device class translations for Airly
2023-06-24 13:13:36 +02:00
Franck Nijhof
a2f9caa482 Clean up device class based entity translations in Elgato (#95122)
* Clean up device class based entity translations in Elgato

* Update snapshots
2023-06-24 12:45:47 +02:00
Maciej Bieniek
fe9366eee6 Add new properties to the weather entity in Accuweather integration (#95110)
* Add new properties to the current conditions

* Add new properties to forecast

* Use existing constants

* Update tests
2023-06-24 12:38:20 +02:00
Allen Porter
b9b5fe6be8 Add service response data for listing calendar events (#94759)
* Add service response data for listing calendar events

Add the capability of response data for for the entity component.

* Rename input arguments and add service description

* Improve list events to be more user friendly

Allow the end date to be determined based on a relative time duration. Make the start time optional and set to "now". Add additional test coverage. Update demo calendar to actually perform date range checks.

* Wrap docstrings properly.

* Increase test coverage

* Update to use new API calls

* Readability improvements

* Wrap docstrings

* Require at least one of end or duration

* Check for multiple entity matches earlier in the request

* Update documentation strings
2023-06-23 23:34:34 -04:00
Michael Hansen
65454c945d Add VAD sensitivity option to VoIP devices (#94688)
* Add VAD sensitivity option to VoIP devices

* Use select entitiy for VAD sensitivity

* Add sensitivity to tests

* Add to assist pipeline tests

* Update homeassistant/components/assist_pipeline/select.py

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

* Update tests/components/voip/test_voip.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-23 23:28:13 -04:00
Paulus Schoutsen
c42d0feec1 Allow passing in device_id to pipeline run WS API (#95139) 2023-06-23 21:29:56 -05:00
Paulus Schoutsen
3f10233833 Add return value to conversation.process service (#94740)
* Add return value to conversation.process service

* Adjust for new API
2023-06-23 13:32:03 -04:00
dougiteixeira
00075520c2 Add volatile_organic_compounds_parts to device class selector strings for Scrape (#95128)
Add  to device class selector strings for Scrape
2023-06-23 18:48:29 +02:00
Franck Nijhof
31a2b2e3a9 Clean up device class based entity translations in Rituals Perfume Genie (#95124) 2023-06-23 17:24:57 +02:00
Álvaro Fernández Rojas
cd66da0ab1 Add Airzone Cloud Binary Sensors support (#93583)
* airzone_cloud: add Binary Sensors support

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

* airzone_cloud: binary_sensor: fix copy&paste

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

* airzone_cloud: remote available attribute

This is not working as expected and will require minor library changes.

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

* airzone_cloud: binary_sensor: remove unique_id

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

* airzone_cloud: binary_sensors: remove name

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

* airzone_cloud: use entity_name

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

* airzone_cloud: binary_sensor: add name=None

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

* airzone_cloud: binary_sensor: fix device class name

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

* Update homeassistant/components/airzone_cloud/binary_sensor.py

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-06-23 16:32:40 +02:00
starkillerOG
2702124130 Motion blinds improve async_request_position_till_stop (#93304) 2023-06-23 16:26:34 +02:00
J. Nick Koston
85a9654e52 Remove signal strength device class from hunterdouglas_powerview (#95113) 2023-06-23 16:11:19 +02:00
Joost Lekkerkerker
8fd930ba87 Handle LastFM unavailable (#94456) 2023-06-23 15:34:37 +02:00
Franck Nijhof
4255cd6bbc Remove invalid Signal Strength device class from Ondilo (#95109) 2023-06-23 08:26:57 -05:00
Daniel Kent
983ff10541 Fix ESPHome color temperature precision for light entities (#91424)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-23 08:08:28 -05:00
G Johansson
91611bbd3b Add missing apparent temp in forecast (#95108) 2023-06-23 14:49:11 +02:00
Marc Mueller
6033f39a0d Partial revert "Add TypeVar defaults for DataUpdateCoordinator (#95026)" (#95101)
* Revert "Add TypeVar defaults for DataUpdateCoordinator and EntityComponent (#95026)"

This reverts commit 90f5b1c323.

* Don't revert everything
2023-06-23 14:42:34 +02:00
Dominik
239f5fe56b Fix glances raid plugin data (#94597)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-23 14:36:43 +02:00
Álvaro Fernández Rojas
e5c1ce65df Use entity name in Airzone Cloud sensors (#95102) 2023-06-23 14:26:38 +02:00
dependabot[bot]
e581d6c90b Bump Wandalen/wretry.action from 1.2.0 to 1.3.0 (#95098)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 14:20:17 +02:00
Franck Nijhof
167f4b475d Clean up device class based entity translations in Verisure (#95082) 2023-06-23 14:01:31 +02:00
J. Nick Koston
3d8bf33d03 Add test coverage for esphome alarm control panels (#95090) 2023-06-23 12:59:05 +01:00
G Johansson
9656173d5c Fix Smhi name (#95097)
smhi no name
2023-06-23 11:37:52 +02:00
G Johansson
071679f91f Use new attributes in Smhi (#95096) 2023-06-23 11:32:20 +02:00
G Johansson
5d365ecb6b Implement Wind Gust speed in Weather entity component (#95065)
* Weather wind gust speed

* strings

* No compat
2023-06-23 08:22:46 +02:00
Michael Hansen
d811fa0e74 Sentence trigger (#94613)
* Add async_register_trigger_sentences for default agent

* Add trigger response and trigger handler

* Check callback in test

* Clean up and move response to callback

* Add trigger test

* Drop TriggerAction

* Test we pass sentence to callback

* Match triggers once, allow multiple sentences

* Don't use trigger id

* Use async callback

* No response for now

* Use asyncio.gather for callback responses

* Fix after rebase

* Use a list for trigger sentences

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-22 18:29:34 -05:00
Arjan
29ef925d73 Add humidity to weather forecast (#95064)
* allow humidty in forecast

* Add tests

* float

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-06-23 00:22:07 +02:00
dougiteixeira
e5afff7f98 Add the device of the source entity in the helper entities for Riemann sum integral (#94727) 2023-06-23 00:04:51 +02:00
Jonas Bergler
3db8bcdd50 Bump pyemby to 1.9 (#94743) 2023-06-23 00:00:27 +02:00
Stephan Uhle
52a4561c7e Code quality update for EDL21 (#94885) 2023-06-22 23:58:43 +02:00
Guido Schmitz
d804d3fca3 Use snapshot for devolo Home Network diagnostics test (#94966) 2023-06-22 23:56:09 +02:00
Franck Nijhof
a48030f5dd Name unnamed buttons by their device class (#95084) 2023-06-22 23:51:41 +02:00
Franck Nijhof
e68916b2fc Name unnamed numbers by their device class (#95083) 2023-06-22 23:48:49 +02:00
G Johansson
893b74d77e Add missing test for Apparent temperature in Weather component (#95080) 2023-06-22 23:19:51 +02:00
G Johansson
eafddaae83 Implement Cloud coverage in Weather entity component (#95068) 2023-06-22 23:10:36 +02:00
G Johansson
b8de7df609 Implement dew point in weather entity component (#95072) 2023-06-22 21:34:23 +02:00
J. Nick Koston
fe71ed8c50 Add esphome media player tests (#95069) 2023-06-22 21:28:58 +02:00
J. Nick Koston
3d12c7409d Add basic light tests to esphome (#95029) 2023-06-22 21:22:29 +02:00
Matthias Alphart
733bca88f1 Fix KNX device trigger passing info data (#95076) 2023-06-22 21:13:10 +02:00
J. Nick Koston
66b2214c55 Add esphome sensor tests (#95077) 2023-06-22 21:02:47 +02:00
J. Nick Koston
c7f2dab13c Add climate tests to esphome (#95045) 2023-06-22 20:31:55 +02:00
J. Nick Koston
dd0e6d6481 Migrate esphome media_player platform to use _on_static_info_update (#95071) 2023-06-22 19:57:09 +02:00
J. Nick Koston
1cf4a008c3 Add coverage for binary_sensor platform to esphome (#95067) 2023-06-22 19:55:28 +02:00
G Johansson
6ad3b60adf Implement Apparent temperature in Weather entity component (#95070) 2023-06-22 19:52:14 +02:00
Michael Hansen
38614bc3f0 Add websocket command to test intent recognition for default agent (#94674)
* Add websocket command to test intent recognition for default agent

* Return results as a list

* Only check intent name/entities in test

* Less verbose output in debug API
2023-06-22 12:24:59 -04:00
J. Nick Koston
1459bf4011 Fix async_scanner_devices_by_address unexpectedly combining Bluetooth scanners (#94990) 2023-06-22 16:50:21 +02:00
Joost Lekkerkerker
6ec6369c27 Add entity translations to AirThings BLE (#95061) 2023-06-22 16:46:06 +02:00
Raman Gupta
5265584159 Fix zwave_js device diagnostics dump (#94999)
* Fix zwave_js device diagnostics dump

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* improve test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-22 10:10:36 -04:00
Joost Lekkerkerker
6ceb973606 Add entity translations for Abode (#94169) 2023-06-22 16:03:28 +02:00
Joost Lekkerkerker
8e93045857 Add entity translations to Airthings (#95052) 2023-06-22 16:02:45 +02:00
Joost Lekkerkerker
acdf309c47 Add entity translations for Aladdin Connect (#95051) 2023-06-22 16:01:51 +02:00
Quentame
ede84d74c7 Fix Meteo France blocked config entry when weather alert API fails (#94911)
* Fix: do not block config entry when weather alert API fails

* PR review
2023-06-22 15:59:48 +02:00
Joost Lekkerkerker
c503becd9a Make AirNow use device class (#94986) 2023-06-22 15:58:14 +02:00
Petro31
e4c8a94aaf Add persistent_notification.dismiss_all service call (#95004) 2023-06-22 14:27:18 +02:00
Jan Bouwhuis
3c86497bc8 Improve mqtt climate turn_on and turn_off service (#94832)
* Improve mqtt climate turn_on and turn_off service

* Remove POWER_COMMAND_TOPIC when mode is changed

* Call super
2023-06-22 13:46:14 +02:00
Joost Lekkerkerker
8987e023a0 Add entity translations for Acmeda (#94170) 2023-06-22 12:01:33 +02:00
Joost Lekkerkerker
04dc85b754 Use device class for AirQ entities (#95037) 2023-06-22 11:56:44 +02:00
Franck Nijhof
e2f5a707ce Fix use_device_name in case device device class translations are used (#95010)
Co-authored-by: Erik <erik@montnemery.com>
2023-06-22 11:30:19 +02:00
J. Nick Koston
ed55632a66 Add esphome fan platform tests and remove unreachable code (#95025) 2023-06-22 11:29:59 +02:00
J. Nick Koston
cd5fdb97c0 Small cleanups to esphome sensor and binary_sensor (#95042) 2023-06-22 11:14:33 +02:00
Erik Montnemery
5884afd485 Teach sensor device trigger about entity registry ids (#94988) 2023-06-22 11:13:54 +02:00
Marcel van der Veldt
3863c561a6 Fix removal of orphaned Matter devices (#95044) 2023-06-22 11:13:14 +02:00
J. Nick Koston
8f6cde5b32 Migrate esphome lock platform to use _on_static_info_update (#95030) 2023-06-22 11:07:51 +02:00
Franck Nijhof
69c2ac1fac Update requests_mock to 1.11.0 (#94298) 2023-06-22 09:46:03 +02:00
J. Nick Koston
adc2df6b8e Callback esphome EntityInfo by platform instead of all platforms (#95021) 2023-06-22 09:39:48 +02:00
dependabot[bot]
05c25d2349 Bump Wandalen/wretry.action from 1.0.36 to 1.2.0 (#95035)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 09:38:32 +02:00
Hmmbob
3b24a943ab Fix goodwe midnight error (#95041) 2023-06-22 09:35:53 +02:00
J. Nick Koston
27da7d68de Migrate esphome fan platform to use _on_static_info_update (#95031) 2023-06-22 09:07:13 +02:00
J. Nick Koston
b700400183 Migrate esphome select platform to use _on_static_info_update (#95022) 2023-06-22 09:05:57 +02:00
Erik Montnemery
e204e80528 Teach vacuum device trigger about entity registry ids (#94989) 2023-06-22 08:20:59 +02:00
Marc Mueller
90f5b1c323 Add TypeVar defaults for DataUpdateCoordinator and EntityComponent (#95026) 2023-06-22 03:33:23 +02:00
J. Nick Koston
65a5244d5a Fix race and add test coverage for esphome select platform (#95019) 2023-06-22 01:19:47 +02:00
Richard Kroegel
ef2669afe4 Bump bimmer_connected to 0.13.7 (#95017) 2023-06-22 00:17:13 +02:00
Marcel van der Veldt
b5084dbce2 Bump Matter Server to 3.5.1: some small fixes and stability improvements (#94985) 2023-06-21 23:57:33 +02:00
Erik Montnemery
f10256169b Teach homekit about entity registry ids in device triggers (#95009) 2023-06-21 23:28:43 +02:00
J. Nick Koston
235f50a341 Migrate esphome button platform to use _on_static_info_update (#95007) 2023-06-21 22:24:26 +02:00
J. Nick Koston
8d2daaa694 Limit cache size of EntityValues (#94983) 2023-06-21 22:23:35 +02:00
J. Nick Koston
90386bc036 Reduce overhead to fetch unifiprotect attributes (#94976) 2023-06-21 21:41:06 +02:00
Jan Bouwhuis
31f845bfe0 Add current_humidity attribute to mqtt humidifier (#94955) 2023-06-21 19:19:26 +02:00
Joost Lekkerkerker
492ed1b544 Remove superclass from YouTube (#95002) 2023-06-21 18:49:23 +02:00
Joost Lekkerkerker
6230a51695 Remove superclass from GMail Authentication (#95001) 2023-06-21 18:47:53 +02:00
Barry Williams
57c9aad9b1 Migrate Linn / Openhome integration to SSDP config flow (#94564)
* Migrate Linn / Openhome integration to SSDP config flow

* moved device initialisation into __init__

* wait for user step before adding openhome entities

* add CONFIG_SCHEMA

* cover confirmation step in config flow test

* Address comments

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-21 12:46:17 -04:00
centertivevier
61554682d4 Bump slixmpp to 1.8.4 (#94944) 2023-06-21 18:10:30 +02:00
Marc Mueller
86792fcc2f Update mypy to 1.4.0 (#94987) 2023-06-21 16:12:51 +02:00
Erik Montnemery
c8cd469c95 Teach media_player device trigger about entity registry ids (#94979) 2023-06-21 16:09:28 +02:00
J. Nick Koston
367644afe1 Migrate esphome switch platform to use _on_static_info_update (#94962) 2023-06-21 15:41:24 +02:00
J. Nick Koston
e24c2ae55c Avoid fetching both unifiprotect RTSP urls (#94978) 2023-06-21 15:14:57 +02:00
Martin Hjelmare
f9366e5cc7 Migrate google translate to config entries (#93803)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-21 14:58:58 +02:00
Erik Montnemery
22e1feb223 Teach humidifier device trigger about entity registry ids (#94974) 2023-06-21 14:58:11 +02:00
J. Nick Koston
1cb62d776e Migrate esphome cover platform to use _on_static_info_update (#94959) 2023-06-21 14:54:56 +02:00
Erik Montnemery
af97857c87 Teach select device trigger about entity registry ids (#94981) 2023-06-21 14:51:39 +02:00
Erik Montnemery
7f0be78ebb Teach netatmo device trigger about entity registry ids (#94980) 2023-06-21 14:51:24 +02:00
Erik Montnemery
e404441e8c Teach lock device trigger about entity registry ids (#94975) 2023-06-21 14:51:09 +02:00
Erik Montnemery
20be441c9f Teach device_tracker device trigger about entity registry ids (#94972) 2023-06-21 14:51:00 +02:00
Erik Montnemery
49c7d2ff89 Teach cover device trigger about entity registry ids (#94971) 2023-06-21 14:50:40 +02:00
Erik Montnemery
f3defff429 Teach climate device trigger about entity registry ids (#94969) 2023-06-21 14:50:21 +02:00
Erik Montnemery
49ec806046 Teach button device trigger about entity registry ids (#94965)
* Teach button device trigger about entity registry ids

* Update homekit_controller tests
2023-06-21 14:50:11 +02:00
Erik Montnemery
4414f06ed2 Teach binary_sensor device trigger about entity registry ids (#94963)
* Teach binary_sensor device trigger about entity registry ids

* Update deconz test
2023-06-21 14:49:53 +02:00
J. Nick Koston
9d91cfa27f Migrate esphome number platform to use _on_static_info_update (#94958) 2023-06-21 13:13:29 +02:00
J. Nick Koston
9876abcac9 Migrate esphome light platform to use _on_static_info_update (#94960) 2023-06-21 12:31:14 +02:00
Kyle Hildebrandt
dcf8db36b7 Use yt-dlp instead of youtube-dl (#94625)
* Update to use yt-dlp instead of youtube-dl

* Update homeassistant/components/media_extractor/__init__.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-21 12:16:58 +02:00
Erik Montnemery
732ce34a66 Remove assert_lists_same test helper (#94904) 2023-06-21 12:10:28 +02:00
Maciej Bieniek
05039036f1 Add compatibility with sleeping Shelly gen2 devices with firmware 1.0.0 (#94864) 2023-06-21 12:01:17 +02:00
RoboMagus
3bacd9df2f Add trigger for persistent_notification (#94809)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-21 11:55:06 +02:00
J. Nick Koston
605c4db142 Relocate async_get_announce_addresses from zeroconf to network (#94816) 2023-06-21 11:29:04 +02:00
Jan Bouwhuis
c47543c9dd Add current_humidity attribute to tuya (de)humidifiers (#94953)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-21 11:28:12 +02:00
Joost Lekkerkerker
30453f6982 Add entity translations for Adguard (#94171) 2023-06-21 11:26:24 +02:00
Erik Montnemery
b254218dd6 Remove base_url configuration option from tts (#94905) 2023-06-21 11:20:33 +02:00
Joost Lekkerkerker
83c478105b Add entity translations for huisbaasje (#94116) 2023-06-21 11:18:55 +02:00
G Johansson
aec946e93a Improve description in Workday config flow (#94945) 2023-06-21 11:17:36 +02:00
epenet
60b78f4648 Add error handling to hassio issues (#94951) 2023-06-21 11:17:11 +02:00
Erik Montnemery
1d18fdf7bd Improve alarm_control_panel device trigger tests (#94956) 2023-06-21 11:11:07 +02:00
J. Nick Koston
804a8ef36a Reduce overhead to update esphome entities (#94930) 2023-06-21 11:00:21 +02:00
Guido Schmitz
933ae5198e Refactor devolo_home_network tests (#88706)
* Refactor devolo_home_network tests

* Reduce to snapshot introduction

* Simplify

* Update snapshots

* Simplify further
2023-06-21 10:21:36 +02:00
J. Nick Koston
f8bef95eb6 Reduce code in entity filter (#94882) 2023-06-21 08:37:19 +01:00
Quentame
31e9d95f66 Fix Netgear comment typo (#94927) 2023-06-21 08:23:22 +02:00
Leandro Loureiro
1e078d5868 Bump arcam_fmj lib to 1.4.0 to support Arcam ST60 (#94942)
bumping arcam_fmj lib to 1.4.0
2023-06-21 01:43:02 +02:00
Erik Montnemery
863b948e7c Correct calls to super class in RecorderPool (#94923) 2023-06-20 23:26:37 +02:00
Erik Montnemery
446a820cbb Name unnamed sensors by their device class (#94646) 2023-06-20 23:09:24 +02:00
J. Nick Koston
b857dc8d94 Bump HAP-python to 4.7.0 (#94812) 2023-06-20 23:06:26 +02:00
Jan Bouwhuis
4def901ecc Ignore empty status update for mqtt number (#94800) 2023-06-20 23:04:01 +02:00
Erik Montnemery
3e71b1daa4 Correct calls to super class in TriggerEntity (#94916) 2023-06-20 23:00:22 +02:00
Erik Montnemery
16aa4c54ec Correct calls to super class in ZHADeviceScannerEntity (#94924) 2023-06-20 22:59:13 +02:00
Erik Montnemery
3c34e18130 Correct calls to super class in ZWaveConfigParameterSensor (#94925) 2023-06-20 22:58:34 +02:00
Jan Bouwhuis
a4399a4cb6 Add device trigger for humidifier current_humidity (#94926) 2023-06-20 22:57:44 +02:00
Erik Montnemery
d2d6389742 Improve storage helper typing (#94929) 2023-06-20 22:50:10 +02:00
Jan Bouwhuis
3b8feab699 Add current_humidity to humidifiers in google_assistant (#94935) 2023-06-20 22:49:10 +02:00
Jan Bouwhuis
d6b89b6f7b Add current_humidity attribute on homekit_controller humidifier (#94937) 2023-06-20 21:46:07 +01:00
Joost Lekkerkerker
d6dc738a12 Add entity translations for AirNow (#94175)
* Add entity translations for AirNow

* Restore keys

* Restore keys
2023-06-20 22:24:51 +02:00
Joost Lekkerkerker
18d0fe994d Add entity translations for AirQ (#94280) 2023-06-20 22:19:17 +02:00
Austin Mroczek
252c0e8ad9 Fix Totalconnect BinarySensorDeviceClass logic (#94772)
* handle temperature

* test for temperature

* test for unknown
2023-06-20 22:12:11 +02:00
Erik Montnemery
6183a36fce Replace assert_lists_same with pytest_unordered in integrations t-z (#94903) 2023-06-20 20:23:49 +02:00
Erik Montnemery
eba04824a4 Replace assert_lists_same with pytest_unordered in integrations n-s (#94902) 2023-06-20 20:23:14 +02:00
Erik Montnemery
6a29ed8caa Replace assert_lists_same with pytest_unordered in integrations a-f (#94900) 2023-06-20 20:22:31 +02:00
Erik Montnemery
fd822bce56 Replace assert_lists_same with pytest_unordered in integrations h-m (#94901) 2023-06-20 20:16:25 +02:00
Jan Bouwhuis
c4d7695173 Add current_humidity attribute to xiaomi_miio humidifiers (#94934) 2023-06-20 20:15:42 +02:00
Denis Shulyaka
1d2a973289 Generic hygrostat current humidity (#94912) 2023-06-20 20:10:21 +02:00
Erik Montnemery
45616b8127 Follow redirects in generic camera (#94931) 2023-06-20 20:07:12 +02:00
Erik Montnemery
b600c2cd85 Add cloud_connected method to CloudClient (#91997)
* Add cloud_connected method to CloudClient

* Add cloud_disconnected method

* Update client.py
2023-06-20 17:15:13 +02:00
Allen Porter
50605e62bd Bump ical to 4.5.4 (#94894) 2023-06-20 07:32:03 -07:00
J. Nick Koston
3f18f515e7 Improve websocket api coverage and typing (#94891) 2023-06-20 15:21:24 +01:00
J. Nick Koston
b51dcb600e Avoid enumerating the whole state machine to find zone entities (#94866) 2023-06-20 14:48:28 +01:00
Allen Porter
30e8f806c1 Improve service response data APIs (#94819)
* Improve service response data APIs

Make the API naming more consistent, and require registration that a
service supports response data so that we can better integrate with
the UI and avoid user confusion with better error messages.

* Improve test coverage

* Add an enum for registering response values

* Assign enum values

* Convert SupportsResponse to StrEnum

* Update service call test docstrings

* Add tiny missing full stop in comment

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-20 06:24:31 -07:00
Erik Montnemery
4a8adae146 Teach alarm_control_panel device trigger about entity registry ids (#60977)
* Teach alarm_control_panel device trigger about entity registry ids

* Lint code

* Address review comment
2023-06-20 08:27:31 -04:00
Erik Montnemery
2bc5198390 Bump hass-nabucassa to 0.68.0 (#94910)
* Bump hass-nabucassa to 0.68.0

* Add implementation of new abstract methods
2023-06-20 13:52:21 +02:00
Erik Montnemery
609a573b55 Regenerate instance ID on error (#94898) 2023-06-20 11:16:51 +02:00
J. Nick Koston
2b1660c0f7 Dispatch when esphome static info changes (#94876) 2023-06-20 09:45:30 +02:00
Denis Shulyaka
185aaa9e07 Humidifier current humidity (#94874) 2023-06-20 09:43:33 +02:00
RenierM26
2be5bab5e1 Ezviz library bump 0.2.1.2 (#94823) 2023-06-20 08:47:34 +02:00
Thomas Schamm
3cf88ffdde Bump boschshcpy to 0.2.57 (#94686) 2023-06-20 08:40:57 +02:00
James Smith
99cbf21c57 Add homeassistant.components.text to .strict-typing (#94890) 2023-06-20 08:28:27 +02:00
Matthias Alphart
a262cd2b96 Add source address early for KNX services (#94889) 2023-06-20 08:02:13 +02:00
Mariano Faraco
5d40edcf02 Bump ha-philipsjs to 3.1.0 (#94811) 2023-06-20 06:40:58 +02:00
Álvaro Fernández Rojas
6435837061 Update aioairzone to v0.6.4 (#94873) 2023-06-19 19:23:24 -05:00
Graham Brown
cecdc3bd47 ESPHome Alarm Control Panel (#92357) 2023-06-19 19:19:17 -05:00
quthla
b1288a885d Bump yeelight to 0.7.11 (#94879)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-19 18:38:42 -05:00
J. Nick Koston
1206f2c1da Fix memory leaks in websocket api (#94780)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-19 18:27:22 -05:00
Erik Montnemery
a7d327afa2 Improve test coverage of automation extraction functions (#94878) 2023-06-19 23:05:20 +02:00
Erik Montnemery
5d138b64d9 Improve test coverage of script (#94883) 2023-06-19 22:40:49 +02:00
boozer2
51326bd8c7 Add Switchbot Indoor/Outdoor Meter (#94836)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-19 13:35:44 -05:00
Jan Bouwhuis
8b6d2fc3ce Remove unreachable template validation for imap config flow (#94862) 2023-06-19 20:20:10 +02:00
Jan Bouwhuis
ce8217acf5 Explicitly opt-in to device name in the imap integration (#94861) 2023-06-19 19:58:41 +02:00
Erik Montnemery
5303bef83e Add image entity component (#90564) 2023-06-19 17:03:48 +02:00
Erik Montnemery
43c4dec3ed Explicitly opt-in to device name in the demo integration (#94647) 2023-06-19 15:56:48 +02:00
Erik Montnemery
3ee63ba2c2 Add tests for kitchen_sink sensor platform (#94724)
* Add tests for kitchen_sink sensor platform

* Address review comments
2023-06-19 14:16:18 +02:00
Erik Montnemery
e49c2fde14 Add tests for kitchen_sink lock platform (#94723) 2023-06-19 13:24:36 +02:00
Mike Heath
d3bf52c136 Register Fully Kiosk services regardless of setup result (#88647)
* Register services at integration level

If HA is unable to connect to Fully Kiosk, the services don't get
registered. This can cause repair to create notifications saying
that the 'fully_kiosk.load_url' service is unknown.

Fixes #85444

* Validate config entry is loaded

* Refactor service invocation

Raises `HomeAssistantError` when the user provides an device id that is
not in the device registry or a device that is not a Fully Kiosk
device. If the device's config entry is not loaded, a warning is
logged.

* Update homeassistant/components/fully_kiosk/services.py

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

* Assert HomeAssistantError when integration unloaded

* Remove unused import

* Set CONFIG_SCHEMA

* Update homeassistant/components/fully_kiosk/__init__.py

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

* Add test for non fkb devices targets in service calls

* Apply suggestions from code review

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-19 13:12:04 +02:00
J. Nick Koston
a027a01535 Log a traceback when importing a component fails (#94778)
`2023-06-17 12:44:37.961 ERROR (MainThread) [homeassistant.setup] Setup failed for switchbot: Unable to import component: cannot import name DEFAULT_CIPHERS from urllib3.util.ssl_ (/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/urllib3/util/ssl_.py)` is not very helpful as it does not show which module tried to import.

adding a traceback makes it more obvious, and since ImportError is usually not something
the user can easily solve, it makes issue reports much more helpful

```
DEFAULT_CIPHERS from urllib3.util.ssl_ (/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/urllib3/util/ssl_.py)
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/setup.py", line 213, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/homeassistant/loader.py", line 813, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/bdraco/home-assistant/homeassistant/components/switchbot/__init__.py", line 5, in <module>
    import switchbot
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/switchbot/__init__.py", line 22, in <module>
    from .devices.lock import SwitchbotLock
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/switchbot/devices/lock.py", line 12, in <module>
    import boto3
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/boto3/__init__.py", line 16, in <module>
    from boto3.session import Session
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/session.py", line 29, in <module>
    import botocore.credentials
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/credentials.py", line 34, in <module>
    from botocore.config import Config
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/config.py", line 16, in <module>
    from botocore.endpoint import DEFAULT_TIMEOUT, MAX_POOL_CONNECTIONS
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/endpoint.py", line 22, in <module>
    from botocore.awsrequest import create_request_object
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/awsrequest.py", line 24, in <module>
    import botocore.utils
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/utils.py", line 32, in <module>
    import botocore.httpsession
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/httpsession.py", line 10, in <module>
    from urllib3.util.ssl_ import (
ImportError: cannot import name DEFAULT_CIPHERS from urllib3.util.ssl_ (/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/urllib3/util/ssl_.py)
```
2023-06-19 13:10:39 +02:00
Maciej Bieniek
c7e460ccab Return None as BraviaTV media_player/remote entity name (#94804) 2023-06-19 12:04:50 +02:00
Maciej Bieniek
546139e491 Return None as Accuweather weather entity name (#94803) 2023-06-19 12:04:25 +02:00
J. Nick Koston
80d4f90e70 Add missing abort string to apple_tv (#94818) 2023-06-19 11:51:39 +02:00
Joost Lekkerkerker
a7f3bde3ac Add Twitch codeowner (#94851) 2023-06-19 11:51:04 +02:00
Erik Montnemery
17797c04c3 Explicitly opt-in to device name in the uptime integration (#94846) 2023-06-19 11:47:54 +02:00
Erik Montnemery
c7d636a371 Explicitly opt-in to device name in the season integration (#94845) 2023-06-19 11:47:44 +02:00
Erik Montnemery
76a5e6d7ce Explicitly opt-in to device name in the cpuspeed integration (#94844) 2023-06-19 11:47:29 +02:00
Erik Montnemery
e6a7ff97c8 Explicitly opt-in to device name in the cast integration (#94847) 2023-06-19 11:04:59 +02:00
J. Nick Koston
24add59d15 Bump zeroconf to 0.69.0 (#94828)
changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.68.0...0.69.0
2023-06-19 07:39:03 +02:00
Maciej Bieniek
15ddf69c6a Bump Shelly backend library to version 5.4.0 (#94829)
Bump aioshelly to version 5.4.0
2023-06-19 00:10:29 +02:00
Ernst Klamer
13a217ad89 Bump bthome to 2.12.0 (#94822) 2023-06-18 15:06:09 -05:00
J. Nick Koston
5834d70037 Bump zeroconf to 0.68.0 (#94786) 2023-06-18 09:33:42 -05:00
starkillerOG
ee7f44b3da Bump reolink-aio to 0.7.1 (#94761) 2023-06-18 13:13:21 +02:00
Richard Kroegel
52f49fc32d bmw_conected_drive: Allow WASHING_FLUID in condition based service (#94762)
Allow WASHING_FLUID
2023-06-18 09:19:31 +02:00
Joost Lekkerkerker
9f83e4b2de Make YouTube select lower quality thumbnails (#94652)
* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Add tests

* Add tests

* Add tests

* Add tests

* Add tests
2023-06-17 21:59:06 -04:00
Eric Severance
7f7b7aee6d pyWeMo serialnumber is deprecated, use serial_number (#94791) 2023-06-17 20:59:19 -04:00
Ian Foster
0513117a11 Add hub to keyboard_remote manifest (#94788)
added hub to keyboard_remote manifest
2023-06-17 23:07:18 +02:00
J. Nick Koston
be638d3772 Bump recommended esphome version for bluetooth to 2023.6.0 (#94773)
2023.6.0 is needed for #94138 to work
2023-06-17 16:23:33 -04:00
J. Nick Koston
b5e1d35e18 Bump cryptography to 41.0.1 and PyOpenSSL to 23.2.0 (#94777)
changelog: https://cryptography.io/en/latest/changelog/
changelog: https://www.pyopenssl.org/en/latest/changelog.html
2023-06-17 16:23:06 -04:00
disforw
71e8ee52e5 Fix QNAP Sensor Entity Descriptions (#94749) 2023-06-17 16:06:28 +02:00
Allen Porter
c4284c07b6 Allow scripts to capture service response data in variables (#94757)
* Allow scripts service actions to save return values

* Simplify script service response data

* Rename result_variable to response_variable based on feedback
2023-06-16 22:59:44 -04:00
Erik Montnemery
4f669b326f Fix typo in tts tests (#94725) 2023-06-16 21:08:14 -04:00
J. Nick Koston
68cf796be8 Speed up entity service calls (#94731)
* Speed up entity service calls

- Avoid permissions check if the caller is an admin
- Use set intersection instead of linear search of entity platforms to find entities

* tweak

* fix light test to not use an admin user
2023-06-16 21:07:57 -04:00
Michał Modzelewski
3778e1cd77 Support launching app deep links in apple_tv integration (#94705) 2023-06-16 13:05:46 -05:00
Jan Čermák
d7755a92c3 Fix warning from rapt_ble caused by payload version 2 (#94718) 2023-06-16 12:12:52 -05:00
Allen Porter
84c66b3cad Add support for services to return data (#94401)
* Add support for service calls with resopnse data.

Update the service calls to allow returning responses with data,
with an initial use case supporting basic service calls usable
within script.

* Revert enttiy platform/component changes

* Remove unnecessary comma diff

* Revert additional unnecessary changes

* Simplify service call

* Simplify and fix typing and revert whitespace

* Clarify typing intent

* Revert more entity service calls

* Revert additional entity service changes

* Set blocking=True for group notify service call

* Revert unnecessary changes

* Reverting more whitespace changes

* Revert more service changes

* Add test coverage for None return case

* Add parameter to service calls indicating return values were requested

* Update tests/test_core.py

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

* Add additional service call tests

* Update test comment

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-16 12:43:35 -04:00
Allen Porter
12129e9d21 Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Erik Montnemery
950b25bf42 Remove unnecessary assert from Entity (#94711) 2023-06-16 14:07:25 +02:00
Erik Montnemery
92bba4d7be Fix typo in binary_sensor tests (#94712) 2023-06-16 13:57:42 +02:00
Matthias Alphart
0ac50b4933 Update xknxproject to 3.2.0: support ETS 4 project files (#94692)
Update xknxproject to 3.2.0
2023-06-16 10:16:31 +02:00
Tom Harris
ea0e1c54d6 Handle Insteon events correctly (#94549)
Make events generalized
2023-06-16 09:35:44 +02:00
Raman Gupta
934e1a1603 Fix zwave_js trigger event reattach logic (#94702) 2023-06-16 09:35:29 +02:00
Alistair Tudor
843a15b1bb Fix unit for Habitica text sensors (#94550) 2023-06-16 09:33:02 +02:00
Joost Lekkerkerker
4eefbfd4f2 Add strings for YouTube reauthentication (#94655) 2023-06-16 09:10:55 +02:00
G Johansson
72c1273d25 Fix Command Line update twice issue (#94672)
Command Line update twice issue
2023-06-16 09:08:51 +02:00
Franck Nijhof
be05a749c5 Add preheating HVAC action to climate (#94677)
* Add preheating HVAC action to climate

* Fix MQTT tests
2023-06-15 22:16:12 -04:00
J. Nick Koston
26be0fab78 Fix debouncer not scheduling timer when wrapped function raises (#94689)
* Fix debouncer not scheduling timer when callback function raises

* test coro as well

* preen
2023-06-15 22:15:49 -04:00
J. Nick Koston
34b725bb99 Debounce discoveries to improve event loop stability at the started event (#94690)
* Debounce discoveries to improve event loop stability at the started event

The first one is immediate and anything that fires within the next
second will be debounced to only happen once every second

* fix mock
2023-06-15 22:15:07 -04:00
J. Nick Koston
7e3510800d Bump bluetooth-data-tools to 1.2.0 (#94696)
changelog: https://github.com/Bluetooth-Devices/bluetooth-data-tools/compare/v1.1.0...v1.2.0

benchmark (0.4.0) currently in 2023.6.x: Parsing 100000 bluetooth messages took 8.928823958034627 seconds
benchmark (1.2.0) this PR: Parsing 100000 bluetooth messages took 1.6808899159659632 seconds
2023-06-15 22:11:14 -04:00
Dirk Sarodnick
3440c1615d Fix bluetooth tracker asyncio usage (#94695)
* fix for asyncio usage

fixes the error "Passing coroutines is forbidden, use tasks explicitly", caused by passing an async function into asyncio.wait directly instead of creating a task for it.

* removes unnecessary default param

* corrects formatting for black
2023-06-15 22:10:04 -04:00
J. Nick Koston
45bf1235d8 Remove airplay filter now that apple tv supports airplay 2 (#94693)
remove airplay filter
2023-06-15 22:09:10 -04:00
J. Nick Koston
298f763f12 Drop codeowner for myq (#94699)
All of my garage doors have been migrated to using
https://esphome-ratgdo.github.io/esphome-ratgdo/

All of my gates have been migrated to using a
KC868-A4 board https://www.kincony.com/kc868-a4-digital-input-trigger-relay-output-esphome.html

I no longer use myq in production as there is now a
viable esphome replacement every place I was using
myq
2023-06-15 21:15:33 -04:00
Jan Bouwhuis
5e55f83cbc Correct imap sensor measurement class and add suggested precision (#94060)
* Fix imap sensor measurement class and precision

* Test measurement class is set correctly

* Remove unrelated changes

* Move EntityDescription to module level
2023-06-16 00:44:58 +02:00
Michał Modzelewski
b104680c6d Bump pyatv to 0.13.0 (#94683) 2023-06-15 11:57:36 -10:00
Franck Nijhof
21bdcd6b63 Remove str as a valid HVACMode & HVACAction type (#94644)
* Remove str as a valid HAVCMode type

* Adjust pylint plugin

* Also remove str from hvac_action property method
2023-06-15 20:16:17 +02:00
Franck Nijhof
324bd9a97a Fix HAVCAction typing in Atag (#94656) 2023-06-15 18:43:56 +02:00
Franck Nijhof
81d46fe2b2 Fix HAVCAction typing in Balboa Spa Client (#94658) 2023-06-15 18:43:32 +02:00
Franck Nijhof
68f87fe42a Fix HAVCAction typing in Genius Hub (#94659) 2023-06-15 18:43:11 +02:00
Franck Nijhof
7e5a9ea6c7 Fix HAVCAction typing in Overkiz (#94660) 2023-06-15 18:42:46 +02:00
Kim Frellsen
562f0d3c52 Fortios device tracker updates (#92331)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-15 15:34:14 +02:00
Franck Nijhof
a7955e4458 Fix HAVCMode typing in Elk-M1 Control (#94639) 2023-06-15 15:27:49 +02:00
Franck Nijhof
d78429ad95 Use HAVCMode enum in Atag climate (#94634) 2023-06-15 14:14:25 +02:00
Franck Nijhof
204833b745 Fix HAVCMode typing in Rheem EcoNet (#94637) 2023-06-15 14:13:59 +02:00
Franck Nijhof
998a45879e Use HAVCMode enum in BSB-Lan climate (#94638) 2023-06-15 14:13:20 +02:00
Franck Nijhof
908f3386e7 Fix HAVCMode typing in ESPHome (#94630) 2023-06-15 14:12:11 +02:00
Franck Nijhof
6f106e6505 Fix HAVCMode typing in AVM FRITZ!SmartHome (#94642) 2023-06-15 14:11:18 +02:00
Franck Nijhof
e899cb3caa Fix HAVCMode typing in Genius Hub (#94640) 2023-06-15 14:08:38 +02:00
Franck Nijhof
b1abe6812b Fix HAVCMode typing in Honeywell Total Connect Comfort (#94636) 2023-06-15 14:07:41 +02:00
Franck Nijhof
e49f1b002f Fix HAVCMode typing in Fibaro (#94641) 2023-06-15 14:07:08 +02:00
Franck Nijhof
1d3a7512d8 Fix HAVCMode typing in Overkiz (#94632) 2023-06-15 14:06:06 +02:00
Franck Nijhof
886dea59c3 Fix HAVCMode typing in Tuya (#94631) 2023-06-15 14:05:08 +02:00
Franck Nijhof
6c4fe9fc3b Fix HAVCMode typing in Intellifire (#94633) 2023-06-15 14:04:38 +02:00
Dominik
64d914d56d Bump minimum typing_extensions to 4.6.3 (#94587) 2023-06-15 12:30:52 +02:00
Erik Montnemery
334dacc322 Change Entity.name default to UNDEFINED (#94574)
* Change Entity.name default to UNDEFINED

* Update typing

* Update Pylint plugin

* Update TTS test
2023-06-15 11:09:53 +02:00
J. Nick Koston
d369d679c7 Fix ESPHome entries reloading after startup when dashboard is in use (#94362) 2023-06-14 21:16:39 -10:00
epenet
580b09d0f2 Refactor XML parsing in rest (#94268)
* Refactor XML parsing in rest

* Adjust caplog check

* Adjust

* Rename

* Simplify
2023-06-15 09:15:25 +02:00
Aidan Timson
61d260e5fe Add CPU Power to System Bridge (#80781)
* Add CPU Power to System Bridge

* Rename

* Update homeassistant/components/system_bridge/sensor.py

Co-authored-by: Aarni Koskela <akx@iki.fi>

* Fix unit

* Add suggested_display_precision=2

---------

Co-authored-by: Aarni Koskela <akx@iki.fi>
2023-06-14 21:47:50 -04:00
J. Nick Koston
2a5ffa9a5b Fix timestamps for bluetooth scanners that bundle advertisements (#94511)
#94138 added support for raw/bundled advertisements. We should use the
same monotonic time for all advertisements in the bundle if not time
is passed, or calculate the timestamp and pass it if its known
2023-06-14 21:47:00 -04:00
puddly
22dfa8797f Bump ZHA dependencies (#93989)
* Make `find_entity_id` synchronous

* Remove `tries`

* Use new `attribute_updated` event signature

* Validate attributes before creating entities

* Avoid swallowing exceptions when opening covers

* Bump ZHA dependencies

* Add a matcher for Sinope water leak sensors using a non-standard ZCL attribute

* Ensure handler matching is strict, not multi

* Add type annotations for newly-updated functions
2023-06-14 21:42:31 -04:00
J. Nick Koston
584967a35a Avoid double call to self.suggested_unit_of_measurement in sensor unit_of_measurement (#94582) 2023-06-14 21:33:05 -04:00
J. Nick Koston
e0ae7a31fe Remove _raw from zeroconf properties (#94615)
* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped

* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped
2023-06-14 21:31:52 -04:00
Maciej Bieniek
7b3f100efb Catch InvalidAuthError in shutdown() method for Shelly gen2 devices (#94563)
* Catch InvalidAuthError in shutdown() method

* Add test

* Revert unwanted change in tests
2023-06-15 00:00:21 +03:00
disforw
a79e37c240 Add coordinator to QNAP (#94413)
* Create coordinator.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update homeassistant/components/qnap/coordinator.py

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

* Update homeassistant/components/qnap/coordinator.py

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

* Update homeassistant/components/qnap/coordinator.py

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

* Update homeassistant/components/qnap/coordinator.py

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

* Update homeassistant/components/qnap/coordinator.py

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

* Update homeassistant/components/qnap/coordinator.py

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

* Update homeassistant/components/qnap/sensor.py

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

* Update homeassistant/components/qnap/sensor.py

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

* Update homeassistant/components/qnap/sensor.py

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

* Update homeassistant/components/qnap/sensor.py

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

* Update homeassistant/components/qnap/sensor.py

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

* Add import

* Update coordinator.py

* Update coordinator.py

* Add platformnotready

* Walrus

* Update sensor.py

* Undo walres

CI didnt like it

* Update coordinator.py black fix

* Update sensor.py fix black

* Update sensor.py fix ruff

* Update coordinator.py fix lint

* Update sensor.py fix ruff

* Update homeassistant/components/qnap/coordinator.py

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

* Update homeassistant/components/qnap/sensor.py

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

* Update sensor.py

* Update coordinator.py

* Update coordinator.py

* Update sensor.py

* Update homeassistant/components/qnap/sensor.py

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

* Update sensor.py

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-14 22:42:49 +02:00
J. Nick Koston
b149fffa08 Bump bluetooth-data-tools to 1.1.0 (#94610)
Bume bluetooth-data-tools to 1.1.0

performance improvements

https://github.com/Bluetooth-Devices/bluetooth-data-tools/compare/v1.0.0...v1.1.0
2023-06-14 22:25:26 +02:00
Ian Foster
e998320053 Fix keyboard_remote for python 3.11 (#94570)
* started work to update keyboard_remote to work with python 3.11

* updated function names

* all checks pass

* fixed asyncio for python 3.11

* cleanup

* Update homeassistant/components/keyboard_remote/__init__.py

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

* Update __init__.py

added:
from __future__ import annotations

* Fix typing

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-14 22:06:55 +02:00
Erik Montnemery
e539344d22 Set has_entity_name in mill (#94605) 2023-06-14 21:45:14 +02:00
Erik Montnemery
cc53e4e6c1 Set has_entity_name in kodi (#94604)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-14 21:44:17 +02:00
Erik Montnemery
fa9c31d3db Set has_entity_name in freedompro (#94603)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-14 21:42:51 +02:00
Erik Montnemery
c48afebbfc Set has_entity_name in electrasmart (#94602)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-14 21:41:53 +02:00
Erik Montnemery
fc068f878b Minor adjustment in sharkiq, webostv, ws66i (#94611) 2023-06-14 21:41:32 +02:00
Michael Hansen
5c3ec8774d Fix async_timeout deprecation warning (#94594)
* Fix async_timeout deprecation warning

* Combine async with
2023-06-14 14:26:24 -05:00
Erik Montnemery
7fbeac9bbe Set has_entity_name in webostv (#94607)
* Set has_entity_name in webostv

* Fix log message
2023-06-14 22:11:09 +03:00
Erik Montnemery
f68ed8b7a0 Always setup demo platforms with device support from config entry (#94601)
* Always setup demo platforms with device support from config entry

* Update tests depending on the demo integration
2023-06-14 21:03:07 +02:00
Erik Montnemery
c5fccffbb3 Set has_entity_name in sharkiq (#94606) 2023-06-14 21:02:00 +02:00
Erik Montnemery
3424e927cb Set has_entity_name in ws66i (#94608) 2023-06-14 20:49:23 +02:00
J. Nick Koston
a0c023d5cb Reduce overhead to lookup items in the entity and device registry (#94568) 2023-06-14 20:47:18 +02:00
Niclas Kühnapfel
de62082605 Update solax to 0.3.2 (#94545)
* solax: update to 0.3.2

* Update solax dependencies
2023-06-14 16:52:43 +02:00
Erik Montnemery
9a3077d64a Always setup demo platforms with device support from config entry (#94586)
* Always setup demo platforms with device support from config entry

* Adjust test fixutres

* Update tests depending on the demo integration
2023-06-14 16:50:35 +02:00
Erik Montnemery
1b8c72e644 Remove legacy STT provider from the demo integration (#94585) 2023-06-14 14:55:50 +02:00
Erik Montnemery
e5b2801f5b Fix ZHA tests (#94588) 2023-06-14 14:21:34 +02:00
dupondje
4ac2dd3de7 Bump python devcontainer (#94540) 2023-06-14 11:38:47 +02:00
Erik Montnemery
bd156bb129 Improve multipan debug logging (#94580) 2023-06-14 10:26:54 +02:00
Chris Talkington
6a75f69e0f Fix failed recovery in ipp (#94573) 2023-06-13 21:07:24 -10:00
Chris Talkington
508cd7ef7e Fix failed recovery in roku (#94572) 2023-06-13 21:07:03 -10:00
Franck Nijhof
66400fca0d Update Home Assistant base image to 2023.06.0 (#94556) 2023-06-13 22:27:14 +02:00
Franck Nijhof
d5be77b53d Update sentry-sdk to 1.25.1 (#94374) 2023-06-13 22:10:56 +02:00
Aaron Bach
08262f480b Bump regenmaschine to 2023.06.0 (#94554) 2023-06-13 21:37:56 +02:00
Chris Phillips
ddf004d5c7 Bump russound_rio to 1.0.0 (#94500) 2023-06-13 21:37:30 +02:00
Erik Montnemery
2406b235b4 Name unnamed binary sensors by their device class (#92940)
* Name unnamed binary sensors by their device class

* Update type annotations

* Fix loading of entity component translations

* Add test

* Update integrations

* Set abode and rfxtrx binary_sensor name to None

* Revert changes in homekit_controller
2023-06-13 19:48:54 +02:00
J. Nick Koston
223394eaee Bump bluetooth-data-tools to 1.0.0 (#94145) 2023-06-13 06:42:10 -10:00
J. Nick Koston
985fb3cd5d Bump yalexs-ble to 2.1.18 (#94547) 2023-06-13 18:32:43 +02:00
Yuxin Wang
b1bdd92383 Add unit inference for Amps and VA in APCUPSD integration (#94431)
* Add unit inference for Amps and VA

* Rename `init_integration` to `async_init_integration` for better consistency with HA naming style
2023-06-13 16:38:56 +02:00
Nathan Spencer
47995fc274 Bump pylitterbot to 2023.4.2 (#94301) 2023-06-13 11:51:46 +02:00
Joakim Sørensen
889f3c36fc Adjust default name in backup service calls to match documentation (#94468) 2023-06-13 11:41:53 +02:00
Erik Montnemery
771a73c034 Add missing callback decorator to event helpers (#94483) 2023-06-13 11:16:43 +02:00
Raman Gupta
aab58ad89c Fix entity and device selector TypedDict's (#94510) 2023-06-13 10:52:55 +02:00
J. Nick Koston
0d1bcd8a8f Bump httpcore to 0.17.2 (#94515) 2023-06-13 10:38:51 +02:00
J. Nick Koston
8a1ca0a3f5 Bump zeroconf to 0.66.0 (#94512) 2023-06-13 10:38:26 +02:00
J. Nick Koston
d2fa6435da Bump lru-dict to 1.2.0 (#94513) 2023-06-13 10:37:59 +02:00
J. Nick Koston
829ca7c567 Bump orjson to 3.9.1 (#94514) 2023-06-13 10:36:56 +02:00
J. Nick Koston
e8c87874b3 Bump anyio to 3.7.0 (#94516) 2023-06-13 10:36:25 +02:00
dependabot[bot]
fd9b273f46 Bump dessant/lock-threads from 4.0.0 to 4.0.1 (#94523)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 10:33:21 +02:00
FFT
5d8a50baf0 Change pyoppleio to pyoppleio-legacy (#88050)
* Change pyoppleio to pyoppleio-310 (#75268)

* [m] change opple component's dependency to a new working one
2023-06-13 08:46:58 +02:00
Raman Gupta
f3ca3a8ee0 Set default value for endpoint in zwave device automations (#94445)
* Set default value for endpoint in zwave device automations

* add test case
2023-06-12 21:34:09 -04:00
Allen Porter
8e08338118 Bump google-nest-sdm to 2.2.5 (#94398) 2023-06-12 21:58:19 +02:00
G Johansson
bd74f03d0b Fix reload service in Command Line (#94436)
* Fix reload in Command Line

* Add read new yaml
2023-06-12 21:51:57 +02:00
G Johansson
f931cc3d1c Fix manual update for Command Line (#94433)
Manual update command line
2023-06-12 21:50:23 +02:00
Erik Montnemery
af6dac8584 Remove unnecessary condition from edl21 sensor (#94493) 2023-06-12 21:48:49 +02:00
Erik Montnemery
d51982f12f Add missing assert to test_async_remove_ignores_in_flight_polling (#94487) 2023-06-12 21:48:12 +02:00
Jan Bouwhuis
82b9a31ea7 Improve logging of mqtt discovery message errors (#94491)
* Improve logging on mqtt discovery message errors

* Create shared helper

* Apply suggestion

* Catch base class vol.Invalid
2023-06-12 21:28:28 +02:00
mover85
eb0485ebb0 Revert "Bump pydaikin 2.9.1 (#93635)" (#94469)
Revert to pydaikin 2.9.0
2023-06-12 20:58:20 +02:00
Luke
5cdb65100f Add Roborock DnD switch (#94474)
* add Dnd switch

* add dnd test

* fix typing
2023-06-12 20:30:15 +02:00
c0ffeeca7
854c709332 Update OwnTracks UI strings to reflect OwnTracks UI (#94476)
OwnTracks: update UI strings to reflect OwnTracks UI
2023-06-12 20:19:46 +02:00
Jan Bouwhuis
c756c7aceb Cleanup help_setup_helper in common mqtt tests (#94482) 2023-06-12 20:18:05 +02:00
jasonkuster
a25f3c9b27 Fix ZHA binding api to actually return responses (#94388) 2023-06-12 13:07:42 -04:00
Erik Montnemery
86f2aa84e5 Fix flaky ESPHome test fixture (#94465) 2023-06-12 16:59:11 +02:00
dependabot[bot]
d84b8a0288 Bump home-assistant/builder from 2023.03.0 to 2023.06.0 (#94453)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 12:14:32 +02:00
Franck Nijhof
eb2b1d2970 Add diagnostic support to Rituals Perfume Genie (#94373) 2023-06-12 11:33:47 +02:00
G Johansson
ce02261303 Remove Brottsplatskartan YAML configuration (#94101)
Remove platform yaml
2023-06-12 11:28:21 +02:00
G Johansson
f2cf92050a Remove Workday YAML configuration (#94102)
Remove platform yaml from workday
2023-06-12 11:27:37 +02:00
dependabot[bot]
4d3db038d6 Bump actions/checkout from 3.5.2 to 3.5.3 (#94452)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.2...v3.5.3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 10:42:40 +02:00
Erik Montnemery
f17773233b Add check for integration config schema to hassfest (#93587)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-12 10:26:02 +02:00
Sander
c79b9d0b07 Fix: Xiaomi Miio Fan, delay off countdown unit conversion (#94428) 2023-06-12 08:25:09 +02:00
Jan Bouwhuis
3adea14ddb Use TemplateSelector on imap custom imap_content event template config option (#94429)
Use TemplateSelector for imap custom template
2023-06-12 06:30:23 +02:00
Glenn Waters
acaa9ef9de Bump elkm1-lib to 2.2.5 (#94296)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-11 15:25:01 -10:00
Erik Montnemery
0fd28c91a8 Remove overridden entity_id property from WirelessTagSensor (#94339) 2023-06-11 17:29:53 -04:00
Sebastian Muszynski
2d62735b0d Fix deprecated asyncio.wait use with coroutines (#94371) 2023-06-11 20:01:41 +02:00
Christopher Bailey
fd43687833 Bump unifiprotect to 4.10.3 (#94416)
* Bump unifiprotect to 4.10.3

* Reqs
2023-06-11 10:22:12 -04:00
Tom Harris
3eedbe92ad Fix issue with Insteon linked devices maintaining current state (#94286)
* Bump pyinsteon

* Update tests
2023-06-11 10:21:33 -04:00
Jan Bouwhuis
3cf2c81baa Fix dep noaa-coops for noaa_tides (#94370)
Bump noaa-coops to 0.1.9
2023-06-11 10:21:06 -04:00
Jan-Philipp Benecke
7d0f5733c2 Improve the code quality of the Discovergy integration (#94165)
* Remove option flow, refactor and improve the code quality after review in PR #54280

* Remove coordinator.py from coverage report

* Some minor improvements for unit tests

* Remove _LOGGER

* Use pytest.fixture and some more improvments

* Add back empty __init__

* Fix docstring

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-11 12:51:43 +02:00
Joost Lekkerkerker
a8dd2d520a Abort youtube configuration if user has no channel (#94402)
* Abort configuration if user has no channel

* Clean up

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-11 12:30:38 +02:00
J. Nick Koston
9e666ae0c0 Reduce in progress flow matching overhead (#94403)
* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* augment cover
2023-06-11 10:41:38 +02:00
Raman Gupta
41d8ba3397 Re-add event listeners after Z-Wave server disconnection (#94383)
* Re-add event listeners after Z-Wave server disconnection

* switch order

* Add tests
2023-06-11 08:35:52 +02:00
Luke
eab024992e Add Cleaning area sensors to Roborock (#94200)
add clean area sensor
2023-06-10 20:31:34 -04:00
Marc Mueller
3b08d5f0c3 Improve renson typing (#94390) 2023-06-10 20:28:32 -04:00
Matthias Alphart
b45659eb84 Update knx-frontend to 2023.6.9.195839 (#94404) 2023-06-10 20:48:14 +02:00
J. Nick Koston
aa71c8e8f0 Reduce I/O from cert_expiry (#94399) 2023-06-10 12:53:09 -05:00
Matthias Alphart
ece5de73a4 Update xknxproject to 3.1.1 (#94375) 2023-06-10 10:41:51 +02:00
jimmyd-be
3d678f5b99 Renson integration (#56374)
* Implemented Renson integration

* -  renamed component to a better name
- Made cleaner code by splitting up files into different one
-  Fixed issues regarding getting data from library
- Added service.yaml file

* Added Renson services

* cleanup translations

* added config_flow tests

* changed config_flow, removed all services

* use SensorEntityDescription + introduced new binarySensor

* fixed config_flow test

* renamed renson_endura_delta to renson

* refactored sensors and implemented binary_sensor

* Changed some sensors to non measurement and added entity_registery_enabled_default for config sensors

* Enabled binary_sensor

* changed import to new renamed module

* Merge files into correct files + cleaned some code

* Change use of EntityDescription

* Update codeowners

* Fixed lint issues

* Fix sensor

* Create test.yml

* Update test.yml

* add github action tests

* Format json files

* Remove deprecated code

* Update homeassistant/components/renson/binary_sensor.py

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

* Use Coordinqte in Sensor

* Migrated binary sensor to use coordinate

* Removed firmwareSensor

* Add entity_catogory to binary_sensor

* Add services

* Revert "Add services"

This reverts commit 028760d8d8.

* update requirements of Renson integration

* Add services and fan

* Fixed some issue + fixed PR comments

* Cleanup code

* Go back 2 years ago to the bare minimum for PR approval

* Refactored code and added a lot of device classes to the entities

* Fix some bugs

* Add unique Id and some device class

* Show the level value for CURRENT_LEVEL_FIELD instead of the raw data

* Remove FILTER_PRESET_FIELD for now

* Make the _attr_unique_id unique

* Changed Renson tests

* Moved Renson hass data into @dataclass

* Changed test + added files to .coveragerc

* Add device_class=SensorDeviceClass.Duration

* Fix syntax

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-10 09:21:33 +02:00
Jafar Atili
26b78d2a7a fix: electrasmart - cast temperature to int in set_temperature (#94368)
fix: cast temperature to int
2023-06-09 21:54:11 +03:00
starkillerOG
117ab4a0e5 Bump reolink-aio to 0.6.0 (#94259) 2023-06-09 17:00:07 +02:00
J. Nick Koston
fc1eab1e7e Bump sensirion-ble to 0.1.0 (#94352) 2023-06-09 09:40:54 -05:00
Erik Montnemery
59f5b8f2d6 Remove unneeded checks for Entity.platform (#94321)
* Remove unneeded checks for Entity.platform

* Update tests

* Prevent breaking integrations without an EntityComponent

* Warn when entity has no platform
2023-06-09 15:17:41 +02:00
Erik Montnemery
239e2d9820 Migrate microsoft_face to EntityComponent (#94338) 2023-06-09 13:15:35 +02:00
Jan Bouwhuis
c984604a6c Refactor some mqtt tests not the just use schema validation (#94330)
Remove help_test_validate_platform_config
2023-06-09 12:30:26 +02:00
Jan Bouwhuis
5fb41777fd Cleanup MQTT schema from previous removed options (#94110)
* Cleanup removed validator schema option of #62680

* Cleanup removed climate options and abbreviations

* Removed white_value options for mqtt light

* Remove whaite value from mqtt json light
2023-06-09 12:12:20 +02:00
Erik Montnemery
e25fbecfdc Add missing super() call to EnergyCostSensor.add_to_platform_abort (#94322) 2023-06-09 11:28:12 +02:00
Erik Montnemery
4085c4f6d8 Tweak typing of Entity.platform (#88321)
* Tweak typing of Entity.platform

* Fix mypy errors

* Fix update test

* Improve comments
2023-06-09 10:56:04 +02:00
Erik Montnemery
41022fdce4 Add comments about removing deprecated code from sky_connect config flow (#94262) 2023-06-09 10:39:52 +02:00
Erik Montnemery
5e3b632b14 Drop call to usb.get_serial_by_id from zwave_js config flow (#94279) 2023-06-09 10:04:01 +02:00
Jonathan Keljo
288708474b Upgrade sisyphus-control to 3.1.3 (#94310) 2023-06-09 09:39:14 +02:00
Sven Serlier
7e75790281 Update URL in readme (#94282) 2023-06-09 09:24:53 +02:00
Luke
dafc7a15b1 Bump Python-Roborock to 23.6 for crash fix (#94281)
* bump to 23.5

* update to 23.5
2023-06-08 18:18:42 -07:00
Franck Nijhof
c3936e6f14 Replace isort with ruff (#94302) 2023-06-08 23:43:56 +02:00
Joost Lekkerkerker
ed3d38bb17 Request steam online friends from batches (#91167)
* Request friends from batches

* Add tests

* Add tests

* Fix feedback

* Add libcall to verify request length

* Improve tests
2023-06-08 17:08:14 -04:00
Erik Montnemery
23d15850da Use addon name as title in otbr hassio flow (#87081)
* Use addon name as title in otbr hassio flow

* Address review comments
2023-06-08 23:04:12 +02:00
Joost Lekkerkerker
b3a001996d Improve coverage for LastFM (#93661)
* Improve coverage for LastFM

* Improve tests

* Improve tests
2023-06-08 16:55:16 -04:00
Ville Skyttä
ca936d0b38 Replace bandit with ruff (#93200) 2023-06-08 22:46:04 +02:00
Ville Skyttä
f7938c940c Upgrade ruff to 0.0.272 (#94290) 2023-06-08 21:53:43 +02:00
Erik Montnemery
bdc82fa50a Drop call to usb.get_serial_by_id from modem_callerid config flow (#94275) 2023-06-08 19:21:31 +02:00
Erik Montnemery
0dbdfb7e70 Drop call to usb.get_serial_by_id from velbus config flow (#94276) 2023-06-08 19:21:19 +02:00
Erik Montnemery
35ad40421b Drop call to usb.get_serial_by_id from zha config flow (#94278) 2023-06-08 19:21:08 +02:00
Tom Harris
fceef42b08 Fix Insteon startup for users with X10 devices (#94277) 2023-06-08 18:36:42 +02:00
Erik Montnemery
c8756ba5bb Use stable USB device path in USB discovery (#94266) 2023-06-08 18:27:04 +02:00
Franck Nijhof
6db1fbf480 Fix repair issue about no yaml for config entries (#94271) 2023-06-08 18:22:34 +02:00
Paulus Schoutsen
76535d3f7d Fix default value when logger used (#94269) 2023-06-08 12:00:34 -04:00
hookedonunix
18cbc9b4c3 Add Water Heater platform to MQTT integration (#93644)
* Add Water Heater entity to MQTT

* Adding tests for Water Heater

* Remove duplicate line and unneeded var declaration

* Remove target temp range and away mode

* Move common Temperature Control conf to const

* Remove unnecessary platform schema and temp check

* Add common value template key test

* Use MqttTemperatureControl in Water Heater

* Move operation mode out of MqttTemperatureControl

* Remove unecessary attribute declaration

* Remove default min/max temp and auto init attr

* Fix mqtt water heater initial temp conversion

* Make async_set_temperature common

* Fix init temp comment

* Merge value_template_keys into get_with_templates

* Remove unnecessary operation_mode overriding

* Add async_set_temperature to water heater

* Fix docstring comments
2023-06-08 17:38:30 +02:00
Christopher Bailey
c697731657 Bump unifiprotect to 4.10.2 (#94263) 2023-06-08 11:08:52 -04:00
Franck Nijhof
395236f6cc Merge branch 'master' into dev 2023-06-08 16:32:52 +02:00
Joost Lekkerkerker
20449d1f01 Catch exception when user has no lastfm friends (#94235) 2023-06-08 16:08:18 +02:00
Paul Bottein
758eb5e510 Update frontend to 20230608.0 (#94256) 2023-06-08 15:59:56 +02:00
Kostas Chatzikokolakis
2f2504b534 Bump pulsectl to 23.5.2 (#94227) 2023-06-08 15:59:16 +02:00
jan iversen
48607d0586 Bump pymodbus to 3.3.1 (#94162) 2023-06-08 15:57:49 +02:00
Paulus Schoutsen
d2edfca2a2 Rename Local Media to My Media (#94201)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-08 15:56:49 +02:00
Joost Lekkerkerker
425c964898 Retrieve friends in an async manner in Lastfm (#94255) 2023-06-08 15:55:09 +02:00
Jc2k
77badafea1 Bump aiohomekit to 2.6.5 (fixes python 3.11 regression) (#94245) 2023-06-08 14:10:12 +01:00
Álvaro Fernández Rojas
081bc470db Update aioairzone-cloud to v0.1.8 (#94223) 2023-06-08 11:34:56 +02:00
Mick Vleeshouwer
5a90d18041 Bump pyoverkiz to 1.8.0 (#94176) 2023-06-08 11:33:35 +02:00
jan iversen
05e822b7a3 Solve wrong return code from modbus. (#94234) 2023-06-08 11:29:54 +02:00
Joost Lekkerkerker
00ecf51091 Bump python-opensky to 0.0.9 (#94224) 2023-06-08 11:13:24 +02:00
Jan Bouwhuis
7a195b5291 Fix imap crash on email without subject (#94230) 2023-06-08 11:11:12 +02:00
dependabot[bot]
08a85e35e2 Bump docker/login-action from 2.1.0 to 2.2.0 (#94221)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-08 10:58:13 +02:00
James Connor
f06ab91678 Fix ambiclimate for Python 3.11 (#94203)
Fix ambiclimate python 3.11 break
2023-06-08 09:43:30 +02:00
Allen Porter
52ba58c782 Require pydantic 1.10.8 or higher (#94208)
* Requied pydantic 1.10.9 or higher

* Simplify constraint to 2.0

* Drop constraint by one patch release to 1.10.8 or higher

* Add package constraints to gen requirements script
2023-06-08 09:41:45 +02:00
Jan-Philipp Benecke
99ee4e8a42 Set httpx log level to warning (#94217)
Set log level of httpx to warning
2023-06-08 09:39:06 +02:00
hookedonunix
85a12c37ee Sync Climate min/max temp with Google Assistant (#94143)
* Sync climate min/max temp to Google Assistant

* Improving coverage on TemperatureSettingTrait
2023-06-07 20:46:35 -04:00
Marc Mueller
a6a2b8d29f Update pydantic to 1.10.9 (#94178) 2023-06-07 20:46:01 -04:00
J. Nick Koston
88bfd94800 Add support for ESPHome raw bluetooth advertisements (#94138)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-07 18:36:22 -05:00
Jan Bouwhuis
8e9eb400bf Refactor async_set_temperature for mqtt climate (#94166) 2023-06-07 20:34:59 +02:00
Joost Lekkerkerker
7d8e412314 Fix Abode unit of measurement (#94168)
Change unit of measurement to HA const
2023-06-07 19:53:45 +02:00
Erik Montnemery
1fa2fb4639 Fix OTBR reset (#94157) 2023-06-07 18:42:40 +02:00
RenierM26
6af1beb6bf Change Ezviz detection sensitivity to update per entity (#93995)
* Split detection sensitivity updates to entity instead of coordinator.

* Detection Sensitivity entity individual poll.

* Api return None instead of "unkown" when unkown.

* Only add entity if camera supports

* Cleanup detection type

* Commit suggestions.

---------

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2023-06-07 18:36:39 +02:00
Justin Vanderhooft
d431a692e5 Bump melnor-bluetooth to fix a timezone issue (#94159) 2023-06-07 18:17:01 +02:00
Chris Xiao
05b5b30df3 Update python-qbittorrent to 0.4.3 (#94072) 2023-06-07 18:11:39 +02:00
Franck Nijhof
a4e236d0b9 2023.6.0 (#94158) 2023-06-07 15:39:47 +02:00
Franck Nijhof
421fa5b035 Bumped version to 2023.6.0 2023-06-07 13:49:03 +02:00
Erik Montnemery
3d3fecbd23 Disable google assistant local control of climate entities (#94153) 2023-06-07 13:48:20 +02:00
Erik Montnemery
468be632fd Add debug logs to cloud migration (#94151) 2023-06-07 13:48:17 +02:00
Bram Kragten
74ccdcda68 Update frontend to 20230607.0 (#94150) 2023-06-07 13:48:14 +02:00
Erik Montnemery
5cc61acfb2 Fix migration of Google Assistant cloud settings (#94148) 2023-06-07 13:48:11 +02:00
Christopher Bailey
02d55a8e49 Bump unifiprotect to 4.10.1 (#94141) 2023-06-07 13:48:06 +02:00
Erik Montnemery
df138d91e6 Disable google assistant local control of climate entities (#94153) 2023-06-07 13:46:17 +02:00
Erik Montnemery
4802e7f93a Add debug logs to cloud migration (#94151) 2023-06-07 13:16:23 +02:00
Bram Kragten
68baf84144 Update frontend to 20230607.0 (#94150) 2023-06-07 12:57:37 +02:00
Christopher Bailey
7f4d62c80f Bump unifiprotect to 4.10.1 (#94141) 2023-06-07 11:15:03 +02:00
Erik Montnemery
33044bc153 Fix migration of Google Assistant cloud settings (#94148) 2023-06-07 11:14:51 +02:00
J. Nick Koston
0a67f96402 Bump ruuvitag-ble to 0.1.2 (#94144) 2023-06-07 10:18:57 +02:00
Paulus Schoutsen
f4e3ef6b51 Bumped version to 2023.6.0b6 2023-06-06 22:00:28 -04:00
Paulus Schoutsen
7740539df0 Bump waqiasync to 1.1.0 (#94136) 2023-06-06 22:00:20 -04:00
Christopher Bailey
b077bf9b86 Fix multiple smart detects firing at once for UniFi Protect (#94133)
* Fix multiple smart detects firing at once

* Tweak

* Clean up logging. Linting

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

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

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

* adjust

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

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

* Update homeassistant/components/roborock/models.py

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

* adds snapshot

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-06 21:56:35 -04:00
Justin Vanderhooft
e6fcc6b73c fix: Bump melnor-bluetooth to fix deadlock (#94098) 2023-06-06 21:56:33 -04:00
Robert Svensson
e00012289d Bump aiounifi to v48 - Fix fail to initialise due to board_rev not exist (#94093) 2023-06-06 21:56:32 -04:00
Luke
f373f1abd5 Add missing translation keys for Roborock mop intensity (#94088) 2023-06-06 21:56:31 -04:00
puddly
2c43672a8a Include port info in the ZHA websocket settings response (#93934) 2023-06-06 21:56:30 -04:00
Luke
fe11cae08d Add diagnostics to Roborock (#94099)
* Add diagnostics

* Update homeassistant/components/roborock/models.py

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

* adds snapshot

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-06 21:24:36 -04:00
Paulus Schoutsen
d3fca972a5 Bump waqiasync to 1.1.0 (#94136) 2023-06-06 20:55:25 -04:00
G Johansson
c60e53b43f Remove left-over issue in Honeywell Lyric (#94092) 2023-06-06 20:54:09 -04:00
G Johansson
7d7920f483 Remove leftover issue in nVent RAYCHEM SENZ (#94105)
* Remove leftover issue senz

* strings
2023-06-06 20:47:32 -04:00
G Johansson
0d0de4aa50 Remove left-over issue Simplepush (#94103)
* Remove left-over issue simplepush

* strings
2023-06-06 20:45:07 -04:00
Luke
bee428e9f6 Bump python-roborock to 23.4 (#94111)
* bump to 23.0

* bump to 23.4
2023-06-06 20:42:59 -04:00
J. Nick Koston
001da39a47 Verify persistant notifications can be dismissed by the id they are created with (#94112) 2023-06-06 20:42:11 -04:00
Joost Lekkerkerker
6ab7b0f99c Fix typo in Picnic strings (#94117) 2023-06-06 20:40:59 -04:00
J. Nick Koston
463945b86e Remove mark_read service from persistent_notification (#94122)
* Remove mark_read from persistent_notification

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

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

* adjust

* adjust
2023-06-06 20:40:32 -04:00
Christopher Bailey
9b6a9147c7 Fix multiple smart detects firing at once for UniFi Protect (#94133)
* Fix multiple smart detects firing at once

* Tweak

* Clean up logging. Linting

* Linting
2023-06-06 20:07:21 -04:00
Shay Levy
a6bb70c5d2 Remove goalfeed integration (#94129) 2023-06-06 20:04:53 -04:00
Bram Kragten
66785bbfc7 Update frontend to 20230606.0 (#94119) 2023-06-06 20:04:22 -04:00
Marc Mueller
4c80420d2d Improve discovergy generic typing (#94131) 2023-06-06 19:47:13 -04:00
Joakim Plate
deaf910a24 Correct zha device classes for voc and pm25 (#94130)
Correct zha device classes
2023-06-06 23:03:59 +02:00
Jan-Philipp Benecke
d8ceb6463e Add new integration Discovergy (#54280)
* Add discovergy integration

* Capitalize measurement type as it is in uppercase

* Some logging and typing

* Add all-time total production power and check if meter has value before adding it

* Add tests for Discovergy and changing therefor library import

* Disable phase-specific sensor per default, set user_input as default for schema and implement some other suggestions form code review

* Removing translation, fixing import and some more review implementation

* Fixing CI issues

* Check if acces token keys are in dict the correct way

* Implement suggestions after code review

* Correcting property function

* Change state class to STATE_CLASS_TOTAL_INCREASING

* Add reauth workflow for Discovergy

* Bump pydiscovergy

* Implement code review

* Remove _meter from __init__

* Bump pydiscovergy & minor changes

* Add gas meter support

* bump pydiscovergy & error handling

* Add myself to CODEOWNERS for test directory

* Resorting CODEOWNERS

* Implement diagnostics and reduce API use

* Make homeassistant imports absolute

* Exclude diagnostics.py from coverage report

* Add sensors with different keys

* Reformatting files

* Use new naming style

* Refactoring and moving to basic auth for API authentication

* Remove device name form entity name

* Add integration type to discovergy and implement new unit of measurement

* Add system health to discovergy integration

* Use right array key when using an alternative_key & using UnitOfElectricPotential.VOLT

* Add options for precision and update interval to Discovergy

* Remove precision config option and let it handle HA

* Rename precision attribute and remove translation file

* Some formatting tweaks

* Some more tests

* Move sensor names to strings.json

* Redacting title and unique_id as it contains user email address
2023-06-06 13:44:00 -04:00
Jean-François Roy
5ab4bf218e Bump aiobafi6 to 0.8.2 (#94125) 2023-06-06 12:42:49 -05:00
puddly
b03c429db7 Revert "Increase Zigbee command retries (#93877)" (#94123) 2023-06-06 17:44:29 +02:00
Jan Bouwhuis
83b0ec5136 Freeze time on timer tests that assert on remaining time (#94078) 2023-06-06 09:18:25 -05:00
Jan Bouwhuis
0d4af6fb1e Stale doc string for mqtt light async_setup_entry (#94109) 2023-06-06 16:02:46 +02:00
G Johansson
05fbc09ef0 Remove Slack YAML configuration (#94106) 2023-06-06 16:01:40 +02:00
G Johansson
a1a20fab33 Remove leftover issue warning in SimpliSafe (#94104) 2023-06-06 08:00:59 -06:00
Paul Frank
c67f32b924 Add config flow to mystrom (#74719)
* rebase

* fixed review comments

* fix test

* Update tests

* increase test coverage

* implement some review comments

* Enhance device check for old FWs and add tests

* Reworked exception handling

* small code optimizations

* fix test

* Increase test coverage

* Update __init__.py

changed from hass.config_entries.async_setup_platforms(entry, PLATFORMS) to await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

* Update __init__.py

remove spaces

* Bump python-mystrom to 2.2.0

* Migrate to get_device_info from python-mystrom

* Migrate to get_device_info from python-mystrom

* Update __init__.py

* update requirements_all.txt

* update config_flow

* fix tests

* Update homeassistant/components/mystrom/__init__.py

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

* Implemented review changes

* increase test coverage

* Implemented user defined title

* implemented user defined title

* Additional review comments

* fix test

* fix linter

* fix linter

* Update homeassistant/components/mystrom/models.py

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

* fix review comments

* fix missing import

* simplify

* Update homeassistant/components/mystrom/__init__.py

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

* Update homeassistant/components/mystrom/__init__.py

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

* Update homeassistant/components/mystrom/config_flow.py

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

* Update homeassistant/components/mystrom/config_flow.py

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

* Update homeassistant/components/mystrom/config_flow.py

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

* Update tests/components/mystrom/test_init.py

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

* Update tests/components/mystrom/test_init.py

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

* Update tests/components/mystrom/test_init.py

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

* Update tests/components/mystrom/test_init.py

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

* Update homeassistant/components/mystrom/light.py

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

* Update homeassistant/components/mystrom/switch.py

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

* fix review comments

* fix review comments

* Update tests/components/mystrom/test_config_flow.py

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

* Update tests/components/mystrom/test_config_flow.py

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

* fix review comment

* Update tests/components/mystrom/test_config_flow.py

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

* Update tests/components/mystrom/test_config_flow.py

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

* Update tests/components/mystrom/test_config_flow.py

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

* Update tests/components/mystrom/test_config_flow.py

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

* Update tests/components/mystrom/test_config_flow.py

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

* Update tests/components/mystrom/test_config_flow.py

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-06 14:16:27 +02:00
Robert Svensson
ebafb1f2c8 Bump aiounifi to v48 - Fix fail to initialise due to board_rev not exist (#94093) 2023-06-06 09:08:17 +02:00
Justin Vanderhooft
0b880598ed fix: Bump melnor-bluetooth to fix deadlock (#94098) 2023-06-06 08:32:07 +02:00
G Johansson
49a394547a Remove platform YAML for Bose SoundTouch (#94090) 2023-06-06 08:26:36 +02:00
G Johansson
13da90da90 Remove left-over issue from platform YAML in Radarr (#94091) 2023-06-06 08:25:59 +02:00
Luke
554ed1e957 Add missing translation keys for Roborock mop intensity (#94088) 2023-06-06 08:25:25 +02:00
Álvaro Fernández Rojas
6019ec305a Update aioairzone to v0.6.3 and fix issue with latest firmware update (#94100) 2023-06-06 08:23:48 +02:00
G Johansson
9cbb993296 Remove Xbox YAML configuration (#94094) 2023-06-06 08:22:12 +02:00
Ian
4b4660994c Use shorthand attributes in NextBus (#94084)
* NextBus: Use attr with unique id

* Feedback

* Remove unique id
2023-06-06 07:08:42 +02:00
Paulus Schoutsen
7a6327d7e2 Bumped version to 2023.6.0b5 2023-06-05 16:13:07 -04:00
G Johansson
ee8f63b9c9 Fix reload service in Command Line (#94085)
Fix multi platform reload service in command line
2023-06-05 16:12:59 -04:00
Bram Kragten
28e0f5e104 Update frontend to 20230605.0 (#94083)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-05 16:12:58 -04:00
Michael Hansen
eb036af410 Bump intents to 2023.6.5 (#94077) 2023-06-05 16:12:57 -04:00
Luke
4bb6fec1d6 Don't add Roborock switches if it is not supported (#94069)
* don't add switches if it is not supported

* don't create entity unless if it is valid

* Raise on other exceptions

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

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

* Add test

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

* Make extra state attributes not optional

* Revert "Make extra state attributes not optional"

This reverts commit d2f9e936c8.
2023-06-05 16:12:48 -04:00
tronikos
9aeba6221b Fix error in tibber while fetching latest statistics (#93998) 2023-06-05 15:55:59 -04:00
G Johansson
228da71cc4 Fix reload service in Command Line (#94085)
Fix multi platform reload service in command line
2023-06-05 15:54:51 -04:00
Luke
e30e423091 Don't add Roborock switches if it is not supported (#94069)
* don't add switches if it is not supported

* don't create entity unless if it is valid

* Raise on other exceptions

* rework valid_enties
2023-06-05 15:52:40 -04:00
Bram Kragten
7e72d3c562 Update frontend to 20230605.0 (#94083)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-05 20:16:11 +02:00
j4n-e4t
28f6062bab Add error handling to input_select integration (#93940) 2023-06-05 19:53:24 +02:00
Michael Hansen
e2c2262719 Bump intents to 2023.6.5 (#94077) 2023-06-05 19:49:01 +02:00
J. Nick Koston
fb9a9aea12 Fix wheel builds on armhf and armv7 (#94053) 2023-06-05 19:48:18 +02:00
G Johansson
40cb9337c5 Remove snapcast YAML configuration (#93547)
Remove platform yaml snapcast
2023-06-05 18:28:08 +02:00
G Johansson
d9ac041e17 Remove qbittorrent YAML configuration (#93548)
Remove platform yaml qbittorrent
2023-06-05 18:14:07 +02:00
Jan Bouwhuis
437de7c2a3 Fix mqtt climate initial temperature conversion and precision (#93965)
* Fix mqtt climate initial temperature conversion

* Avoid changing hass temperature_unit

* Update comment
2023-06-05 17:02:31 +02:00
Chris Xiao
5a80eddbd7 Clean up error logging in qbittorrent (#94071) 2023-06-05 16:21:23 +02:00
J. Nick Koston
be2389a9db Bump zeroconf to 0.64.0 (#94052) 2023-06-04 21:14:44 -05:00
Chris Talkington
d8b4d71475 Update pyipp to 0.14.0 (#94050) 2023-06-04 21:14:31 -05:00
Robert Hillis
7f480849e2 Add camera platform to Dremel (#93882)
* Add camera platform to Dremel

* unload and tests
2023-06-04 20:28:28 -04:00
J. Nick Koston
5078bb3bef Remove miniaudio pin now that upstream package has been fixed (#94034)
see https://github.com/irmen/pyminiaudio/issues/67#issuecomment-1575602707
2023-06-04 20:27:42 -04:00
Artem Draft
06bcb69a56 Add media stop to LG Netcast TV (#93615) 2023-06-04 19:26:26 -05:00
Maciej Bieniek
fe61672792 Don't inherit SensorEntity/NumberEntity and RestoreEntity in Shelly integration (#93531)
* Use RestoreNumber and Restore Sensor for block entities

* Update tests

* Use RestoreSensor for RPC entities

* Fix test for number platform
2023-06-04 19:14:08 -05:00
Ernst Klamer
7c02e1ca99 Bump xiaomi-ble to 0.17.2 (#94011)
Bump xiaomi-ble

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-04 19:07:37 -05:00
Pascal Reeb
a08e516da0 Update pynuki to 1.6.2 (#94041)
chore(component/nuki): update pynuki to 1.6.2
2023-06-04 19:06:38 -05:00
Luke
5d9c36ac44 Bump Roborock to 0.21.0 (#94035)
bump to 21.0
2023-06-04 19:02:13 -05:00
J. Nick Koston
09882923d2 Drop codeowner for gogogate2 (#94049) 2023-06-04 18:42:37 -05:00
Raman Gupta
5461d0e28f Fix zwave_js.update entity restore logic (#94043) 2023-06-05 00:35:17 +02:00
G Johansson
b5b9a06c2c Refactor Command Line sensor to use ManualTriggerEntity (#93999)
* Refactor sensor to use ManualTriggerEntity

* Add device and state class
2023-06-04 15:00:53 -04:00
G Johansson
1fe4c4fa59 Remove update_before_add from binary_sensor in Command Line (#94040)
Remove update_before_add
2023-06-04 14:53:34 -04:00
Rami Mosleh
07e26f9639 Drop codeowner for IMAP (#94033) 2023-06-04 11:59:03 -05:00
tronikos
53e456f453 Android TV Remote: Abort zeroconf if mac address is missing (#94026)
Abort zeroconf if mac address is missing
2023-06-04 10:49:18 +02:00
Joost Lekkerkerker
efb92ca9ee Show the sensor state using the coordinatordata instead of initial data (#94008)
* Show the sensor state using the coordinatordata instead of initial data

* Add test

* Remove part
2023-06-03 14:35:57 -04:00
G Johansson
76d8c047ec Refactor Command Line cover to use ManualTriggerEntity (#93997)
Refactor command_line cover
2023-06-03 14:19:59 -04:00
G Johansson
391c63640a Refactor Command Line binary sensor to use ManualTriggerEntity (#94000)
Refactor binary sensor ManualTriggerEntity
2023-06-03 14:11:42 -04:00
Michael Benz
305fa128fb Add reload support to intent_script (#93404)
* support live reload of intent_script

* add services.yaml

* update tesls for full code coverage

* Update based on feedback

* fix intent_script reload when no intent_script config

* Update homeassistant/helpers/intent.py

* update tests to handle no_existing better

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-03 14:02:23 -04:00
Paulus Schoutsen
65b62d877d Keep track what devices support Assist features (#93990) 2023-06-03 08:26:28 -05:00
tronikos
faacf1658f Fix error in tibber while fetching latest statistics (#93998) 2023-06-03 08:25:39 -05:00
Paulus Schoutsen
bb2a89f065 Bumped version to 2023.6.0b4 2023-06-02 23:35:41 -04:00
Robert Hillis
f92298c6fc Catch Google Sheets api error (#93979) 2023-06-02 23:35:36 -04:00
G Johansson
6ff55a6505 Add scan interval to Command Line (#93752)
* Add scan interval

* Handle previous not complete

* Fix faulty text

* Add tests

* lingering

* Cool down

* Fix tests
2023-06-02 23:35:35 -04:00
G Johansson
038b0e6d23 Add scan interval to Command Line (#93752)
* Add scan interval

* Handle previous not complete

* Fix faulty text

* Add tests

* lingering

* Cool down

* Fix tests
2023-06-02 23:35:11 -04:00
Sven Serlier
aa636a2805 Fix broken URL in Z-Wave JS (#93983)
Fix broken URL
2023-06-02 16:54:15 -04:00
Robert Hillis
6c5fd40c92 Catch Google Sheets api error (#93979) 2023-06-02 16:18:58 -04:00
Simone Chemelli
2a9bcae365 Fritz: cleanup unused variables (#93971)
Cleanup
2023-06-02 16:17:16 -04:00
Paulus Schoutsen
32f7f39eca Bumped version to 2023.6.0b3 2023-06-02 08:46:29 -04:00
Raman Gupta
177cd0f697 Improve logic for zwave_js.lock.is_locked attr (#93947) 2023-06-02 08:45:56 -04:00
Raman Gupta
3d4ba15a95 Make Z-Wave device IBT4ZWAVE discoverable as a cover (#93946)
* Make Z-Wave device IBT4ZWAVE discoverable as a cover

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

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

fixes #93941

* Fix august aiohttp session being closed out from under it

fixes #93941

* Fix august aiohttp session being closed out from under it

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

* keep last valid state

* typo

* increase coverage

* better error handling

* debug messages

* increase coverage

* remove random log

* don't expose last_valid_state as an attribute
2023-06-02 08:45:50 -04:00
Tudor Sandu
e58ea00ce6 Fix states not being translated in voice assistants (#93572)
Fix states not being translated
2023-06-02 08:45:49 -04:00
Diogo Gomes
b5f582eecc Make Riemann sum sensors restore last valid state (#93674)
* keep last valid state

* keep last valid state

* typo

* increase coverage

* better error handling

* debug messages

* increase coverage

* remove random log

* don't expose last_valid_state as an attribute
2023-06-02 08:44:36 -04:00
Raman Gupta
d9f059fcaa Improve logic for zwave_js.lock.is_locked attr (#93947) 2023-06-02 06:12:32 -04:00
Raman Gupta
3934f91242 Make Z-Wave device IBT4ZWAVE discoverable as a cover (#93946)
* Make Z-Wave device IBT4ZWAVE discoverable as a cover

* Test device class
2023-06-02 06:09:53 -04:00
Erik Montnemery
ce9a0059d1 Add empty config schema to stt (#93954) 2023-06-02 06:07:44 -04:00
Erik Montnemery
7db943d138 Add CONFIG_SCHEMA to imap_email_content (#93951)
* Add CONFIG_SCHEMA to imap_email_content

* Update homeassistant/components/imap_email_content/__init__.py

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

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-06-02 06:06:59 -04:00
Erik Montnemery
3ed8e2d0e1 Add empty config schema to mailbox (#93953) 2023-06-02 09:28:13 +02:00
Erik Montnemery
0916a6c0cb Remove insteon import flow (#93952) 2023-06-02 09:21:19 +02:00
Chris Talkington
f941203949 Update pyipp to 0.13.0 (#93886) 2023-06-01 22:24:53 -05:00
Tudor Sandu
95e4ef2255 Fix states not being translated in voice assistants (#93572)
Fix states not being translated
2023-06-01 20:10:57 -04:00
J. Nick Koston
8ef799601b Bump aiohomekit to 2.6.4 (#93943)
changelog: https://github.com/Jc2k/aiohomekit/compare/2.6.3...2.6.4

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

fixes #93941

* Fix august aiohttp session being closed out from under it

fixes #93941

* Fix august aiohttp session being closed out from under it

fixes #93941
2023-06-01 19:54:25 -04:00
automaton82
ba66a39668 Update netdata to 1.1.0, set longer timeout (#93937) 2023-06-01 22:23:26 +02:00
Paulus Schoutsen
a98094eda6 Bumped version to 2023.6.0b2 2023-06-01 15:07:11 -04:00
J. Nick Koston
3317ea7d95 Bump pyunifiprotect to 4.9.1 (#93931) 2023-06-01 15:07:06 -04:00
J. Nick Koston
4e19843152 Bump python-onvif-zeep to 3.1.9 (#93930) 2023-06-01 15:07:05 -04:00
J. Nick Koston
5ac3bb9e9b Fix onvif cameras that use basic auth with no password (#93928) 2023-06-01 15:07:04 -04:00
Bram Kragten
358700af4e Update frontend to 20230601.1 (#93927) 2023-06-01 15:07:03 -04:00
J. Nick Koston
50bd9e9fdd Make RestoreStateData.async_get_instance backwards compatible (#93924) 2023-06-01 15:07:02 -04:00
Joakim Plate
7f6c0fdd4c Raise exception instead of hide in logs on zha write (#93571)
Raise exception instead of hide in logs

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

* Add new files

* Add ZHA tests

* Prevent ZHA from creating database during tests

* Add delay parameter to async_change_channel

* Add the updated dataset to the dataset store

* Allow MultipanProtocol.async_change_channel to return a task

* Notify user about the duration of migration

* Update tests
2023-06-01 15:06:59 -04:00
Erik Montnemery
bb5430ff59 Remove async_setup from locative (#93895)
* Remove async_setup from locative

* Micro-optimize async_setup_entry
2023-06-01 20:08:32 +02:00
Brent Perdue
23ca26ae56 Add save clips to Blink services (#84149) 2023-06-01 20:06:53 +02:00
Erik Montnemery
a1a055f618 Add config entry only config schema to integrations s-z (#93910) 2023-06-01 20:05:11 +02:00
puddly
cc47736d20 Include port info in the ZHA websocket settings response (#93934) 2023-06-01 19:53:41 +02:00
J. Nick Koston
457bc4571d Make RestoreStateData.async_get_instance backwards compatible (#93924) 2023-06-01 19:31:17 +02:00
J. Nick Koston
5a8daf06e8 Fix typing_extensions to match metadata (#93920) 2023-06-01 19:30:08 +02:00
andiukas
1a798f6eee Adding new supported language code to Google translate (#93926) 2023-06-01 19:29:15 +02:00
Bram Kragten
145a8bc41d Update frontend to 20230601.1 (#93927) 2023-06-01 19:23:42 +02:00
J. Nick Koston
5365d57bef Bump pyunifiprotect to 4.9.1 (#93931) 2023-06-01 19:20:32 +02:00
Tobias G
d4e352d6a7 Add humidity sensor to deconz component (#93024)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-06-01 19:16:42 +02:00
J. Nick Koston
0ca53eccb8 Bump python-onvif-zeep to 3.1.9 (#93930) 2023-06-01 19:15:16 +02:00
J. Nick Koston
240372b45d Fix onvif cameras that use basic auth with no password (#93928) 2023-06-01 19:14:03 +02:00
Arjan
8f485be87e Properly order moon phases in attribute (#93933) 2023-06-01 19:09:09 +02:00
Sebastian Heiden
a260c11d4e Fix LaMetric Config Flow for SKY (#93483)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-01 18:04:00 +02:00
Erik Montnemery
f9037d5f6d Add platform only config schema to nsw_fuel_station and ping (#93913) 2023-06-01 17:30:15 +02:00
Joost Lekkerkerker
e33ae72f95 Bump python-opensky (#93916) 2023-06-01 11:01:51 -04:00
Joakim Plate
9aed5a47ae Raise exception instead of hide in logs on zha write (#93571)
Raise exception instead of hide in logs

Write request that failed parsing of data would fail,
yet display as successful in the gui.
2023-06-01 10:18:49 -04:00
disforw
1f0e235b99 Move QNAP constants (#93918)
* Create const.py

* Update sensor.py

* Add docstring

* Update sensor.py

* Update homeassistant/components/qnap/sensor.py

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

* Update homeassistant/components/qnap/const.py

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-01 16:13:07 +02:00
Erik Montnemery
1a3d6bbb9a Fix typo in cloud (#93917) 2023-06-01 15:21:15 +02:00
disforw
6c7d922def Adding myself as codeowner to QNAP (#93915)
* Adding codeowner and integration_type

* Update CODEOWNERS

* Update sorting

* Update integrations.json
2023-06-01 14:53:28 +02:00
Erik Montnemery
677dd5b1fd Remove async_setup from traccar (#93912) 2023-06-01 13:37:02 +02:00
Erik Montnemery
09e8d7df0f Remove async_setup from sky_hub (#93911) 2023-06-01 13:30:52 +02:00
Erik Montnemery
c1c319d4d1 Rename cv.no_yaml_config_schema to cv.config_entry_only_config_schema (#93908)
* Rename cv.no_yaml_config_schema to cv.config_entry_only_config_schema

* ✏️
2023-06-01 13:15:48 +02:00
RenierM26
e05c04fadb Add Ezviz light entity (#93710)
* Initial commit

* Add ezviz light entity.

* coveragerc

* Apply suggestions from code review

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-01 13:01:57 +02:00
Erik Montnemery
15e5cf01bb Add silabs_multiprotocol platform (#92904)
* Add silabs_multiprotocol platform

* Add new files

* Add ZHA tests

* Prevent ZHA from creating database during tests

* Add delay parameter to async_change_channel

* Add the updated dataset to the dataset store

* Allow MultipanProtocol.async_change_channel to return a task

* Notify user about the duration of migration

* Update tests
2023-06-01 12:32:14 +02:00
Erik Montnemery
4f153a8f90 Remove async_setup from hyperion (#93894) 2023-06-01 12:20:04 +02:00
Erik Montnemery
4e5902c15b Remove async_setup from gpslogger (#93893) 2023-06-01 12:19:14 +02:00
Erik Montnemery
c5dd540ffc Remove async_setup from econet (#93892) 2023-06-01 12:18:54 +02:00
Erik Montnemery
fd08cfb074 Add empty config schema to mobile_app (#93900) 2023-06-01 12:17:55 +02:00
Joost Lekkerkerker
a6b6b03f2e Add video id to youtube sensor state attributes (#93668)
* Add video id to state attributes

* Make extra state attributes not optional

* Revert "Make extra state attributes not optional"

This reverts commit d2f9e936c8.
2023-06-01 11:46:59 +02:00
Erik Montnemery
a4b8b4f7c2 Add config entry only config schema to integrations a-r (#93899) 2023-06-01 11:42:14 +02:00
Erik Montnemery
f2ea2a886c Remove setup from remote_rpi_gpio (#93901) 2023-06-01 11:36:20 +02:00
Erik Montnemery
08bfe8f5cc Remove async_setup from ring (#93902) 2023-06-01 11:34:18 +02:00
Erik Montnemery
ba76bbee44 Remove async_setup from zerproc (#93903) 2023-06-01 11:33:37 +02:00
Erik Montnemery
e0db9ab041 Add CONFIG_SCHEMA to broadlink (#93854)
* Add CONFIG_SCHEMA to broadlink

* Simplify error message

* Rename to no_yaml_config_schema

* Add tests

* Raise issue

* Tweak repairs issue description and title

* Update homeassistant/helpers/config_validation.py

* Add link

* Update homeassistant/components/homeassistant/strings.json

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

* Fix logic, add test

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-01 09:51:26 +02:00
Tom Harris
f73754ff58 Restructure Insteon start-up (#92818)
* Restructure startup

* Code review

* Further typing

* Fix circular import
2023-06-01 08:50:35 +02:00
Paulus Schoutsen
65a9bd661d Bumped version to 2023.6.0b1 2023-05-31 21:17:59 -04:00
Paulus Schoutsen
fb50f0d875 Bump frontend to 20230601.0 (#93884) 2023-05-31 21:17:51 -04:00
puddly
d6f2e1cdff Increase Zigbee command retries (#93877)
* Enable retries for requests

* Update unit tests

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

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

* airzone_cloud: fix copy&paste description

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

---------

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

* Update homeassistant/components/filter/sensor.py

* Update homeassistant/components/filter/sensor.py

---------

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

* reset filter on unit change
2023-05-31 21:17:47 -04:00
Paulus Schoutsen
938ff679de Bump frontend to 20230601.0 (#93884) 2023-05-31 21:14:59 -04:00
J. Nick Koston
7995d3777a Fix package names to match pypi index metadata (#93883)
* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* uses _

* uses -

* fix metadata
2023-05-31 21:12:53 -04:00
Diogo Gomes
046ae8eb1e Delay filter integration until after HA has started (#91034)
* delay filter start

* Update homeassistant/components/filter/sensor.py

* Update homeassistant/components/filter/sensor.py

---------

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

* reset filter on unit change
2023-05-31 21:03:55 -04:00
Álvaro Fernández Rojas
11e268775c Update aioairzone-cloud to v0.1.7 (#93871)
* Update aioairzone-cloud to v0.1.7

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

* airzone_cloud: fix copy&paste description

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-31 20:09:23 -04:00
puddly
b9ec3a8af8 Increase Zigbee command retries (#93877)
* Enable retries for requests

* Update unit tests

* Account for fewer group retries in unit tests
2023-05-31 20:08:18 -04:00
Robert Hillis
226647f625 Add binary sensor platform to Dremel 3D Printer (#93881)
Add binary sensor platform to Dremel
2023-05-31 20:07:14 -04:00
mkmer
198608906c Address late review for whirlpool (#93874)
Address late review
2023-06-01 00:21:13 +02:00
Mike Degatano
e272e3c721 Refactor try catch in hassio.issues per feedback (#93872) 2023-06-01 00:11:00 +02:00
Jeff Grieger
47a2d5b472 Add zwave_js speed config for additional GE/Jasco fan controllers (#92371)
* Add zwave_js speed config for additional GE/Jasco fan controllers

Add speed info for Honeywell(GE/Jasco) 39358 In-Wall Fan Speed Control and Enbrighten(GE/Jasco) 55258 In-Wall Fan Speed Control.

* Add test for Honeywell 39358 In-Wall Fan Speed Control
2023-06-01 00:09:35 +02:00
Paulus Schoutsen
cd330a2740 Pass device ID to conversation input (#93867) 2023-05-31 16:56:12 -04:00
Robert Hillis
a1e9cf1c24 Add Dremel 3D Printer integration (#85969)
* Add Dremel 3D Printer integration

* remove validators requirement

* ruff

* uno mas

* uno mas

* uno mas

* uno mas

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Tom Harris <tomharris@harrisnj.net>
2023-05-31 16:55:57 -04:00
Franck Nijhof
8d8d0fc9d2 Bump version to 2023.7.0dev0 (#93869) 2023-05-31 20:34:30 +02:00
Franck Nijhof
ab2e891e91 Bumped version to 2023.6.0b0 2023-05-31 17:55:47 +02:00
Raman Gupta
cb616cdf4e Move Z-Wave refresh value service out of task (#93866) 2023-05-31 11:52:01 -04:00
Bram Kragten
22e7c9cc76 Update frontend to 20230531.0 (#93862) 2023-05-31 17:23:13 +02:00
Matthias Alphart
7b7ea24303 Update knx-frontend to 2023.5.31.141540 (#93864) 2023-05-31 17:20:53 +02:00
Raman Gupta
f1552304e1 Give zwave_js platinum quality score (#93845) 2023-05-31 17:15:44 +02:00
Raman Gupta
bd8c88f51b Add error handling for all zwave_js service calls (#93846)
* Add error handling for all service calls

* Switch siren to use internal function

* Remove failing checks

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

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

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

* Apply suggestions from code review

---------

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

* Apply suggestions from code review

* Update homeassistant/components/tts/media_source.py

---------

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

* Apply suggestions from code review

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

---------

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

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

* Remove unused type hints

* Split shared and specific subscriptions

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

* Use async_track_device_registry_updated_event

* Fix unsubscribe

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

* Fix feedback

* Fix review

* Update homeassistant/components/homeassistant/strings.json

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

---------

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

* Update device automation logic

* Make endpoint required

* Update homeassistant/components/zwave_js/services.py

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

* Update homeassistant/components/zwave_js/services.py

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

---------

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

* Move ERROR_REQUEST_RETRY to consts

* Add tests for the swallow exception behavior

* Update tests/components/songpal/test_media_player.py

---------

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

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

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

* Update language.py

* Update test_language.py

* Update test_language.py

* Update test_language.py

* Simplify duplicate language check

---------

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

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

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

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

We now use the same pattern as the registry helpers

* fix refactoring error -- guess I am tired

* fixes

* fix tests

* fix more

* fix more

* fix zha tests

* fix zha tests

* comments

* fix error

* add missing coverage

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

* Enable autotracking stream by default

* Add snapshot high/low resolution

* Improve naming

* fix snapshots camera's not beeing added

* keep unique ID the same

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

* Switch to format_mac

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

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

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

* reset en

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

fixes #86665

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

* add switch platform

* remove stale comments

* remove stale list

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

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

* Specify coordinator data type

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

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

This is a first pass attempt to improve the performance

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

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

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

* Log warning file is invalid

* More explicit log warning message

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

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

* use va_version 3 instead of ESPHome version

* Convert repeated fixtures to factory

* Add some v3 tests

* Add conversation_id

* Bump aioesphomeapi to 13.8.0

* Fix missed buffering of detected chunk

* Alter log message

* Updates

* Spelling

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

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

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

* Add background RSSI

* Remove extra logging statement

* fix test

* comments

* setup platform once

* Add static properties to entity description

* Update homeassistant/components/zwave_js/sensor.py

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

* don't dupe attribute values in entity description

* fix exception

---------

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

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

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

* Remove unused entity const

* remove unusued imports

* review comments

* switch to reserved values

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

* Add timeout

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

* Remove extra fixtures

* cleanup old stuff

* Get coverage to 100

* Add support for Window Covering CC

* fix bug

* typo

* remove redundant stuff

* slight change to improve readability

* Add device class

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

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

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

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

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

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

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

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

This place was sadly missed

* No need to raise special, we can assert instead

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

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

* add sensor test

* update to cleaning time

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

* More cleanup

* cleanup async_reload_manual_mqtt_items

* Add test

* Improve test

* Remove unuse mocks from test

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

* bs and cover

* notify

* sensor

* switch

* Issues

* Finalize __init__

* First pass tests

* Fix Binary sensors

* Test cover

* Test notify

* Test sensor

* Tests switch

* Fix coverage

* Add codeowner

* Fix caplog

* test issue

* Flaky test notify

* Fix async

* Adjust yaml structure

* Change yaml format again

* Issue strings

* Fix tests

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

* Add strings for options flow

* Add strings for options flow

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

* Modify issue

* Remove deprecation

* Fix strings

* Strings

* Last strings

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

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

see #93649

* coverage

* make sure entities are being updated in parallel

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

* Add test

* Update homeassistant/helpers/config_validation.py

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

---------

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

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

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

* Remove import step from config flow

* Remove import tests

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

* Update .strict-typing

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

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

* Update homeassistant/helpers/event.py

* dry

* dry

* reduce

* reduce

* reorder

* reduce

* cleanup stack depth

* dry

* fix double lookup

* remove unused

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

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

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

* change during iteration fix

* change during iteration fix

* cleanup

* cleanup

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

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

We serialize a lot of small messages over the websocket

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

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

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

Avoids jump to executor

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

Avoids jump to executor

* stream as well

* fix

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

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

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

* update test

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

* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add Youtube stub

* Add Youtube stub

* Add tests

* Add tests

* Add tests

* Clean up

* Add test for options flow

* Fix feedback

* Fix feedback

* Remove obsolete request

* Catch exceptions

* Parallelize latest video calls

* Apply suggestions from code review

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

* Add youtube to google brands

* Fix feedback

* Fix feedback

* Fix test

* Fix test

* Add unit test for http error

* Update homeassistant/components/youtube/coordinator.py

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

* Fix black

* Fix feedback

* Fix feedback

* Fix tests

---------

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

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

* Update homeassistant/components/mystrom/light.py

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

* Update homeassistant/components/mystrom/light.py

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

* Update homeassistant/components/mystrom/light.py

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

* Update homeassistant/components/mystrom/light.py

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

* Update homeassistant/components/mystrom/light.py

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

* Update homeassistant/components/mystrom/light.py

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

* Update homeassistant/components/mystrom/switch.py

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

* Update homeassistant/components/mystrom/switch.py

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

* review comment

---------

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

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

* Complete migration of persistent notifications

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

* fixes

* fixes

* fixes

* ws test

* update tests

* update tests

* fix more tests

* fix more tests

* more fixes

* fix

* fix person

* fix person

* keep whitelist

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

related issue #93258

* Add additional coverage to history websocket api

related issue #93258

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

* Apply suggestions from code review

* resort

* zero instead

* fix exception

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

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

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

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

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

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

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

It was never optimized after that happened.

This change reduces the run time by ~70%

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

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

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

* Move constant values to separate file

* Add config flow to lastfm

* Add tests

* Add config flow to lastfm

* Add tests

* Add tests

* Add tests

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add OptionsFlow

* Add tests

* Fix feedback

* Fix feedback

* Fix feedback

* Fix feedback

* Fix test

* Apply suggestions from code review

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

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update homeassistant/components/lastfm/config_flow.py

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

* Add tests

* Cleanup

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Fix test

* Fix feedback

* Codeowner lastfm

* Fix feedback

* Fix feedback

* Parametrize errors

* Parametrize errors

* Parametrize errors

* Finish tests

---------

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

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

* Remove unrelated files

* Remove version bump

* Revert "Remove version bump"

This reverts commit ed440899f9.

* Revert "Remove unrelated files"

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

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

* Fix styling

* fix tests

* improve tests

* Revert device trigger

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

* Add number entity.

* update coveragerc

* Add services back and add depreciation repair.

* Remove redundant typing declaration.

* Case change in strings.

* Apply cleanups from simular pull request.

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

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

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

* airzone_cloue: remove unused import

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

* airzone_cloud: diagnostics: redact additional API keys

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

---------

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

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

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

* Improve xpath query for Microsoft TTS languages

* Remove asserts for Microsoft TTS languages

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

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

* fix: lint

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

---------

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

* expose mute property

* add volume entity description

* add beep entity description

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

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-25 09:48:52 +02:00
Marc Mueller
64118ee011 Improve hydrawise typing (#93503)
* Improve hydrawise generic typing

* Enable strict typing

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

* guard for None devicetype (just in case)

* Update homeassistant/components/matter/adapter.py

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

* Update homeassistant/components/matter/adapter.py

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

* Update homeassistant/components/matter/adapter.py

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

* Update homeassistant/components/matter/adapter.py

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

* black and isort

* Code quality

* Add tests

* Add coverage test, add None for empty string

---------

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

* Remove extra fixtures

* cleanup old stuff

* Get coverage to 100

* Remove redundant stuff

* Revert all changes to tests

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

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

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

* airzone: climate: update max/min temps

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

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

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

This reverts commit 988194d486.

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

This reverts commit e4ead24f71.

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

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

* tests: airzone: fix dict copy

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

---------

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

* add value_fn typing

* fixed strings

* Update homeassistant/components/roborock/sensor.py

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

* change to work time instead of time left

* added time left back

* fixed tests

* made diagnostic

---------

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

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

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

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

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

Add resize_keyboard and one_time_keyboard attributes

* Apply review changes

* Update homeassistant/components/telegram_bot/__init__.py

* Update __init__.py

---------

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

* fix styling

* switch back to async_config_entry_first_refresh

* fix still raising when starting

* missing return

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

* Fix copy pasta comments

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

* remove stale test

* Make all indicators diagnostic

* only set entity category if it is specified

* Only set properties from discovery if specified

* Conditionally set assumed state as well

* fix const name

* Don't create task

* Disable property keys 3-5 by default

* add additional dispatcher_connects so we catch all signals

* be consistent about order

* rename new discovery parameter

* comment

* exclude property keys 3-5

* fix remove logic

* add comment so I don't forget

* Switch entity category to config where necessary

* cut line

* less lines

* Update homeassistant/components/zwave_js/switch.py

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

* Move async_remove to respond to interview started event

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

* remove dupe import

* black

* append

---------

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

* simplify

* define constant for setting value to previous value

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

* missed commit

* better code

* Add tests and use constant from lib

* fix logic

* fix bug

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

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

* Remove duplicated code

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

* Move function to make diff easier to view

* Actually make it easier to view

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

* PR review - add suggested_display_precision

* Test - fix

* Bump pydeconz to v112

* PR review - add suggested_display_precision

* Fix tests

---------

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

Fix to update media_position_updated_at attribute when media_position attribute is updated.

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

* Replace DATA_HYDRAWISE with DOMAIN

* Replace persistent notification with a ConfigEntryNotReady exception

* Changes requested during PR review

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

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

---------

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

* Move function to library

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

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

Fixes #89249

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

* Fix circular import

* Address review comments

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

* Fix coverage

* Change storage_location to backup_location

* Use backticks

* Update homeassistant/helpers/selector.py

---------

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

* fixes

* bump pyswitchbee

* bump pyswitchbee

* bump pyswitchbee

* fix

* bump pyswitchbee

* Apply suggestions from code review

---------

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

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

* Adjust config tests to use kitchen_sink

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

* Move Twitch constants to separate file

* Move Twitch constants to separate file

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

* Update requirements_test_all

* Update tests/components/microsoft/__init__.py

---------

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

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

Fixes late comment when select platform was introduced.

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

* airzone: select: make options translatable

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

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

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

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

* tests: airzone: fix python 3.10 tests

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

* airzone: select: add manual dict values

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

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

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

This reverts commit b818a2674d.

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

This reverts commit 93f8bd1430.

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

This reverts commit e503a1dd3a.

* airzone: select: options: copy dict to list

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

* airzone: select: use degree symbol

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

---------

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

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

* Plugwise prepare value_fn for select

* Try proposed options

* Fix initial defs

---------

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

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

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

* init

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

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* lint

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

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

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

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

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

* Fix snapshots after dependency bump

* Load gcid from config entry if available

* Add tests

---------

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

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

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

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

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

* adjust verison

* fixes

* bump

* bump

* bump

* more fixes

* preen

* fix resume

* one more fix

* fix race in webhook setup

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

* bump 3.1.4 for more fixes

* fix

* fix comment

* bump

* fix url limit

* bump

* more fixes

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

* Check for None

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

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* lint

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

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

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

* Add missing aioairzone-cloud to test requirements

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

* Update aioairzone-cloud to v0.0.4

Allows to handle TooManyRequests exception on coordinator.

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

* aioairzone_cloud: reduce API requests

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

* airzone_cloud: remove system_zone_id

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

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

* airzone_cloud: minor improvements

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

* tests: airzone_cloud: simplify mock_get_webserver

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

* Update aioairzone to v0.0.5

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

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

* airzone_cloud: add to strict typing

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

* Update aioairzone to v0.0.7

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

* trigger CI

* airzone_cloud: remove unneeded api_get_user call

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

* Add Airzone brand

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

* Update aioairzone to v0.1.1

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

* airzone_cloud: use unique_id instead of entry_id

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

* airzone_cloud: remove special handling of TooManyRequests

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

* airzone_cloud: bump coordinator timeout to 30s

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

* airzone_cloud: make AirzoneEntity an ABC

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

* airzone_cloud: fix strings typo

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

* tests: airzone_cloud: simplify webserver mock

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

* Update aioairzone-cloud to v0.1.2

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

---------

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

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

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

* tests: qnap_qsw: remove backup leftovers

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

* tests: qnap_qsw: remove backup leftovers v2

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

---------

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

* Update codeowners in manifest.json

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

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

* Remove unnecessary logging

* Remove logger

* Add more tests

* Test closing modem connection

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

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

* Add tests

* Remove separate button

* Bump coverage

---------

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

* Add try except in get_hostname_id function

* Update tests after adding get_hostname_id function

* Revert "Update tests after adding get_hostname_id function"

This reverts commit 5fa4e533cb.

* Add test for G2 models in config flow.

* Add test for helper module.

* Fix test for numbers.

* Revert "Add try except in get_hostname_id function"

This reverts commit 059f5bd9b4.

* Update variable name with known hostname ids to be private

---------

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

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

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

* trigger CI

---------

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

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

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

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

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

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

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

* use walrus

* inherit config parameter class from list class

* use walrus in more places

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

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

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

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

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

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

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

* test subtract

* Test no change if timer not running

* Modify example

* Raise

* Finalize

* test event

* Fix tests

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

* fixes + option to set scan interval

* renamed the module to electrasmart and added unittests

* added non tested files to .coveragerc

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

* small fixes

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

* PARALLEL_UPDATE=1 to prevent multi access to the API

* code improvements

* aligned with the new HA APIs

* fixes

* fixes

* more

* fixes

* more

* more

* handled re-atuh flow

* fixed test

* removed hvac action

* added shabat mode

* tests: 100% coverage

* ran hassfest

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/climate.py

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

* address Shay's comments

* address Shay's comments

* address more comments

---------

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

* use official version release

* remove options

* moved first refresh to gather

* add extra tests

* remove model_sepcification

* remove old mqtt test

* bump to 13.4

* fix dndtimer

* bump to 14.1

* add status back

* bump to 17.0

* remove error as it is not used

* addressing mr comments

* making enum access use get()

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

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

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

* Update homeassistant/components/yalexs_ble/config_flow.py

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

---------

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

* Add already configured test

* Improve success case request mocking

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

* Simplify already configured test

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

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

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

IndividualAddress telegrams are not processed by xknx.telegram_queue

* Use Telegrams helper class for group monitor messages

* Store 50 telegrams in deque for group monitor

* Send recent telegrams at once on connection of group monitor

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

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

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

* Add google_generative_ai_conversation to Google brand

* Google Generative AI Conversation

* Sync recent openai changes

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

* Fix snapshots after dependency bump

* Load gcid from config entry if available

* Add tests

---------

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

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

* Remove as_compressed_state cache

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

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

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

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

* add Telegrams helper class

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

* translation

* label for extra_field

* test device trigger

* test trigger callback removal

* rename extra_field key to same name as used in trigger

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

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

* Check for None

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

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

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

* adjust verison

* fixes

* bump

* bump

* bump

* more fixes

* preen

* fix resume

* one more fix

* fix race in webhook setup

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

* bump 3.1.4 for more fixes

* fix

* fix comment

* bump

* fix url limit

* bump

* more fixes

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

* Simplify

* Reduce blast radius

* Reduce blast radius

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

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

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

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

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

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

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

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

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

* Simplify

* Reduce blast radius

* Reduce blast radius

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

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

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

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

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

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

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

* Add tests

* Always replay wildcards

* Update tests for debouncer

* Rework for retained topics

* Fix test

* Correct comment

* Add cleanup and test

* Fix key error

* Correct helper

* Rename mock

* Add comment on function _retained_init

* Always replay initial retained payload

* Apply suggestion moving msg.retain to outer check

* Improve test on edge case

* Improve comment formatting

* Follow up comment - improve comments on test

* Update homeassistant/components/mqtt/client.py

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

---------

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

* Update homeassistant/components/netgear_lte/services.py

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

---------

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

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

* Revert to only move constants

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

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

* Add support for unit conversion when calculating change

* Don't include sum in WS response unless requested

* Improve tests

* Break out calculating change to its own function

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

* provide project data for the panel group monitor

* upload and delete project from panel

* test project store

* more tests

* finish tests

* use integers for DPTBinary payload monitor display

* add project to diagnostics

* require new frontend version

* update knx_frontend

* review suggestions

* update xknxproject to 3.1.0

---------

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

* Add more specific type hints

* Change type definition of request

* Add deprecation warning and remove variables

* Remove deprecation warning & update tests

* Fix wrong value assignment

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

* improve test coverage

* code reformatting

* fix tests

* fix entity manager

* changes after review

* improve test coverage and fixed form

* remove unused code

* remove commented out code

* changes after review

* make title prettier

* fixed tests

* simplified code

* changes after review

* fix test

* push deprecation out

* changes after review

* changes after review

* changes after review

* changes after review

* changes after review

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

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

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

* Make _async_unsubscribe a callback

* Make sure unsubscribes are processed

* Move debug log out of lock

* Reduce calls and raise outside lock

* Cancel any unsubscribe when queing

* Copy pending unsubscribes

* Only convert topics to list once

* No copy needed

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

* Cleanup

* cleanup, log outside of lock

* Remove function wrapper

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

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

* _render_templates

* split manual vs coordinator

* name

* ManualTriggerEntity

* value

* Remove ManualTriggerEntity

* ManualTriggerEntity

* process_manual_data

* Add test

* imports

* Move ManualTriggerEntity

* cmd_line switch

* Review comments

* Fix templating

* Review comments

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

* Add remaining buttons

* Set correct entity categories

* Inherit from DevoloEntity

* Fix mypy

* Apply feedback

* Raise on DevicePasswordProtected

* Fix ruff

* Really fix ruff

* Adapt to recent development

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

Additional information available for EVs

* Add pre entry climatization

* Fix mypy error

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

* test binary_sensor.py file

* add tests for binary sensor

* fix zone type checks and error on unknown

* improve entity tests

* hide entities by default

* Revert "hide entities by default"

This reverts commit 9808d732471385e45ccc5f7c3aea93bfecbdfa6f.

* Update homeassistant/components/totalconnect/binary_sensor.py

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

* update binary_sensor per comments

* update test

* move to _attr_extra_state_attributes

* no spaces in unique_id

* update per balloob suggestions

* fix typing

* fix black and mypy

* Apply suggestions from code review

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

* add more to binary_sensor tests

* remove unused import

---------

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

* Add additional test for more coverage

* Apply code review changes

* Apply further code review changes

* Rename constant for configuration

* Apply code review changes

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

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

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

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

* Enable water heater platform

* No need to set target temp feature

* Split out preset mode

* Switch to parameters from lib

* Drop presets

* Add missing callback to coordinator update

* Drop support for heatpump activity

- Current entity model does not support it

* Handle s series lack of mappings

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

* Switch to library exceptions for HTTP status errors

* Remove duplicate logging after reconnect

* Raise UpdateFailed instead of custom log handling

---------

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

* Add tests

* Optimize mocks

* Use async_forward_entry_setups

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

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

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

* 0.3.1

* mypy

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

* Renamed domain

* Initial commit

* Support for v1.0.6 device api

* Fixed failing test

* Removed TYPE_CHECKING constant

* Removed jvc brand

* Removed constant rename

* Renaming more constants

* Renaming yet more constants

* Improved config_flow tests

* More changes based on feedback

* Moved config_flow dependency

* Removed default translation title

* Removed translation file

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

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

* Lower scan interval for opensky to avoid hitting rate limit

* Update homeassistant/components/opensky/sensor.py

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

* Update homeassistant/components/opensky/sensor.py

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

---------

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

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

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

* adjust timeouts for slower tplink cameras

* tweak

* more debug

* tweak

* adjust message

* tweak

* Revert "tweak"

This reverts commit 10ee2a8de7.

* give time in seconds

* revert

* revert

* Update homeassistant/components/onvif/event.py

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

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

* Lower scan interval for opensky to avoid hitting rate limit

* Update homeassistant/components/opensky/sensor.py

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

* Update homeassistant/components/opensky/sensor.py

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

---------

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

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

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

* adjust timeouts for slower tplink cameras

* tweak

* more debug

* tweak

* adjust message

* tweak

* Revert "tweak"

This reverts commit 10ee2a8de7.

* give time in seconds

* revert

* revert

* Update homeassistant/components/onvif/event.py

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

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

* Count number of exposed entities

* Add tests

---------

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

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

fixes #91221

* Update homeassistant/components/esphome/entry_data.py

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

---------

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

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

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

* Tweak

* Use entity_ids func

---------

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

* updates because of changes in package

* linting and other small fixes

* fix for unknown code

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

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

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

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

* Count number of exposed entities

* Add tests

---------

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

* updates because of changes in package

* linting and other small fixes

* fix for unknown code

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

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

* Tweak

* Use entity_ids func

---------

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

fixes #91221

* Update homeassistant/components/esphome/entry_data.py

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

---------

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

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

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

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

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

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

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

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

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

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

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

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

* Fix test

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

* Tweak

* Fix race, update tests

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

* Fix tests
2023-05-03 12:39:22 +02:00
Erik Montnemery
7aa94f97c0 Improve exposed entities tests (#92389) 2023-05-03 10:49:01 +02:00
Artem Draft
d417cbaf0f Bump pybravia to 0.3.3 (#92378) 2023-05-03 08:52:56 +02:00
Paulus Schoutsen
1baa4d5109 Fix deserialize bug + add test coverage (#92382) 2023-05-02 22:38:54 -04:00
Bram Kragten
5ed41d3d51 Update frontend to 20230502.0 (#92373) 2023-05-02 22:41:35 +02:00
Michael Hansen
17db1aa38b Bump voip-utils to 0.0.7 (#92372) 2023-05-02 22:39:41 +02:00
Erik Montnemery
e3c16e634b Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
John Pettitt
cc4e741cfa Increase default timeout in sense (#90556)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-02 09:50:34 -05:00
J. Nick Koston
a9d992c2de Add support for visitor detections to onvif (#92350) 2023-05-02 12:19:27 +02:00
Raman Gupta
9f7c085652 Clean up zwave_js.cover (#92353) 2023-05-02 12:18:19 +02:00
J. Nick Koston
c0fa078b0b Start onvif events later (#92354) 2023-05-02 12:17:01 +02:00
J. Nick Koston
2636a46a5f Bump ulid-transform to 0.7.2 (#92344) 2023-05-02 08:46:14 +02:00
J. Nick Koston
86f8147782 Bump zeroconf to 0.60.0 (#92335) 2023-05-01 22:51:30 +02:00
Raman Gupta
5dd3209e42 Add date and time platforms to core files (#92343) 2023-05-01 22:50:44 +02:00
Bram Kragten
a6d6d59c93 Update frontend to 20230501.0 (#92339) 2023-05-01 22:49:38 +02:00
Franck Nijhof
a7088e767e Migrate unique IDs of Rituals Perfume Genie (#92342)
* Migrate unique IDs of Rituals Perfume Genie

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

* Add test

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

related issue #91489

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

fixes #92308

* Retry onvif setup when it is unexpectedly cancelled

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

Signed-off-by: Tomer Figenblat <tomer@tomfi.info>
2023-04-30 11:19:46 +03:00
J. Nick Koston
193b2694a9 Handle AttributeError from wrong port in ONVIF config flow (#92272)
* Handle AttributeError from wrong port in ONVIF config flow

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

* port

* Revert "port"

This reverts commit 4693f3f33a.

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

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

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

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

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

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

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

This reverts commit 787fda1aefcd8418a28a8a8f430e7e7232218ef8.t

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

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

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

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

* revert to flat structure

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

* Fix initialization, add test

* Fix tests

* Add AgentManager.async_setup

* Fix typo

---------

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

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

* Explicitly unit test an affected SML001 device

* Do not use invalid `hue_occupancy` attribute name

* Actually remove `hue_occupancy`

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

* add tests for new config flow errors

* removed logs for known errors
2023-04-27 21:10:34 +02:00
Franck Nijhof
ac21f69ad0 Add add-on discovery URL and title to Wyoming integration (#92129) 2023-04-27 19:51:26 +02:00
Paul Bottein
52816a8cd4 Update frontend to 20230427.0 (#92123) 2023-04-27 19:07:56 +02:00
J. Nick Koston
47b289b632 Bump sqlalchemy to 2.0.11 to fix a critical regression with postgresql (#92126) 2023-04-27 18:52:43 +02:00
Franck Nijhof
15c2ed7b04 Cleanup pybluez from machine builds (#92122) 2023-04-27 18:02:26 +02:00
Erik Montnemery
2522c6d697 Add WS command cloud/alexa/entities/get (#92121)
* Add WS command cloud/alexa/entities/get

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

* Expose channel changing as a service

* Type annotate some existing unit test fixtures

* Add unit tests

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

* Expand on channel migration in the service description

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

* Update homeassistant/components/zha/websocket_api.py

* Black

---------

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

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

* Update homeassistant/components/cloud/alexa_config.py

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

---------

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

* Add Google Assistant specific support sets

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

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

* Update tests

* More tests

* Fix docstrings and remove unused patches

* More tests

* MORE

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

* Adjust names to be 'in progress'

* Update tests/components/esphome/test_binary_sensor.py

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

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-26 22:13:21 -04:00
Franck Nijhof
13fc22aa3c Update syrupy to 4.0.2 (#92089) 2023-04-27 01:39:49 +02:00
Franck Nijhof
9f885a68ff Update YARL to 1.9.2 (#92086) 2023-04-27 01:39:32 +02:00
Michael
4e7f39e3d0 Fix reconfigure by SSDP or Zeroconf discovery in Synology DSM (#92088) 2023-04-27 00:52:17 +02:00
Jesse Hills
29ca43acf6 Set pipeline_id from pipeline select (#92085) 2023-04-27 10:29:08 +12:00
Joakim Sørensen
fdfd567ee5 Bump pylaunches from 1.3.0 to 1.4.0 (#92061) 2023-04-26 23:01:22 +02:00
Franck Nijhof
b5edf47454 Bump version to 2023.6.0dev0 (#92081) 2023-04-26 22:58:26 +02:00
Michael Hansen
929bfd3dfc Bump intents to 2023.4.26 (#92070)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-26 22:31:35 +02:00
2524 changed files with 102438 additions and 25108 deletions

View File

@@ -20,11 +20,14 @@ base_platforms: &base_platforms
- homeassistant/components/camera/**
- homeassistant/components/climate/**
- homeassistant/components/cover/**
- homeassistant/components/date/**
- homeassistant/components/datetime/**
- homeassistant/components/device_tracker/**
- homeassistant/components/diagnostics/**
- homeassistant/components/fan/**
- homeassistant/components/geo_location/**
- homeassistant/components/humidifier/**
- homeassistant/components/image/**
- homeassistant/components/image_processing/**
- homeassistant/components/light/**
- homeassistant/components/lock/**
@@ -39,6 +42,7 @@ base_platforms: &base_platforms
- homeassistant/components/stt/**
- homeassistant/components/switch/**
- homeassistant/components/text/**
- homeassistant/components/time/**
- homeassistant/components/tts/**
- homeassistant/components/update/**
- homeassistant/components/vacuum/**
@@ -137,7 +141,6 @@ other: &other
requirements: &requirements
- .github/workflows/**
- homeassistant/package_constraints.txt
- script/pip_check
- requirements*.txt
- pyproject.toml

View File

@@ -90,6 +90,7 @@ omit =
homeassistant/components/atome/*
homeassistant/components/aurora/__init__.py
homeassistant/components/aurora/binary_sensor.py
homeassistant/components/aurora/coordinator.py
homeassistant/components/aurora/sensor.py
homeassistant/components/avea/light.py
homeassistant/components/avion/light.py
@@ -202,6 +203,9 @@ omit =
homeassistant/components/discogs/sensor.py
homeassistant/components/discord/__init__.py
homeassistant/components/discord/notify.py
homeassistant/components/discovergy/__init__.py
homeassistant/components/discovergy/sensor.py
homeassistant/components/discovergy/coordinator.py
homeassistant/components/dlib_face_detect/image_processing.py
homeassistant/components/dlib_face_identify/image_processing.py
homeassistant/components/dlink/data.py
@@ -227,6 +231,7 @@ omit =
homeassistant/components/dunehd/__init__.py
homeassistant/components/dunehd/media_player.py
homeassistant/components/dwd_weather_warnings/const.py
homeassistant/components/dwd_weather_warnings/coordinator.py
homeassistant/components/dwd_weather_warnings/sensor.py
homeassistant/components/dweet/*
homeassistant/components/ebox/sensor.py
@@ -301,21 +306,13 @@ omit =
homeassistant/components/escea/climate.py
homeassistant/components/escea/discovery.py
homeassistant/components/esphome/__init__.py
homeassistant/components/esphome/binary_sensor.py
homeassistant/components/esphome/bluetooth/*
homeassistant/components/esphome/button.py
homeassistant/components/esphome/camera.py
homeassistant/components/esphome/climate.py
homeassistant/components/esphome/cover.py
homeassistant/components/esphome/domain_data.py
homeassistant/components/esphome/entry_data.py
homeassistant/components/esphome/fan.py
homeassistant/components/esphome/light.py
homeassistant/components/esphome/lock.py
homeassistant/components/esphome/media_player.py
homeassistant/components/esphome/number.py
homeassistant/components/esphome/select.py
homeassistant/components/esphome/sensor.py
homeassistant/components/esphome/switch.py
homeassistant/components/etherscan/sensor.py
homeassistant/components/eufy/*
@@ -326,10 +323,13 @@ omit =
homeassistant/components/ezviz/__init__.py
homeassistant/components/ezviz/binary_sensor.py
homeassistant/components/ezviz/camera.py
homeassistant/components/ezviz/light.py
homeassistant/components/ezviz/coordinator.py
homeassistant/components/ezviz/number.py
homeassistant/components/ezviz/entity.py
homeassistant/components/ezviz/sensor.py
homeassistant/components/ezviz/switch.py
homeassistant/components/ezviz/update.py
homeassistant/components/faa_delays/__init__.py
homeassistant/components/faa_delays/binary_sensor.py
homeassistant/components/familyhub/camera.py
@@ -417,7 +417,6 @@ omit =
homeassistant/components/gitlab_ci/sensor.py
homeassistant/components/gitter/sensor.py
homeassistant/components/glances/sensor.py
homeassistant/components/goalfeed/*
homeassistant/components/goodwe/__init__.py
homeassistant/components/goodwe/button.py
homeassistant/components/goodwe/coordinator.py
@@ -613,7 +612,6 @@ omit =
homeassistant/components/kwb/sensor.py
homeassistant/components/lacrosse/sensor.py
homeassistant/components/lannouncer/notify.py
homeassistant/components/lastfm/sensor.py
homeassistant/components/launch_library/__init__.py
homeassistant/components/launch_library/sensor.py
homeassistant/components/lcn/climate.py
@@ -788,6 +786,7 @@ omit =
homeassistant/components/nibe_heatpump/select.py
homeassistant/components/nibe_heatpump/sensor.py
homeassistant/components/nibe_heatpump/switch.py
homeassistant/components/nibe_heatpump/water_heater.py
homeassistant/components/niko_home_control/light.py
homeassistant/components/nilu/air_quality.py
homeassistant/components/nissan_leaf/*
@@ -970,6 +969,10 @@ omit =
homeassistant/components/rainmachine/switch.py
homeassistant/components/rainmachine/update.py
homeassistant/components/rainmachine/util.py
homeassistant/components/renson/__init__.py
homeassistant/components/renson/const.py
homeassistant/components/renson/entity.py
homeassistant/components/renson/sensor.py
homeassistant/components/raspyrfm/*
homeassistant/components/recollect_waste/sensor.py
homeassistant/components/recorder/repack.py
@@ -1292,10 +1295,10 @@ omit =
homeassistant/components/toon/switch.py
homeassistant/components/torque/sensor.py
homeassistant/components/totalconnect/__init__.py
homeassistant/components/totalconnect/binary_sensor.py
homeassistant/components/touchline/climate.py
homeassistant/components/tplink_lte/*
homeassistant/components/tplink_omada/__init__.py
homeassistant/components/tplink_omada/binary_sensor.py
homeassistant/components/tplink_omada/controller.py
homeassistant/components/tplink_omada/coordinator.py
homeassistant/components/tplink_omada/entity.py
@@ -1535,6 +1538,8 @@ omit =
homeassistant/components/zwave_me/sensor.py
homeassistant/components/zwave_me/siren.py
homeassistant/components/zwave_me/switch.py
homeassistant/components/electrasmart/climate.py
homeassistant/components/electrasmart/__init__.py
[report]
# Regexes for lines to exclude from consideration

View File

@@ -104,8 +104,8 @@ To help with the load of incoming pull requests:
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr

View File

@@ -24,12 +24,12 @@ jobs:
publish: ${{ steps.version.outputs.publish }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -48,29 +48,18 @@ jobs:
with:
ignore-dev: true
- name: Generate meta info
shell: bash
run: |
echo "${{ github.sha }};${{ github.ref }};${{ github.event_name }};${{ github.actor }}" > OFFICIAL_IMAGE
- name: Signing meta info file
uses: home-assistant/actions/helpers/codenotary@master
with:
source: file://${{ github.workspace }}/OFFICIAL_IMAGE
asset: OFFICIAL_IMAGE-${{ steps.version.outputs.version }}
token: ${{ secrets.CAS_TOKEN }}
build_python:
name: Build PyPi package
needs: init
environment: ${{ needs.init.outputs.channel }}
needs: ["init", "build_base"]
runs-on: ubuntu-latest
if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -100,12 +89,16 @@ jobs:
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Download nightly wheels of frontend
if: needs.init.outputs.channel == 'dev'
@@ -123,7 +116,7 @@ jobs:
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
repo: home-assistant/intents
repo: home-assistant/intents-package
branch: main
workflow: nightly.yaml
workflow_conclusion: success
@@ -131,7 +124,7 @@ jobs:
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
if: needs.init.outputs.channel == 'dev'
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -140,7 +133,7 @@ jobs:
shell: bash
run: |
python3 -m pip install packaging tomli
python3 -m pip install --use-deprecated=legacy-resolver .
python3 -m pip install .
version="$(python3 script/version_bump.py nightly)"
if [[ "$(ls home_assistant_frontend*.whl)" =~ ^home_assistant_frontend-(.*)-py3-none-any.whl$ ]]; then
@@ -174,6 +167,18 @@ jobs:
python -m script.gen_requirements_all
fi
- name: Adjustments for armhf
if: matrix.arch == 'armhf'
run: |
# Pandas has issues building on armhf, it is expected they
# will drop the platform in the near future (they consider it
# "flimsy" on 386). The following packages depend on pandas,
# so we comment them out.
sed -i "s|env-canada|# env-canada|g" requirements_all.txt
sed -i "s|noaa-coops|# noaa-coops|g" requirements_all.txt
sed -i "s|pyezviz|# pyezviz|g" requirements_all.txt
sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt
- name: Download Translations
run: python3 -m script.translations download
env:
@@ -184,25 +189,20 @@ jobs:
run: |
echo "${{ github.sha }};${{ github.ref }};${{ github.event_name }};${{ github.actor }}" > rootfs/OFFICIAL_IMAGE
- name: Login to DockerHub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
uses: home-assistant/builder@2023.03.0
uses: home-assistant/builder@2023.06.0
with:
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
--cosign \
--target /data \
--generic ${{ needs.init.outputs.version }}
env:
@@ -224,6 +224,10 @@ jobs:
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_base"]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
machine:
@@ -249,7 +253,7 @@ jobs:
- yellow
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set build additional args
run: |
@@ -262,37 +266,33 @@ jobs:
echo "BUILD_ARGS=--additional-tag stable" >> $GITHUB_ENV
fi
- name: Login to DockerHub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
uses: home-assistant/builder@2023.03.0
uses: home-assistant/builder@2023.06.0
with:
args: |
$BUILD_ARGS \
--target /data/machine \
--cosign \
--machine "${{ needs.init.outputs.version }}=${{ matrix.machine }}"
env:
CAS_API_KEY: ${{ secrets.CAS_TOKEN }}
publish_ha:
name: Publish version files
environment: ${{ needs.init.outputs.channel }}
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_machine"]
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
@@ -320,37 +320,32 @@ jobs:
publish_container:
name: Publish meta container for ${{ matrix.registry }}
environment: ${{ needs.init.outputs.channel }}
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_base"]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
registry:
- "ghcr.io/home-assistant"
- "homeassistant"
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Install Cosign
uses: sigstore/cosign-installer@v3.0.5
with:
cosign-release: "v2.0.2"
- name: Login to DockerHub
if: matrix.registry == 'homeassistant'
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: matrix.registry == 'ghcr.io/home-assistant'
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install CAS tools
uses: home-assistant/actions/helpers/cas@master
- name: Build Meta Image
shell: bash
run: |
@@ -360,55 +355,78 @@ jobs:
local tag_l=${1}
local tag_r=${2}
docker manifest create "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/amd64-homeassistant:${tag_r}" \
"${{ matrix.registry }}/i386-homeassistant:${tag_r}" \
"${{ matrix.registry }}/armhf-homeassistant:${tag_r}" \
"${{ matrix.registry }}/armv7-homeassistant:${tag_r}" \
"${{ matrix.registry }}/aarch64-homeassistant:${tag_r}"
for registry in "ghcr.io/home-assistant" "docker.io/homeassistant"
do
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/amd64-homeassistant:${tag_r}" \
--os linux --arch amd64
docker manifest create "${registry}/home-assistant:${tag_l}" \
"${registry}/amd64-homeassistant:${tag_r}" \
"${registry}/i386-homeassistant:${tag_r}" \
"${registry}/armhf-homeassistant:${tag_r}" \
"${registry}/armv7-homeassistant:${tag_r}" \
"${registry}/aarch64-homeassistant:${tag_r}"
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/i386-homeassistant:${tag_r}" \
--os linux --arch 386
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/amd64-homeassistant:${tag_r}" \
--os linux --arch amd64
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/armhf-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v6
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/i386-homeassistant:${tag_r}" \
--os linux --arch 386
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/armv7-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v7
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/armhf-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v6
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/aarch64-homeassistant:${tag_r}" \
--os linux --arch arm64 --variant=v8
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/armv7-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v7
docker manifest push --purge "${{ matrix.registry }}/home-assistant:${tag_l}"
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/aarch64-homeassistant:${tag_r}" \
--os linux --arch arm64 --variant=v8
docker manifest push --purge "${registry}/home-assistant:${tag_l}"
cosign sign --yes "${registry}/home-assistant:${tag_l}"
done
}
function validate_image() {
local image=${1}
if ! cas authenticate --signerID notary@home-assistant.io "docker://${image}"; then
if ! cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/home-assistant/core/.* "${image}"; then
echo "Invalid signature!"
exit 1
fi
}
docker pull "${{ matrix.registry }}/amd64-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/i386-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/armhf-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/armv7-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/aarch64-homeassistant:${{ needs.init.outputs.version }}"
function push_dockerhub() {
local image=${1}
local tag=${2}
validate_image "${{ matrix.registry }}/amd64-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/i386-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/armhf-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/armv7-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/aarch64-homeassistant:${{ needs.init.outputs.version }}"
docker tag "ghcr.io/home-assistant/${image}:${tag}" "docker.io/homeassistant/${image}:${tag}"
docker push "docker.io/homeassistant/${image}:${tag}"
cosign sign --yes "docker.io/homeassistant/${image}:${tag}"
}
# Pull images from github container registry and verify signature
docker pull "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/i386-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/armhf-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/armv7-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/i386-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/armhf-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/armv7-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
# Upload images to dockerhub
push_dockerhub "amd64-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "i386-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "armhf-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "armv7-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "aarch64-homeassistant" "${{ needs.init.outputs.version }}"
# Create version tag
create_manifest "${{ needs.init.outputs.version }}" "${{ needs.init.outputs.version }}"

View File

@@ -32,7 +32,7 @@ env:
CACHE_VERSION: 5
PIP_CACHE_VERSION: 4
MYPY_CACHE_VERSION: 4
HA_SHORT_VERSION: 2023.5
HA_SHORT_VERSION: 2023.7
DEFAULT_PYTHON: "3.10"
ALL_PYTHON_VERSIONS: "['3.10', '3.11']"
# 10.3 is the oldest supported version
@@ -82,7 +82,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Generate partial Python venv restore key
id: generate_python_cache_key
run: >-
@@ -206,10 +206,10 @@ jobs:
- info
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -251,9 +251,9 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -297,9 +297,9 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -338,44 +338,6 @@ jobs:
shopt -s globstar
pre-commit run --hook-stage manual ruff --files {homeassistant,tests}/components/${{ needs.info.outputs.integrations_glob }}/{*,**/*} --show-diff-on-failure
lint-isort:
name: Check isort
runs-on: ubuntu-22.04
needs:
- info
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.0
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.3.1
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{
needs.info.outputs.pre-commit_cache_key }}
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache/restore@v3.3.1
with:
path: ${{ env.PRE_COMMIT_CACHE }}
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.pre-commit_cache_key }}
- name: Run isort
run: |
. venv/bin/activate
pre-commit run --hook-stage manual isort --all-files --show-diff-on-failure
lint-other:
name: Check other linters
runs-on: ubuntu-22.04
@@ -384,9 +346,9 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
@@ -468,19 +430,6 @@ jobs:
with:
args: hadolint Dockerfile.dev
- name: Run bandit (fully)
if: needs.info.outputs.test_full_suite == 'true'
run: |
. venv/bin/activate
pre-commit run --hook-stage manual bandit --all-files --show-diff-on-failure
- name: Run bandit (partially)
if: needs.info.outputs.test_full_suite == 'false'
shell: bash
run: |
. venv/bin/activate
shopt -s globstar
pre-commit run --hook-stage manual bandit --files {homeassistant,tests}/components/${{ needs.info.outputs.integrations_glob }}/{*,**/*} --show-diff-on-failure
base:
name: Prepare dependencies
runs-on: ubuntu-22.04
@@ -491,10 +440,10 @@ jobs:
python-version: ${{ fromJSON(needs.info.outputs.python_versions) }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -544,8 +493,8 @@ jobs:
. venv/bin/activate
python --version
pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<23.2" setuptools wheel
pip install --cache-dir=$PIP_CACHE -r requirements_all.txt --use-deprecated=legacy-resolver
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt --use-deprecated=legacy-resolver
pip install --cache-dir=$PIP_CACHE -r requirements_all.txt
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt
pip install -e .
hassfest:
@@ -559,10 +508,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -591,10 +540,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -624,10 +573,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -668,10 +617,10 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -719,42 +668,6 @@ jobs:
python --version
mypy homeassistant/components/${{ needs.info.outputs.integrations_glob }}
pip-check:
runs-on: ubuntu-22.04
if: |
github.event.inputs.pylint-only != 'true'
&& github.event.inputs.mypy-only != 'true'
needs:
- info
- base
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.info.outputs.python_versions) }}
name: Run pip check ${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.3.1
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Run pip check
run: |
. venv/bin/activate
./script/pip_check $PIP_CACHE
pytest:
runs-on: ubuntu-22.04
if: |
@@ -768,7 +681,6 @@ jobs:
- base
- gen-requirements-all
- hassfest
- lint-isort
- lint-other
- lint-ruff
- mypy
@@ -787,10 +699,10 @@ jobs:
bluez \
ffmpeg
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -893,7 +805,6 @@ jobs:
- base
- gen-requirements-all
- hassfest
- lint-isort
- lint-other
- lint-ruff
- mypy
@@ -913,10 +824,10 @@ jobs:
ffmpeg \
libmariadb-dev-compat
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -1001,7 +912,6 @@ jobs:
- base
- gen-requirements-all
- hassfest
- lint-isort
- lint-other
- lint-ruff
- mypy
@@ -1021,10 +931,10 @@ jobs:
ffmpeg \
postgresql-server-dev-14
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -1098,12 +1008,12 @@ jobs:
timeout-minutes: 10
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Download all coverage artifacts
uses: actions/download-artifact@v3
- name: Upload coverage to Codecov (full coverage)
if: needs.info.outputs.test_full_suite == 'true'
uses: Wandalen/wretry.action@v1.0.36
uses: Wandalen/wretry.action@v1.3.0
with:
action: codecov/codecov-action@v3.1.3
with: |
@@ -1113,7 +1023,7 @@ jobs:
attempt_delay: 30000
- name: Upload coverage to Codecov (partial coverage)
if: needs.info.outputs.test_full_suite == 'false'
uses: Wandalen/wretry.action@v1.0.36
uses: Wandalen/wretry.action@v1.3.0
with:
action: codecov/codecov-action@v3.1.3
with: |

View File

@@ -10,7 +10,7 @@ jobs:
if: github.repository_owner == 'home-assistant'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4.0.0
- uses: dessant/lock-threads@v4.0.1
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"

View File

@@ -19,10 +19,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.0
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ env.DEFAULT_PYTHON }}

View File

@@ -26,7 +26,7 @@ jobs:
architectures: ${{ steps.info.outputs.architectures }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Get information
id: info
@@ -87,7 +87,7 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Download env_file
uses: actions/download-artifact@v3
@@ -125,7 +125,7 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Download env_file
uses: actions/download-artifact@v3
@@ -141,7 +141,6 @@ jobs:
run: |
requirement_files="requirements_all.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
sed -i "s|# azure-servicebus|azure-servicebus|g" ${requirement_file}
sed -i "s|# pybluez|pybluez|g" ${requirement_file}
sed -i "s|# beacontools|beacontools|g" ${requirement_file}
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
@@ -160,7 +159,7 @@ jobs:
# This is to prevent the build from running out of memory when
# resolving packages on 32-bits systems (like armhf, armv7).
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 2) requirements_all.txt requirements_all.txt
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 3) requirements_all.txt requirements_all.txt
- name: Adjust build env
run: |
@@ -187,7 +186,6 @@ jobs:
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
legacy: true
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtaa"
@@ -202,11 +200,24 @@ jobs:
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
legacy: true
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtab"
- name: Build wheels (part 3)
uses: home-assistant/wheels@2023.04.0
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtac"
# Wheels building for the cp311 ABI is currently split
# This is mainly until we have figured out to get all wheels built.
# Without harming our current workflow.
@@ -222,7 +233,7 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Write alternative env-file for cp311
run: |
@@ -266,12 +277,6 @@ jobs:
# beacontools requires PyBluez.
# sed -i "s|# beacontools|beacontools|g" ${requirement_file}
# azure-servicebus requires uamqp, which requires OpenSSL 1.1 to
# compile/build. This is not available on Alpine 3.17. The compat
# layer offered by Alpine conflicts, so we have no way to build
# this package.
# sed -i "s|# azure-servicebus|azure-servicebus|g" ${requirement_file}
# It doesn't build for some reason, so we skip it for now.
# Bumping to the latest version (4.7.0.72) supporting Python 3.11
# doesn't help. Reverted bump in #91871. There are 8 registered
@@ -283,7 +288,7 @@ jobs:
sed -i "s|# evdev|evdev|g" ${requirement_file}
sed -i "s|# pycups|pycups|g" ${requirement_file}
sed -i "s|# homekit|homekit|g" ${requirement_file}
sed -i "s|# decora_wifi|decora_wifi|g" ${requirement_file}
sed -i "s|# decora-wifi|decora-wifi|g" ${requirement_file}
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
# Some packages are not buildable on armhf anymore
@@ -293,7 +298,7 @@ jobs:
# will drop the platform in the near future (they consider it
# "flimsy" on 386). The following packages depend on pandas,
# so we comment them out.
sed -i "s|env_canada|# env_canada|g" ${requirement_file}
sed -i "s|env-canada|# env-canada|g" ${requirement_file}
sed -i "s|noaa-coops|# noaa-coops|g" ${requirement_file}
sed -i "s|pyezviz|# pyezviz|g" ${requirement_file}
sed -i "s|pykrakenapi|# pykrakenapi|g" ${requirement_file}
@@ -306,7 +311,7 @@ jobs:
# This is to prevent the build from running out of memory when
# resolving packages on 32-bits systems (like armhf, armv7).
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 2) requirements_all.txt requirements_all.txt
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 3) requirements_all.txt requirements_all.txt
- name: Adjust build env
run: |
@@ -334,7 +339,6 @@ jobs:
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
legacy: true
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtaa"
@@ -349,7 +353,20 @@ jobs:
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
legacy: true
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtab"
- name: Build wheels (part 3)
uses: home-assistant/wheels@2023.04.0
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtac"

View File

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.262
rev: v0.0.272
hooks:
- id: ruff
args:
@@ -22,19 +22,6 @@ repos:
- --quiet-level=2
exclude_types: [csv, json]
exclude: ^tests/fixtures/|homeassistant/generated/
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=tests/bandit.yaml
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:

View File

@@ -49,6 +49,7 @@ homeassistant.components.air_quality.*
homeassistant.components.airly.*
homeassistant.components.airvisual.*
homeassistant.components.airzone.*
homeassistant.components.airzone_cloud.*
homeassistant.components.aladdin_connect.*
homeassistant.components.alarm_control_panel.*
homeassistant.components.alert.*
@@ -86,6 +87,7 @@ homeassistant.components.camera.*
homeassistant.components.canary.*
homeassistant.components.clickatell.*
homeassistant.components.clicksend.*
homeassistant.components.cloud.*
homeassistant.components.configurator.*
homeassistant.components.cover.*
homeassistant.components.cpuspeed.*
@@ -105,6 +107,7 @@ homeassistant.components.dormakaba_dkey.*
homeassistant.components.dsmr.*
homeassistant.components.dunehd.*
homeassistant.components.efergy.*
homeassistant.components.electrasmart.*
homeassistant.components.elgato.*
homeassistant.components.elkm1.*
homeassistant.components.emulated_hue.*
@@ -166,10 +169,13 @@ homeassistant.components.homekit_controller.utils
homeassistant.components.homewizard.*
homeassistant.components.http.*
homeassistant.components.huawei_lte.*
homeassistant.components.hydrawise.*
homeassistant.components.hyperion.*
homeassistant.components.ibeacon.*
homeassistant.components.image.*
homeassistant.components.image_processing.*
homeassistant.components.image_upload.*
homeassistant.components.imap.*
homeassistant.components.input_button.*
homeassistant.components.input_select.*
homeassistant.components.integration.*
@@ -177,6 +183,7 @@ homeassistant.components.iqvia.*
homeassistant.components.isy994.*
homeassistant.components.jellyfin.*
homeassistant.components.jewish_calendar.*
homeassistant.components.jvc_projector.*
homeassistant.components.kaleidescape.*
homeassistant.components.knx.*
homeassistant.components.kraken.*
@@ -230,12 +237,14 @@ homeassistant.components.oncue.*
homeassistant.components.onewire.*
homeassistant.components.open_meteo.*
homeassistant.components.openexchangerates.*
homeassistant.components.opensky.*
homeassistant.components.openuv.*
homeassistant.components.otbr.*
homeassistant.components.overkiz.*
homeassistant.components.peco.*
homeassistant.components.persistent_notification.*
homeassistant.components.pi_hole.*
homeassistant.components.ping.*
homeassistant.components.powerwall.*
homeassistant.components.proximity.*
homeassistant.components.prusalink.*
@@ -284,6 +293,7 @@ homeassistant.components.smhi.*
homeassistant.components.snooz.*
homeassistant.components.sonarr.*
homeassistant.components.speedtestdotnet.*
homeassistant.components.sql.*
homeassistant.components.ssdp.*
homeassistant.components.statistics.*
homeassistant.components.steamist.*
@@ -300,6 +310,7 @@ homeassistant.components.tag.*
homeassistant.components.tailscale.*
homeassistant.components.tautulli.*
homeassistant.components.tcp.*
homeassistant.components.text.*
homeassistant.components.threshold.*
homeassistant.components.tibber.*
homeassistant.components.tile.*

41
.vscode/tasks.json vendored
View File

@@ -103,7 +103,7 @@
{
"label": "Install all Requirements",
"type": "shell",
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_all.txt",
"command": "pip3 install -r requirements_all.txt",
"group": {
"kind": "build",
"isDefault": true
@@ -117,7 +117,7 @@
{
"label": "Install all Test Requirements",
"type": "shell",
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_test_all.txt",
"command": "pip3 install -r requirements_test_all.txt",
"group": {
"kind": "build",
"isDefault": true
@@ -137,6 +137,26 @@
"kind": "build",
"isDefault": true
}
},
{
"label": "Run scaffold",
"detail": "Add new functionality to a integration using a scaffold.",
"type": "shell",
"command": "python3 -m script.scaffold ${input:scaffoldName} --integration ${input:integrationName}",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Create new integration",
"detail": "Use the scaffold to create a new integration.",
"type": "shell",
"command": "python3 -m script.scaffold integration",
"group": {
"kind": "build",
"isDefault": true
}
}
],
"inputs": [
@@ -144,6 +164,23 @@
"id": "integrationName",
"type": "promptString",
"description": "For which integration should the task run?"
},
{
"id": "scaffoldName",
"type": "pickString",
"options": [
"backup",
"config_flow",
"config_flow_discovery",
"config_flow_helper",
"config_flow_oauth2",
"device_action",
"device_condition",
"device_trigger",
"reproduce_state",
"significant_change"
],
"description": "Which scaffold should be run?"
}
]
}

View File

@@ -59,6 +59,8 @@ build.json @home-assistant/supervisor
/tests/components/airvisual_pro/ @bachya
/homeassistant/components/airzone/ @Noltari
/tests/components/airzone/ @Noltari
/homeassistant/components/airzone_cloud/ @Noltari
/tests/components/airzone_cloud/ @Noltari
/homeassistant/components/aladdin_connect/ @mkmer
/tests/components/aladdin_connect/ @mkmer
/homeassistant/components/alarm_control_panel/ @home-assistant/core
@@ -80,8 +82,8 @@ build.json @home-assistant/supervisor
/tests/components/android_ip_webcam/ @engrbm87
/homeassistant/components/androidtv/ @JeffLIrion @ollo69
/tests/components/androidtv/ @JeffLIrion @ollo69
/homeassistant/components/androidtv_remote/ @tronikos
/tests/components/androidtv_remote/ @tronikos
/homeassistant/components/androidtv_remote/ @tronikos @Drafteed
/tests/components/androidtv_remote/ @tronikos @Drafteed
/homeassistant/components/anova/ @Lash-L
/tests/components/anova/ @Lash-L
/homeassistant/components/anthemav/ @hyralex
@@ -211,6 +213,8 @@ build.json @home-assistant/supervisor
/tests/components/color_extractor/ @GenericStudent
/homeassistant/components/comfoconnect/ @michaelarnauts
/tests/components/comfoconnect/ @michaelarnauts
/homeassistant/components/command_line/ @gjohansson-ST
/tests/components/command_line/ @gjohansson-ST
/homeassistant/components/compensation/ @Petro31
/tests/components/compensation/ @Petro31
/homeassistant/components/config/ @home-assistant/core
@@ -234,6 +238,10 @@ build.json @home-assistant/supervisor
/homeassistant/components/cups/ @fabaff
/homeassistant/components/daikin/ @fredrike
/tests/components/daikin/ @fredrike
/homeassistant/components/date/ @home-assistant/core
/tests/components/date/ @home-assistant/core
/homeassistant/components/datetime/ @home-assistant/core
/tests/components/datetime/ @home-assistant/core
/homeassistant/components/debugpy/ @frenck
/tests/components/debugpy/ @frenck
/homeassistant/components/deconz/ @Kane610
@@ -267,6 +275,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/discogs/ @thibmaek
/homeassistant/components/discord/ @tkdrob
/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
@@ -281,6 +291,8 @@ build.json @home-assistant/supervisor
/tests/components/doorbird/ @oblogic7 @bdraco @flacjacket
/homeassistant/components/dormakaba_dkey/ @emontnemery
/tests/components/dormakaba_dkey/ @emontnemery
/homeassistant/components/dremel_3d_printer/ @tkdrob
/tests/components/dremel_3d_printer/ @tkdrob
/homeassistant/components/dsmr/ @Robbie1221 @frenck
/tests/components/dsmr/ @Robbie1221 @frenck
/homeassistant/components/dsmr_reader/ @depl0y @glodenox
@@ -288,6 +300,7 @@ build.json @home-assistant/supervisor
/homeassistant/components/dunehd/ @bieniu
/tests/components/dunehd/ @bieniu
/homeassistant/components/dwd_weather_warnings/ @runningman84 @stephan192 @Hummel95 @andarotajo
/tests/components/dwd_weather_warnings/ @runningman84 @stephan192 @Hummel95 @andarotajo
/homeassistant/components/dynalite/ @ziv1234
/tests/components/dynalite/ @ziv1234
/homeassistant/components/eafm/ @Jc2k
@@ -306,6 +319,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/egardia/ @jeroenterheerdt
/homeassistant/components/eight_sleep/ @mezz64 @raman325
/tests/components/eight_sleep/ @mezz64 @raman325
/homeassistant/components/electrasmart/ @jafar-atili
/tests/components/electrasmart/ @jafar-atili
/homeassistant/components/elgato/ @frenck
/tests/components/elgato/ @frenck
/homeassistant/components/elkm1/ @gwww @bdraco
@@ -341,8 +356,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/eq3btsmart/ @rytilahti
/homeassistant/components/escea/ @lazdavila
/tests/components/escea/ @lazdavila
/homeassistant/components/esphome/ @OttoWinter @jesserockz
/tests/components/esphome/ @OttoWinter @jesserockz
/homeassistant/components/esphome/ @OttoWinter @jesserockz @bdraco
/tests/components/esphome/ @OttoWinter @jesserockz @bdraco
/homeassistant/components/eufylife_ble/ @bdr99
/tests/components/eufylife_ble/ @bdr99
/homeassistant/components/evil_genius_labs/ @balloob
@@ -437,8 +452,8 @@ build.json @home-assistant/supervisor
/tests/components/glances/ @engrbm87
/homeassistant/components/goalzero/ @tkdrob
/tests/components/goalzero/ @tkdrob
/homeassistant/components/gogogate2/ @vangorra @bdraco
/tests/components/gogogate2/ @vangorra @bdraco
/homeassistant/components/gogogate2/ @vangorra
/tests/components/gogogate2/ @vangorra
/homeassistant/components/goodwe/ @mletenay @starkillerOG
/tests/components/goodwe/ @mletenay @starkillerOG
/homeassistant/components/google/ @allenporter
@@ -448,6 +463,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/google_assistant_sdk/ @tronikos
/tests/components/google_assistant_sdk/ @tronikos
/homeassistant/components/google_cloud/ @lufton
/homeassistant/components/google_generative_ai_conversation/ @tronikos
/tests/components/google_generative_ai_conversation/ @tronikos
/homeassistant/components/google_mail/ @tkdrob
/tests/components/google_mail/ @tkdrob
/homeassistant/components/google_sheets/ @tkdrob
@@ -532,7 +549,7 @@ build.json @home-assistant/supervisor
/tests/components/hunterdouglas_powerview/ @bdraco @kingy444 @trullock
/homeassistant/components/hvv_departures/ @vigonotion
/tests/components/hvv_departures/ @vigonotion
/homeassistant/components/hydrawise/ @ptcryan
/homeassistant/components/hydrawise/ @dknowles2 @ptcryan
/homeassistant/components/hyperion/ @dermotduffy
/tests/components/hyperion/ @dermotduffy
/homeassistant/components/ialarm/ @RyuzakiKK
@@ -546,12 +563,14 @@ build.json @home-assistant/supervisor
/tests/components/icloud/ @Quentame @nzapponi
/homeassistant/components/ign_sismologia/ @exxamalte
/tests/components/ign_sismologia/ @exxamalte
/homeassistant/components/image/ @home-assistant/core
/tests/components/image/ @home-assistant/core
/homeassistant/components/image_processing/ @home-assistant/core
/tests/components/image_processing/ @home-assistant/core
/homeassistant/components/image_upload/ @home-assistant/core
/tests/components/image_upload/ @home-assistant/core
/homeassistant/components/imap/ @engrbm87 @jbouwh
/tests/components/imap/ @engrbm87 @jbouwh
/homeassistant/components/imap/ @jbouwh
/tests/components/imap/ @jbouwh
/homeassistant/components/incomfort/ @zxdavb
/homeassistant/components/influxdb/ @mdegat01
/tests/components/influxdb/ @mdegat01
@@ -606,6 +625,8 @@ build.json @home-assistant/supervisor
/tests/components/juicenet/ @jesserockz
/homeassistant/components/justnimbus/ @kvanzuijlen
/tests/components/justnimbus/ @kvanzuijlen
/homeassistant/components/jvc_projector/ @SteveEasley
/tests/components/jvc_projector/ @SteveEasley
/homeassistant/components/kaiterra/ @Michsior14
/homeassistant/components/kaleidescape/ @SteveEasley
/tests/components/kaleidescape/ @SteveEasley
@@ -640,6 +661,8 @@ build.json @home-assistant/supervisor
/tests/components/lametric/ @robbiet480 @frenck @bachya
/homeassistant/components/landisgyr_heat_meter/ @vpathuis
/tests/components/landisgyr_heat_meter/ @vpathuis
/homeassistant/components/lastfm/ @joostlek
/tests/components/lastfm/ @joostlek
/homeassistant/components/launch_library/ @ludeeus @DurgNomis-drol
/tests/components/launch_library/ @ludeeus @DurgNomis-drol
/homeassistant/components/laundrify/ @xLarry
@@ -762,11 +785,12 @@ build.json @home-assistant/supervisor
/tests/components/mutesync/ @currentoor
/homeassistant/components/my/ @home-assistant/core
/tests/components/my/ @home-assistant/core
/homeassistant/components/myq/ @bdraco @ehendrix23
/tests/components/myq/ @bdraco @ehendrix23
/homeassistant/components/myq/ @ehendrix23
/tests/components/myq/ @ehendrix23
/homeassistant/components/mysensors/ @MartinHjelmare @functionpointer
/tests/components/mysensors/ @MartinHjelmare @functionpointer
/homeassistant/components/mystrom/ @fabaff
/tests/components/mystrom/ @fabaff
/homeassistant/components/nam/ @bieniu
/tests/components/nam/ @bieniu
/homeassistant/components/nanoleaf/ @milanmeu
@@ -783,6 +807,7 @@ build.json @home-assistant/supervisor
/homeassistant/components/netdata/ @fabaff
/homeassistant/components/netgear/ @hacf-fr @Quentame @starkillerOG
/tests/components/netgear/ @hacf-fr @Quentame @starkillerOG
/homeassistant/components/netgear_lte/ @tkdrob
/homeassistant/components/network/ @home-assistant/core
/tests/components/network/ @home-assistant/core
/homeassistant/components/nexia/ @bdraco
@@ -860,6 +885,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/opengarage/ @danielhiversen
/tests/components/opengarage/ @danielhiversen
/homeassistant/components/openhome/ @bazwilliams
/tests/components/openhome/ @bazwilliams
/homeassistant/components/opensky/ @joostlek
/homeassistant/components/opentherm_gw/ @mvn23
/tests/components/opentherm_gw/ @mvn23
/homeassistant/components/openuv/ @bachya
@@ -942,6 +969,7 @@ build.json @home-assistant/supervisor
/tests/components/qingping/ @bdraco @skgsergio
/homeassistant/components/qld_bushfire/ @exxamalte
/tests/components/qld_bushfire/ @exxamalte
/homeassistant/components/qnap/ @disforw
/homeassistant/components/qnap_qsw/ @Noltari
/tests/components/qnap_qsw/ @Noltari
/homeassistant/components/quantum_gateway/ @cisasteelersfan
@@ -954,8 +982,8 @@ build.json @home-assistant/supervisor
/tests/components/radarr/ @tkdrob
/homeassistant/components/radio_browser/ @frenck
/tests/components/radio_browser/ @frenck
/homeassistant/components/radiotherm/ @bdraco @vinnyfuria
/tests/components/radiotherm/ @bdraco @vinnyfuria
/homeassistant/components/radiotherm/ @vinnyfuria
/tests/components/radiotherm/ @vinnyfuria
/homeassistant/components/rainbird/ @konikvranik @allenporter
/tests/components/rainbird/ @konikvranik @allenporter
/homeassistant/components/raincloud/ @vanstinator
@@ -980,6 +1008,8 @@ build.json @home-assistant/supervisor
/tests/components/remote/ @home-assistant/core
/homeassistant/components/renault/ @epenet
/tests/components/renault/ @epenet
/homeassistant/components/renson/ @jimmyd-be
/tests/components/renson/ @jimmyd-be
/homeassistant/components/reolink/ @starkillerOG
/tests/components/reolink/ @starkillerOG
/homeassistant/components/repairs/ @home-assistant/core
@@ -997,8 +1027,8 @@ build.json @home-assistant/supervisor
/tests/components/ridwell/ @bachya
/homeassistant/components/risco/ @OnFreund
/tests/components/risco/ @OnFreund
/homeassistant/components/rituals_perfume_genie/ @milanmeu
/tests/components/rituals_perfume_genie/ @milanmeu
/homeassistant/components/rituals_perfume_genie/ @milanmeu @frenck
/tests/components/rituals_perfume_genie/ @milanmeu @frenck
/homeassistant/components/rmvtransport/ @cgtobi
/tests/components/rmvtransport/ @cgtobi
/homeassistant/components/roborock/ @humbertogontijo @Lash-L
@@ -1093,8 +1123,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/sky_hub/ @rogerselwyn
/homeassistant/components/skybell/ @tkdrob
/tests/components/skybell/ @tkdrob
/homeassistant/components/slack/ @bachya @tkdrob
/tests/components/slack/ @bachya @tkdrob
/homeassistant/components/slack/ @tkdrob
/tests/components/slack/ @tkdrob
/homeassistant/components/sleepiq/ @mfugate1 @kbickar
/tests/components/sleepiq/ @mfugate1 @kbickar
/homeassistant/components/slide/ @ualex73
@@ -1144,8 +1174,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/splunk/ @Bre77
/homeassistant/components/spotify/ @frenck
/tests/components/spotify/ @frenck
/homeassistant/components/sql/ @dgomes @gjohansson-ST @dougiteixeira
/tests/components/sql/ @dgomes @gjohansson-ST @dougiteixeira
/homeassistant/components/sql/ @gjohansson-ST @dougiteixeira
/tests/components/sql/ @gjohansson-ST @dougiteixeira
/homeassistant/components/squeezebox/ @rajlaud
/tests/components/squeezebox/ @rajlaud
/homeassistant/components/srp_energy/ @briglx
@@ -1187,8 +1217,8 @@ build.json @home-assistant/supervisor
/tests/components/switchbee/ @jafar-atili
/homeassistant/components/switchbot/ @bdraco @danielhiversen @RenierM26 @murtas @Eloston @dsypniewski
/tests/components/switchbot/ @bdraco @danielhiversen @RenierM26 @murtas @Eloston @dsypniewski
/homeassistant/components/switcher_kis/ @tomerfi @thecode
/tests/components/switcher_kis/ @tomerfi @thecode
/homeassistant/components/switcher_kis/ @thecode
/tests/components/switcher_kis/ @thecode
/homeassistant/components/switchmate/ @danielhiversen @qiz-li
/homeassistant/components/syncthing/ @zhulik
/tests/components/syncthing/ @zhulik
@@ -1199,8 +1229,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/synology_srm/ @aerialls
/homeassistant/components/system_bridge/ @timmo001
/tests/components/system_bridge/ @timmo001
/homeassistant/components/tado/ @michaelarnauts
/tests/components/tado/ @michaelarnauts
/homeassistant/components/tado/ @michaelarnauts @chiefdragon
/tests/components/tado/ @michaelarnauts @chiefdragon
/homeassistant/components/tag/ @balloob @dmulcahey
/tests/components/tag/ @balloob @dmulcahey
/homeassistant/components/tailscale/ @frenck
@@ -1234,6 +1264,8 @@ build.json @home-assistant/supervisor
/tests/components/tile/ @bachya
/homeassistant/components/tilt_ble/ @apt-itude
/tests/components/tilt_ble/ @apt-itude
/homeassistant/components/time/ @home-assistant/core
/tests/components/time/ @home-assistant/core
/homeassistant/components/time_date/ @fabaff
/tests/components/time_date/ @fabaff
/homeassistant/components/tmb/ @alemuro
@@ -1271,6 +1303,8 @@ build.json @home-assistant/supervisor
/tests/components/twentemilieu/ @frenck
/homeassistant/components/twinkly/ @dr1rrb @Robbie1221
/tests/components/twinkly/ @dr1rrb @Robbie1221
/homeassistant/components/twitch/ @joostlek
/tests/components/twitch/ @joostlek
/homeassistant/components/ukraine_alarm/ @PaulAnnekov
/tests/components/ukraine_alarm/ @PaulAnnekov
/homeassistant/components/unifi/ @Kane610
@@ -1401,6 +1435,8 @@ build.json @home-assistant/supervisor
/tests/components/yolink/ @matrixd2
/homeassistant/components/youless/ @gjong
/tests/components/youless/ @gjong
/homeassistant/components/youtube/ @joostlek
/tests/components/youtube/ @joostlek
/homeassistant/components/zamg/ @killer0071234
/tests/components/zamg/ @killer0071234
/homeassistant/components/zengge/ @emontnemery

View File

@@ -18,7 +18,6 @@ RUN \
--no-index \
--only-binary=:all: \
--find-links "${WHEELS_LINKS}" \
--use-deprecated=legacy-resolver \
-r homeassistant/requirements.txt
COPY requirements_all.txt home_assistant_frontend-* home_assistant_intents-* homeassistant/
@@ -43,7 +42,6 @@ RUN \
--no-index \
--only-binary=:all: \
--find-links "${WHEELS_LINKS}" \
--use-deprecated=legacy-resolver \
-r homeassistant/requirements_all.txt
## Setup Home Assistant Core
@@ -54,7 +52,6 @@ RUN \
--no-index \
--only-binary=:all: \
--find-links "${WHEELS_LINKS}" \
--use-deprecated=legacy-resolver \
-e ./homeassistant \
&& python3 -m compileall \
homeassistant/homeassistant

View File

@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.10
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.11
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -45,9 +45,9 @@ WORKDIR /workspaces
# Install Python dependencies from requirements
COPY requirements.txt ./
COPY homeassistant/package_constraints.txt homeassistant/package_constraints.txt
RUN pip3 install -r requirements.txt --use-deprecated=legacy-resolver
RUN pip3 install -r requirements.txt
COPY requirements_test.txt requirements_test_pre_commit.txt ./
RUN pip3 install -r requirements_test.txt --use-deprecated=legacy-resolver
RUN pip3 install -r requirements_test.txt
RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/
# Set the default shell to bash instead of sh

View File

@@ -21,7 +21,7 @@ If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.
.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
:target: https://discord.gg/c5DvZ4e
:target: https://www.home-assistant.io/join-chat/
.. |screenshot-states| image:: https://raw.githubusercontent.com/home-assistant/core/master/docs/screenshots.png
:target: https://demo.home-assistant.io
.. |screenshot-integrations| image:: https://raw.githubusercontent.com/home-assistant/core/dev/docs/screenshot-integrations.png

View File

@@ -1,14 +1,16 @@
image: homeassistant/{arch}-homeassistant
shadow_repository: ghcr.io/home-assistant
image: ghcr.io/home-assistant/{arch}-homeassistant
build_from:
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2023.04.0
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2023.04.0
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2023.04.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.0
i386: ghcr.io/home-assistant/i386-homeassistant-base:2023.04.0
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
codenotary:
signer: notary@home-assistant.io
base_image: notary@home-assistant.io
cosign:
base_identity: https://github.com/home-assistant/docker/.*
identity: https://github.com/home-assistant/core/.*
labels:
io.hass.type: core
org.opencontainers.image.title: Home Assistant

View File

@@ -93,7 +93,7 @@ class _PyJWTWithVerify(PyJWT):
# nothing slips through.
assert "exp" in payload, "exp claim is required"
assert "iat" in payload, "iat claim is required"
self._validate_claims( # type: ignore[no-untyped-call]
self._validate_claims(
payload=payload,
options=merged_options,
issuer=issuer,
@@ -102,7 +102,7 @@ class _PyJWTWithVerify(PyJWT):
return payload
_jwt = _PyJWTWithVerify() # type: ignore[no-untyped-call]
_jwt = _PyJWTWithVerify()
verify_and_decode = _jwt.verify_and_decode
unverified_hs256_token_decode = lru_cache(maxsize=JWT_TOKEN_CACHE_SIZE)(
partial(

View File

@@ -13,8 +13,8 @@ from homeassistant.const import CONF_COMMAND
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
CONF_ARGS = "args"
CONF_META = "meta"

View File

@@ -16,8 +16,8 @@ from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.storage import Store
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
STORAGE_VERSION = 1
STORAGE_KEY = "auth_provider.homeassistant"

View File

@@ -11,8 +11,8 @@ from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
USER_SCHEMA = vol.Schema(
{

View File

@@ -15,8 +15,8 @@ from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
import homeassistant.helpers.config_validation as cv
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
AUTH_PROVIDER_TYPE = "legacy_api_password"
CONF_API_PASSWORD = "api_password"

View File

@@ -23,9 +23,9 @@ from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
import homeassistant.helpers.config_validation as cv
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from .. import InvalidAuthError
from ..models import Credentials, RefreshToken, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
IPAddress = IPv4Address | IPv6Address
IPNetwork = IPv4Network | IPv6Network
@@ -46,7 +46,7 @@ CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend(
[
vol.Or(
cv.uuid4_hex,
vol.Schema({vol.Required(CONF_GROUP): cv.uuid4_hex}),
vol.Schema({vol.Required(CONF_GROUP): str}),
)
],
)

View File

@@ -0,0 +1,72 @@
"""Functools backports from standard lib."""
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
_T = TypeVar("_T")
_R = TypeVar("_R")
class cached_property(Generic[_T, _R]): # 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:
"""Initialize."""
self.func = func
self.attrname: Any = None
self.__doc__ = func.__doc__
def __set_name__(self, owner: type[_T], name: str) -> None:
"""Set name."""
if self.attrname is None:
self.attrname = name
elif name != self.attrname:
raise TypeError(
"Cannot assign the same cached_property to two different names "
f"({self.attrname!r} and {name!r})."
)
@overload
def __get__(self, instance: None, owner: type[_T]) -> Self:
...
@overload
def __get__(self, instance: _T, owner: type[_T]) -> _R:
...
def __get__(self, instance: _T | None, owner: type[_T] | None = None) -> _R | Self:
"""Get."""
if instance is None:
return self
if self.attrname is None:
raise TypeError(
"Cannot use cached_property instance without calling __set_name__ on it."
)
try:
cache = instance.__dict__
# not all objects have __dict__ (e.g. class defines slots)
except AttributeError:
msg = (
f"No '__dict__' attribute on {type(instance).__name__!r} "
f"instance to cache {self.attrname!r} property."
)
raise TypeError(msg) from None
val = self.func(instance)
try:
cache[self.attrname] = val
except TypeError:
msg = (
f"The '__dict__' attribute on {type(instance).__name__!r} instance "
f"does not support item assignment for caching {self.attrname!r} property."
)
raise TypeError(msg) from None
return val
__class_getitem__ = classmethod(GenericAlias)

View File

@@ -19,6 +19,7 @@ import yarl
from . import config as conf_util, config_entries, core, loader
from .components import http
from .const import (
FORMAT_DATETIME,
REQUIRED_NEXT_PYTHON_HA_RELEASE,
REQUIRED_NEXT_PYTHON_VER,
SIGNAL_BOOTSTRAP_INTEGRATIONS,
@@ -31,6 +32,7 @@ from .helpers import (
entity_registry,
issue_registry,
recorder,
restore_state,
template,
)
from .helpers.dispatcher import async_dispatcher_send
@@ -247,6 +249,7 @@ async def load_registries(hass: core.HomeAssistant) -> None:
issue_registry.async_load(hass),
hass.async_add_executor_job(_cache_uname_processor),
template.async_load_custom_templates(hass),
restore_state.async_load(hass),
)
@@ -347,7 +350,6 @@ def async_enable_logging(
fmt = (
"%(asctime)s.%(msecs)03d %(levelname)s (%(threadName)s) [%(name)s] %(message)s"
)
datefmt = "%Y-%m-%d %H:%M:%S"
if not log_no_color:
try:
@@ -362,7 +364,7 @@ def async_enable_logging(
logging.getLogger().handlers[0].setFormatter(
ColoredFormatter(
colorfmt,
datefmt=datefmt,
datefmt=FORMAT_DATETIME,
reset=True,
log_colors={
"DEBUG": "cyan",
@@ -378,12 +380,18 @@ def async_enable_logging(
# If the above initialization failed for any reason, setup the default
# formatting. If the above succeeds, this will result in a no-op.
logging.basicConfig(format=fmt, datefmt=datefmt, level=logging.INFO)
logging.basicConfig(format=fmt, datefmt=FORMAT_DATETIME, level=logging.INFO)
# Capture warnings.warn(...) and friends messages in logs.
# The standard destination for them is stderr, which may end up unnoticed.
# This way they're where other messages are, and can be filtered as usual.
logging.captureWarnings(True)
# Suppress overly verbose logs from libraries that aren't helpful
logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("aiohttp.access").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.WARNING)
sys.excepthook = lambda *args: logging.getLogger(None).exception(
"Uncaught exception", exc_info=args # type: ignore[arg-type]
@@ -430,7 +438,7 @@ def async_enable_logging(
_LOGGER.error("Error rolling over log file: %s", err)
err_handler.setLevel(logging.INFO if verbose else logging.WARNING)
err_handler.setFormatter(logging.Formatter(fmt, datefmt=datefmt))
err_handler.setFormatter(logging.Formatter(fmt, datefmt=FORMAT_DATETIME))
logger = logging.getLogger("")
logger.addHandler(err_handler)

View File

@@ -0,0 +1,5 @@
{
"domain": "airzone",
"name": "Airzone",
"integrations": ["airzone", "airzone_cloud"]
}

View File

@@ -6,6 +6,7 @@
"google_assistant_sdk",
"google_cloud",
"google_domains",
"google_generative_ai_conversation",
"google_mail",
"google_maps",
"google_pubsub",
@@ -16,6 +17,7 @@
"google",
"nest",
"cast",
"dialogflow"
"dialogflow",
"youtube"
]
}

View File

@@ -1,5 +1,5 @@
{
"domain": "yale",
"name": "Yale",
"integrations": ["august", "yale_smart_alarm", "yalexs_ble"]
"integrations": ["august", "yale_smart_alarm", "yalexs_ble", "yale_home"]
}

View File

@@ -42,6 +42,7 @@ async def async_setup_entry(
class AbodeBinarySensor(AbodeDevice, BinarySensorEntity):
"""A binary sensor implementation for Abode device."""
_attr_name = None
_device: ABBinarySensor
@property

View File

@@ -12,6 +12,7 @@ from homeassistant.components.sensor import (
SensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import LIGHT_LUX
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@@ -21,17 +22,14 @@ from .const import DOMAIN
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key=CONST.TEMP_STATUS_KEY,
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
),
SensorEntityDescription(
key=CONST.HUMI_STATUS_KEY,
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
),
SensorEntityDescription(
key=CONST.LUX_STATUS_KEY,
name="Lux",
device_class=SensorDeviceClass.ILLUMINANCE,
),
)
@@ -55,6 +53,7 @@ class AbodeSensor(AbodeDevice, SensorEntity):
"""A sensor implementation for Abode devices."""
_device: AbodeSense
_attr_has_entity_name = True
def __init__(
self,
@@ -71,7 +70,7 @@ class AbodeSensor(AbodeDevice, SensorEntity):
elif description.key == CONST.HUMI_STATUS_KEY:
self._attr_native_unit_of_measurement = device.humidity_unit
elif description.key == CONST.LUX_STATUS_KEY:
self._attr_native_unit_of_measurement = device.lux_unit
self._attr_native_unit_of_measurement = LIGHT_LUX
@property
def native_value(self) -> float | None:

View File

@@ -121,12 +121,12 @@ class AccuWeatherDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
async def _async_update_data(self) -> dict[str, Any]:
"""Update data via library."""
forecast: list[dict[str, Any]] = []
try:
async with timeout(10):
current = await self.accuweather.async_get_current_conditions()
forecast = (
await self.accuweather.async_get_forecast() if self.forecast else {}
)
if self.forecast:
forecast = await self.accuweather.async_get_daily_forecast()
except (
ApiError,
ClientConnectorError,

View File

@@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"loggers": ["accuweather"],
"quality_scale": "platinum",
"requirements": ["accuweather==0.5.1"]
"requirements": ["accuweather==1.0.0"]
}

View File

@@ -16,6 +16,7 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_CUBIC_METER,
PERCENTAGE,
UV_INDEX,
UnitOfIrradiance,
UnitOfLength,
UnitOfSpeed,
UnitOfTemperature,
@@ -104,6 +105,16 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
native_unit_of_measurement=UnitOfTime.HOURS,
value_fn=lambda data: cast(float, data),
),
AccuWeatherSensorDescription(
key="LongPhraseDay",
name="Condition day",
value_fn=lambda data: cast(str, data),
),
AccuWeatherSensorDescription(
key="LongPhraseNight",
name="Condition night",
value_fn=lambda data: cast(str, data),
),
AccuWeatherSensorDescription(
key="Mold",
icon="mdi:blur",
@@ -154,6 +165,22 @@ FORECAST_SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="SolarIrradianceDay",
icon="mdi:weather-sunny",
name="Solar irradiance day",
entity_registry_enabled_default=False,
native_unit_of_measurement=UnitOfIrradiance.WATTS_PER_SQUARE_METER,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="SolarIrradianceNight",
icon="mdi:weather-sunny",
name="Solar irradiance night",
entity_registry_enabled_default=False,
native_unit_of_measurement=UnitOfIrradiance.WATTS_PER_SQUARE_METER,
value_fn=lambda data: cast(float, data[ATTR_VALUE]),
),
AccuWeatherSensorDescription(
key="ThunderstormProbabilityDay",
icon="mdi:weather-lightning",

View File

@@ -1,14 +1,16 @@
"""Support for the AccuWeather service."""
from __future__ import annotations
from statistics import mean
from typing import Any, cast
from typing import cast
from homeassistant.components.weather import (
ATTR_FORECAST_CLOUD_COVERAGE,
ATTR_FORECAST_CONDITION,
ATTR_FORECAST_NATIVE_APPARENT_TEMP,
ATTR_FORECAST_NATIVE_PRECIPITATION,
ATTR_FORECAST_NATIVE_TEMP,
ATTR_FORECAST_NATIVE_TEMP_LOW,
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED,
ATTR_FORECAST_NATIVE_WIND_SPEED,
ATTR_FORECAST_PRECIPITATION_PROBABILITY,
ATTR_FORECAST_TIME,
@@ -30,7 +32,16 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.util.dt import utc_from_timestamp
from . import AccuWeatherDataUpdateCoordinator
from .const import API_METRIC, ATTR_FORECAST, ATTRIBUTION, CONDITION_CLASSES, DOMAIN
from .const import (
API_METRIC,
ATTR_DIRECTION,
ATTR_FORECAST,
ATTR_SPEED,
ATTR_VALUE,
ATTRIBUTION,
CONDITION_CLASSES,
DOMAIN,
)
PARALLEL_UPDATES = 1
@@ -51,6 +62,7 @@ class AccuWeatherEntity(
"""Define an AccuWeather entity."""
_attr_has_entity_name = True
_attr_name = None
def __init__(self, coordinator: AccuWeatherDataUpdateCoordinator) -> None:
"""Initialize."""
@@ -79,35 +91,61 @@ class AccuWeatherEntity(
except IndexError:
return None
@property
def cloud_coverage(self) -> float:
"""Return the Cloud coverage in %."""
return cast(float, self.coordinator.data["CloudCover"])
@property
def native_apparent_temperature(self) -> float:
"""Return the apparent temperature."""
return cast(
float, self.coordinator.data["ApparentTemperature"][API_METRIC][ATTR_VALUE]
)
@property
def native_temperature(self) -> float:
"""Return the temperature."""
return cast(float, self.coordinator.data["Temperature"][API_METRIC]["Value"])
return cast(float, self.coordinator.data["Temperature"][API_METRIC][ATTR_VALUE])
@property
def native_pressure(self) -> float:
"""Return the pressure."""
return cast(float, self.coordinator.data["Pressure"][API_METRIC]["Value"])
return cast(float, self.coordinator.data["Pressure"][API_METRIC][ATTR_VALUE])
@property
def native_dew_point(self) -> float:
"""Return the dew point."""
return cast(float, self.coordinator.data["DewPoint"][API_METRIC][ATTR_VALUE])
@property
def humidity(self) -> int:
"""Return the humidity."""
return cast(int, self.coordinator.data["RelativeHumidity"])
@property
def native_wind_gust_speed(self) -> float:
"""Return the wind gust speed."""
return cast(
float, self.coordinator.data["WindGust"][ATTR_SPEED][API_METRIC][ATTR_VALUE]
)
@property
def native_wind_speed(self) -> float:
"""Return the wind speed."""
return cast(float, self.coordinator.data["Wind"]["Speed"][API_METRIC]["Value"])
return cast(
float, self.coordinator.data["Wind"][ATTR_SPEED][API_METRIC][ATTR_VALUE]
)
@property
def wind_bearing(self) -> int:
"""Return the wind bearing."""
return cast(int, self.coordinator.data["Wind"]["Direction"]["Degrees"])
return cast(int, self.coordinator.data["Wind"][ATTR_DIRECTION]["Degrees"])
@property
def native_visibility(self) -> float:
"""Return the visibility."""
return cast(float, self.coordinator.data["Visibility"][API_METRIC]["Value"])
return cast(float, self.coordinator.data["Visibility"][API_METRIC][ATTR_VALUE])
@property
def forecast(self) -> list[Forecast] | None:
@@ -118,37 +156,26 @@ class AccuWeatherEntity(
return [
{
ATTR_FORECAST_TIME: utc_from_timestamp(item["EpochDate"]).isoformat(),
ATTR_FORECAST_NATIVE_TEMP: item["TemperatureMax"]["Value"],
ATTR_FORECAST_NATIVE_TEMP_LOW: item["TemperatureMin"]["Value"],
ATTR_FORECAST_NATIVE_PRECIPITATION: self._calc_precipitation(item),
ATTR_FORECAST_PRECIPITATION_PROBABILITY: round(
mean(
[
item["PrecipitationProbabilityDay"],
item["PrecipitationProbabilityNight"],
]
)
),
ATTR_FORECAST_NATIVE_WIND_SPEED: item["WindDay"]["Speed"]["Value"],
ATTR_FORECAST_WIND_BEARING: item["WindDay"]["Direction"]["Degrees"],
ATTR_FORECAST_CLOUD_COVERAGE: item["CloudCoverDay"],
ATTR_FORECAST_NATIVE_TEMP: item["TemperatureMax"][ATTR_VALUE],
ATTR_FORECAST_NATIVE_TEMP_LOW: item["TemperatureMin"][ATTR_VALUE],
ATTR_FORECAST_NATIVE_APPARENT_TEMP: item["RealFeelTemperatureMax"][
ATTR_VALUE
],
ATTR_FORECAST_NATIVE_PRECIPITATION: item["TotalLiquidDay"][ATTR_VALUE],
ATTR_FORECAST_PRECIPITATION_PROBABILITY: item[
"PrecipitationProbabilityDay"
],
ATTR_FORECAST_NATIVE_WIND_SPEED: item["WindDay"][ATTR_SPEED][
ATTR_VALUE
],
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED: item["WindGustDay"][ATTR_SPEED][
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
][0],
}
for item in self.coordinator.data[ATTR_FORECAST]
]
@staticmethod
def _calc_precipitation(day: dict[str, Any]) -> float:
"""Return sum of the precipitation."""
precip_sum = 0
precip_types = ["Rain", "Snow", "Ice"]
for precip in precip_types:
precip_sum = sum(
[
precip_sum,
day[f"{precip}Day"]["Value"],
day[f"{precip}Night"]["Value"],
]
)
return round(precip_sum, 1)

View File

@@ -14,6 +14,7 @@ class AcmedaBase(entity.Entity):
"""Base representation of an Acmeda roller."""
_attr_should_poll = False
_attr_has_entity_name = True
def __init__(self, roller: aiopulse.Roller) -> None:
"""Initialize the roller."""
@@ -72,11 +73,6 @@ class AcmedaBase(entity.Entity):
"""Return the ID of this roller."""
return self.roller.id
@property
def name(self) -> str | None:
"""Return the name of roller."""
return self.roller.name
@property
def device_info(self) -> entity.DeviceInfo:
"""Return the device info."""

View File

@@ -45,7 +45,9 @@ async def async_setup_entry(
class AcmedaCover(AcmedaBase, CoverEntity):
"""Representation of a Acmeda cover device."""
"""Representation of an Acmeda cover device."""
_attr_name = None
@property
def current_cover_position(self) -> int | None:

View File

@@ -40,16 +40,11 @@ async def async_setup_entry(
class AcmedaBattery(AcmedaBase, SensorEntity):
"""Representation of a Acmeda cover device."""
"""Representation of an Acmeda cover sensor."""
_attr_device_class = SensorDeviceClass.BATTERY
_attr_native_unit_of_measurement = PERCENTAGE
@property
def name(self) -> str:
"""Return the name of roller."""
return f"{super().name} Battery"
@property
def native_value(self) -> float | int | None:
"""Return the state of the device."""

View File

@@ -1,7 +1,7 @@
"""Support for Adax wifi-enabled home heaters."""
from __future__ import annotations
from typing import Any
from typing import Any, cast
from adax import Adax
from adax_local import Adax as AdaxLocal
@@ -79,7 +79,10 @@ class AdaxDevice(ClimateEntity):
self._attr_unique_id = f"{heater_data['homeId']}_{heater_data['id']}"
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, heater_data["id"])},
name=self.name,
# Instead of setting the device name to the entity name, adax
# should be updated to set has_entity_name = True, and set the entity
# name to None
name=cast(str | None, self.name),
manufacturer="Adax",
)

View File

@@ -39,56 +39,56 @@ class AdGuardHomeEntityDescription(
SENSORS: tuple[AdGuardHomeEntityDescription, ...] = (
AdGuardHomeEntityDescription(
key="dns_queries",
name="DNS queries",
translation_key="dns_queries",
icon="mdi:magnify",
native_unit_of_measurement="queries",
value_fn=lambda adguard: adguard.stats.dns_queries(),
),
AdGuardHomeEntityDescription(
key="blocked_filtering",
name="DNS queries blocked",
translation_key="dns_queries_blocked",
icon="mdi:magnify-close",
native_unit_of_measurement="queries",
value_fn=lambda adguard: adguard.stats.blocked_filtering(),
),
AdGuardHomeEntityDescription(
key="blocked_percentage",
name="DNS queries blocked ratio",
translation_key="dns_queries_blocked_ratio",
icon="mdi:magnify-close",
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda adguard: adguard.stats.blocked_percentage(),
),
AdGuardHomeEntityDescription(
key="blocked_parental",
name="Parental control blocked",
translation_key="parental_control_blocked",
icon="mdi:human-male-girl",
native_unit_of_measurement="requests",
value_fn=lambda adguard: adguard.stats.replaced_parental(),
),
AdGuardHomeEntityDescription(
key="blocked_safebrowsing",
name="Safe browsing blocked",
translation_key="safe_browsing_blocked",
icon="mdi:shield-half-full",
native_unit_of_measurement="requests",
value_fn=lambda adguard: adguard.stats.replaced_safebrowsing(),
),
AdGuardHomeEntityDescription(
key="enforced_safesearch",
name="Safe searches enforced",
translation_key="safe_searches_enforced",
icon="mdi:shield-search",
native_unit_of_measurement="requests",
value_fn=lambda adguard: adguard.stats.replaced_safesearch(),
),
AdGuardHomeEntityDescription(
key="average_speed",
name="Average processing speed",
translation_key="average_processing_speed",
icon="mdi:speedometer",
native_unit_of_measurement=UnitOfTime.MILLISECONDS,
value_fn=lambda adguard: adguard.stats.avg_processing_time(),
),
AdGuardHomeEntityDescription(
key="rules_count",
name="Rules count",
translation_key="rules_count",
icon="mdi:counter",
native_unit_of_measurement="rules",
value_fn=lambda adguard: adguard.filtering.rules_count(allowlist=False),

View File

@@ -24,5 +24,53 @@
"existing_instance_updated": "Updated existing configuration.",
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
}
},
"entity": {
"sensor": {
"dns_queries": {
"name": "DNS queries"
},
"dns_queries_blocked": {
"name": "DNS queries blocked"
},
"dns_queries_blocked_ratio": {
"name": "DNS queries blocked ratio"
},
"parental_control_blocked": {
"name": "Parental control blocked"
},
"safe_browsing_blocked": {
"name": "Safe browsing blocked"
},
"safe_searches_enforced": {
"name": "Safe searches enforced"
},
"average_processing_speed": {
"name": "Average processing speed"
},
"rules_count": {
"name": "Rules count"
}
},
"switch": {
"protection": {
"name": "Protection"
},
"parental": {
"name": "Parental control"
},
"safe_search": {
"name": "Safe search"
},
"safe_browsing": {
"name": "Safe browsing"
},
"filtering": {
"name": "Filtering"
},
"query_log": {
"name": "Query log"
}
}
}
}

View File

@@ -40,7 +40,7 @@ class AdGuardHomeSwitchEntityDescription(
SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
AdGuardHomeSwitchEntityDescription(
key="protection",
name="Protection",
translation_key="protection",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.protection_enabled,
turn_on_fn=lambda adguard: adguard.enable_protection,
@@ -48,7 +48,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="parental",
name="Parental control",
translation_key="parental",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.parental.enabled,
turn_on_fn=lambda adguard: adguard.parental.enable,
@@ -56,7 +56,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="safesearch",
name="Safe search",
translation_key="safe_search",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.safesearch.enabled,
turn_on_fn=lambda adguard: adguard.safesearch.enable,
@@ -64,7 +64,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="safebrowsing",
name="Safe browsing",
translation_key="safe_browsing",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.safebrowsing.enabled,
turn_on_fn=lambda adguard: adguard.safebrowsing.enable,
@@ -72,7 +72,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="filtering",
name="Filtering",
translation_key="filtering",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.filtering.enabled,
turn_on_fn=lambda adguard: adguard.filtering.enable,
@@ -80,7 +80,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="querylog",
name="Query log",
translation_key="query_log",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.querylog.enabled,
turn_on_fn=lambda adguard: adguard.querylog.enable,

View File

@@ -10,6 +10,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateType
from .. import ads
from . import (
ADS_TYPEMAP,
CONF_ADS_FACTOR,
@@ -18,7 +19,6 @@ from . import (
STATE_KEY_STATE,
AdsEntity,
)
from .. import ads
DEFAULT_NAME = "ADS sensor"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(

View File

@@ -91,6 +91,16 @@ class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
_attr_max_temp = 32
_attr_min_temp = 16
_attr_hvac_modes = [
HVACMode.OFF,
HVACMode.COOL,
HVACMode.HEAT,
HVACMode.FAN_ONLY,
HVACMode.DRY,
]
_attr_supported_features = ClimateEntityFeature.FAN_MODE
def __init__(self, instance: AdvantageAirData, ac_key: str) -> None:
"""Initialize an AdvantageAir AC unit."""
super().__init__(instance, ac_key)
@@ -98,36 +108,14 @@ class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
# Set supported features and HVAC modes based on current operating mode
if self._ac.get(ADVANTAGE_AIR_MYAUTO_ENABLED):
# MyAuto
self._attr_supported_features = (
ClimateEntityFeature.FAN_MODE
| ClimateEntityFeature.TARGET_TEMPERATURE
self._attr_supported_features |= (
ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
)
self._attr_hvac_modes = [
HVACMode.OFF,
HVACMode.COOL,
HVACMode.HEAT,
HVACMode.FAN_ONLY,
HVACMode.DRY,
HVACMode.HEAT_COOL,
]
elif self._ac.get(ADVANTAGE_AIR_MYTEMP_ENABLED):
# MyTemp
self._attr_supported_features = ClimateEntityFeature.FAN_MODE
self._attr_hvac_modes = [HVACMode.OFF, HVACMode.COOL, HVACMode.HEAT]
else:
self._attr_hvac_modes += [HVACMode.HEAT_COOL]
elif not self._ac.get(ADVANTAGE_AIR_MYTEMP_ENABLED):
# MyZone
self._attr_supported_features = (
ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.TARGET_TEMPERATURE
)
self._attr_hvac_modes = [
HVACMode.OFF,
HVACMode.COOL,
HVACMode.HEAT,
HVACMode.FAN_ONLY,
HVACMode.DRY,
]
self._attr_supported_features |= ClimateEntityFeature.TARGET_TEMPERATURE
# Add "ezfan" mode if supported
if self._ac.get(ADVANTAGE_AIR_AUTOFAN):

View File

@@ -7,5 +7,5 @@
"iot_class": "local_polling",
"loggers": ["advantage_air"],
"quality_scale": "platinum",
"requirements": ["advantage_air==0.4.4"]
"requirements": ["advantage-air==0.4.4"]
}

View File

@@ -26,6 +26,7 @@ from aemet_opendata.const import (
AEMET_ATTR_STATION_DATE,
AEMET_ATTR_STATION_HUMIDITY,
AEMET_ATTR_STATION_LOCATION,
AEMET_ATTR_STATION_PRESSURE,
AEMET_ATTR_STATION_PRESSURE_SEA,
AEMET_ATTR_STATION_TEMPERATURE,
AEMET_ATTR_STORM_PROBABILITY,
@@ -318,6 +319,8 @@ class WeatherUpdateCoordinator(DataUpdateCoordinator):
pressure = format_float(
station_data[AEMET_ATTR_STATION_PRESSURE_SEA]
)
elif AEMET_ATTR_STATION_PRESSURE in station_data:
pressure = format_float(station_data[AEMET_ATTR_STATION_PRESSURE])
if AEMET_ATTR_STATION_TEMPERATURE in station_data:
temperature = format_float(
station_data[AEMET_ATTR_STATION_TEMPERATURE]

View File

@@ -80,7 +80,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PM1,
device_class=SensorDeviceClass.PM1,
translation_key="pm1",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -88,7 +87,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PM25,
device_class=SensorDeviceClass.PM25,
translation_key="pm25",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -100,7 +98,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PM10,
device_class=SensorDeviceClass.PM10,
translation_key="pm10",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -112,7 +109,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_HUMIDITY,
device_class=SensorDeviceClass.HUMIDITY,
translation_key="humidity",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
@@ -120,7 +116,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PRESSURE,
device_class=SensorDeviceClass.PRESSURE,
translation_key="pressure",
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -128,7 +123,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_TEMPERATURE,
device_class=SensorDeviceClass.TEMPERATURE,
translation_key="temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
@@ -147,7 +141,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_NO2,
device_class=SensorDeviceClass.NITROGEN_DIOXIDE,
translation_key="no2",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -159,7 +152,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_SO2,
device_class=SensorDeviceClass.SULPHUR_DIOXIDE,
translation_key="so2",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -171,7 +163,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_O3,
device_class=SensorDeviceClass.OZONE,
translation_key="o3",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,

View File

@@ -32,35 +32,8 @@
"caqi": {
"name": "Common air quality index"
},
"pm1": {
"name": "[%key:component::sensor::entity_component::pm1::name%]"
},
"pm25": {
"name": "[%key:component::sensor::entity_component::pm25::name%]"
},
"pm10": {
"name": "[%key:component::sensor::entity_component::pm10::name%]"
},
"humidity": {
"name": "[%key:component::sensor::entity_component::humidity::name%]"
},
"pressure": {
"name": "[%key:component::sensor::entity_component::pressure::name%]"
},
"temperature": {
"name": "[%key:component::sensor::entity_component::temperature::name%]"
},
"co": {
"name": "[%key:component::sensor::entity_component::carbon_monoxide::name%]"
},
"no2": {
"name": "[%key:component::sensor::entity_component::nitrogen_dioxide::name%]"
},
"so2": {
"name": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]"
},
"o3": {
"name": "[%key:component::sensor::entity_component::ozone::name%]"
}
}
}

View File

@@ -17,5 +17,3 @@ ATTR_API_STATION_LATITUDE = "Latitude"
ATTR_API_STATION_LONGITUDE = "Longitude"
DEFAULT_NAME = "AirNow"
DOMAIN = "airnow"
SENSOR_AQI_ATTR_DESCR = "description"
SENSOR_AQI_ATTR_LEVEL = "level"

View File

@@ -1,7 +1,12 @@
"""Support for the AirNow sensor service."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
@@ -12,7 +17,10 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from . import AirNowDataUpdateCoordinator
@@ -22,36 +30,60 @@ from .const import (
ATTR_API_AQI_LEVEL,
ATTR_API_O3,
ATTR_API_PM25,
DEFAULT_NAME,
DOMAIN,
SENSOR_AQI_ATTR_DESCR,
SENSOR_AQI_ATTR_LEVEL,
)
ATTRIBUTION = "Data provided by AirNow"
PARALLEL_UPDATES = 1
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
ATTR_DESCR = "description"
ATTR_LEVEL = "level"
@dataclass
class AirNowEntityDescriptionMixin:
"""Mixin for required keys."""
value_fn: Callable[[Any], StateType]
extra_state_attributes_fn: Callable[[Any], dict[str, str]] | None
@dataclass
class AirNowEntityDescription(SensorEntityDescription, AirNowEntityDescriptionMixin):
"""Describes Airnow sensor entity."""
SENSOR_TYPES: tuple[AirNowEntityDescription, ...] = (
AirNowEntityDescription(
key=ATTR_API_AQI,
icon="mdi:blur",
name=ATTR_API_AQI,
native_unit_of_measurement="aqi",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.AQI,
value_fn=lambda data: data.get(ATTR_API_AQI),
extra_state_attributes_fn=lambda data: {
ATTR_DESCR: data[ATTR_API_AQI_DESCRIPTION],
ATTR_LEVEL: data[ATTR_API_AQI_LEVEL],
},
),
SensorEntityDescription(
AirNowEntityDescription(
key=ATTR_API_PM25,
icon="mdi:blur",
name=ATTR_API_PM25,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.PM25,
value_fn=lambda data: data.get(ATTR_API_PM25),
extra_state_attributes_fn=None,
),
SensorEntityDescription(
AirNowEntityDescription(
key=ATTR_API_O3,
translation_key="o3",
icon="mdi:blur",
name=ATTR_API_O3,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda data: data.get(ATTR_API_O3),
extra_state_attributes_fn=None,
),
)
@@ -73,38 +105,38 @@ class AirNowSensor(CoordinatorEntity[AirNowDataUpdateCoordinator], SensorEntity)
"""Define an AirNow sensor."""
_attr_attribution = ATTRIBUTION
_attr_has_entity_name = True
entity_description: AirNowEntityDescription
def __init__(
self,
coordinator: AirNowDataUpdateCoordinator,
description: SensorEntityDescription,
description: AirNowEntityDescription,
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.entity_description = description
self._state = None
self._attrs: dict[str, str] = {}
self._attr_name = f"AirNow {description.name}"
self._attr_unique_id = (
f"{coordinator.latitude}-{coordinator.longitude}-{description.key.lower()}"
)
self._attr_device_info = DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, self._attr_unique_id)},
manufacturer=DEFAULT_NAME,
name=DEFAULT_NAME,
)
@property
def native_value(self):
def native_value(self) -> StateType:
"""Return the state."""
self._state = self.coordinator.data.get(self.entity_description.key)
return self._state
return self.entity_description.value_fn(self.coordinator.data)
@property
def extra_state_attributes(self):
def extra_state_attributes(self) -> dict[str, str] | None:
"""Return the state attributes."""
if self.entity_description.key == ATTR_API_AQI:
self._attrs[SENSOR_AQI_ATTR_DESCR] = self.coordinator.data[
ATTR_API_AQI_DESCRIPTION
]
self._attrs[SENSOR_AQI_ATTR_LEVEL] = self.coordinator.data[
ATTR_API_AQI_LEVEL
]
return self._attrs
if self.entity_description.extra_state_attributes_fn:
return self.entity_description.extra_state_attributes_fn(
self.coordinator.data
)
return None

View File

@@ -20,5 +20,12 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"entity": {
"sensor": {
"o3": {
"name": "[%key:component::sensor::entity_component::ozone::name%]"
}
}
}
}

View File

@@ -53,63 +53,62 @@ class AirQEntityDescription(SensorEntityDescription, AirQEntityDescriptionMixin)
SENSOR_TYPES: list[AirQEntityDescription] = [
AirQEntityDescription(
key="c2h4o",
name="Acetaldehyde",
translation_key="acetaldehyde",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("c2h4o"),
),
AirQEntityDescription(
key="nh3_MR100",
name="Ammonia",
translation_key="ammonia",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("nh3_MR100"),
),
AirQEntityDescription(
key="ash3",
name="Arsine",
translation_key="arsine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ash3"),
),
AirQEntityDescription(
key="br2",
name="Bromine",
translation_key="bromine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("br2"),
),
AirQEntityDescription(
key="ch4s",
name="CH4S",
translation_key="methanethiol",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ch4s"),
),
AirQEntityDescription(
key="cl2_M20",
name="Chlorine",
translation_key="chlorine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("cl2_M20"),
),
AirQEntityDescription(
key="clo2",
name="ClO2",
translation_key="chlorine_dioxide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("clo2"),
),
AirQEntityDescription(
key="co",
name="CO",
translation_key="carbon_monoxide",
native_unit_of_measurement=CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("co"),
),
AirQEntityDescription(
key="co2",
name="CO2",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
@@ -117,14 +116,14 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="cs2",
name="CS2",
translation_key="carbon_disulfide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("cs2"),
),
AirQEntityDescription(
key="dewpt",
name="Dew point",
translation_key="dew_point",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("dewpt"),
@@ -132,63 +131,63 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="ethanol",
name="Ethanol",
translation_key="ethanol",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ethanol"),
),
AirQEntityDescription(
key="c2h4",
name="Ethylene",
translation_key="ethylene",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("c2h4"),
),
AirQEntityDescription(
key="ch2o_M10",
name="Formaldehyde",
translation_key="formaldehyde",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ch2o_M10"),
),
AirQEntityDescription(
key="f2",
name="Fluorine",
translation_key="fluorine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("f2"),
),
AirQEntityDescription(
key="h2s",
name="H2S",
translation_key="hydrogen_sulfide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("h2s"),
),
AirQEntityDescription(
key="hcl",
name="HCl",
translation_key="hydrochloric_acid",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("hcl"),
),
AirQEntityDescription(
key="hcn",
name="HCN",
translation_key="hydrogen_cyanide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("hcn"),
),
AirQEntityDescription(
key="hf",
name="HF",
translation_key="hydrogen_fluoride",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("hf"),
),
AirQEntityDescription(
key="health",
name="Health Index",
translation_key="health_index",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:heart-pulse",
@@ -196,7 +195,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="humidity",
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@@ -204,7 +202,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="humidity_abs",
name="Absolute humidity",
translation_key="absolute_humidity",
native_unit_of_measurement=CONCENTRATION_GRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("humidity_abs"),
@@ -212,28 +210,27 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="h2_M1000",
name="Hydrogen",
translation_key="hydrogen",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("h2_M1000"),
),
AirQEntityDescription(
key="h2o2",
name="Hydrogen peroxide",
translation_key="hydrogen_peroxide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("h2o2"),
),
AirQEntityDescription(
key="ch4_MIPEX",
name="Methane",
translation_key="methane",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ch4_MIPEX"),
),
AirQEntityDescription(
key="n2o",
name="N2O",
device_class=SensorDeviceClass.NITROUS_OXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -241,7 +238,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="no_M250",
name="NO",
device_class=SensorDeviceClass.NITROGEN_MONOXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -249,7 +245,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="no2",
name="NO2",
device_class=SensorDeviceClass.NITROGEN_DIOXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -257,14 +252,14 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="acid_M100",
name="Organic acid",
translation_key="organic_acid",
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("acid_M100"),
),
AirQEntityDescription(
key="oxygen",
name="Oxygen",
translation_key="oxygen",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("oxygen"),
@@ -272,7 +267,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="o3",
name="Ozone",
device_class=SensorDeviceClass.OZONE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -280,7 +274,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="performance",
name="Performance Index",
translation_key="performance_index",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:head-check",
@@ -288,14 +282,13 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="ph3",
name="PH3",
translation_key="hydrogen_phosphide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ph3"),
),
AirQEntityDescription(
key="pm1",
name="PM1",
device_class=SensorDeviceClass.PM1,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -304,7 +297,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pm2_5",
name="PM2.5",
device_class=SensorDeviceClass.PM25,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -313,7 +305,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pm10",
name="PM10",
device_class=SensorDeviceClass.PM10,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -322,7 +313,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pressure",
name="Pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
@@ -330,7 +320,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pressure_rel",
name="Relative pressure",
translation_key="relative_pressure",
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("pressure_rel"),
@@ -338,28 +328,27 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="c3h8_MIPEX",
name="Propane",
translation_key="propane",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("c3h8_MIPEX"),
),
AirQEntityDescription(
key="refigerant",
name="Refrigerant",
translation_key="refigerant",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("refigerant"),
),
AirQEntityDescription(
key="sih4",
name="SiH4",
translation_key="silicon_hydride",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("sih4"),
),
AirQEntityDescription(
key="so2",
name="SO2",
device_class=SensorDeviceClass.SULPHUR_DIOXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -367,7 +356,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="sound",
name="Noise",
translation_key="noise",
native_unit_of_measurement=UnitOfSoundPressure.WEIGHTED_DECIBEL_A,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("sound"),
@@ -375,7 +364,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="sound_max",
name="Noise (Maximum)",
translation_key="maximum_noise",
native_unit_of_measurement=UnitOfSoundPressure.WEIGHTED_DECIBEL_A,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("sound_max"),
@@ -383,7 +372,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="radon",
name="Radon",
translation_key="radon",
native_unit_of_measurement=ACTIVITY_BECQUEREL_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("radon"),
@@ -391,7 +380,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="temperature",
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
@@ -399,21 +387,22 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="tvoc",
name="VOC",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("tvoc"),
),
AirQEntityDescription(
key="tvoc_ionsc",
name="VOC (Industrial)",
translation_key="industrial_volatile_organic_compounds",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("tvoc_ionsc"),
),
AirQEntityDescription(
key="virus",
name="Virus Index",
translation_key="virus_index",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:virus-off",

View File

@@ -18,5 +18,117 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"entity": {
"sensor": {
"acetaldehyde": {
"name": "Acetaldehyde"
},
"ammonia": {
"name": "Ammonia"
},
"arsine": {
"name": "Arsine"
},
"bromine": {
"name": "Bromine"
},
"methanethiol": {
"name": "Methanethiol"
},
"chlorine": {
"name": "Chlorine"
},
"chlorine_dioxide": {
"name": "Chlorine dioxide"
},
"carbon_disulfide": {
"name": "Carbon disulfide"
},
"carbon_monoxide": {
"name": "[%key:component::sensor::entity_component::carbon_monoxide::name%]"
},
"dew_point": {
"name": "Dew point"
},
"ethanol": {
"name": "Ethanol"
},
"ethylene": {
"name": "Ethylene"
},
"formaldehyde": {
"name": "Formaldehyde"
},
"fluorine": {
"name": "Fluorine"
},
"hydrogen_sulfide": {
"name": "Hydrogen sulfide"
},
"hydrochloric_acid": {
"name": "Hydrochloric acid"
},
"hydrogen_cyanide": {
"name": "Hydrogen cyanide"
},
"hydrogen_fluoride": {
"name": "Hydrogen fluoride"
},
"health_index": {
"name": "Health Index"
},
"absolute_humidity": {
"name": "Absolute humidity"
},
"hydrogen": {
"name": "Hydrogen"
},
"hydrogen_peroxide": {
"name": "Hydrogen peroxide"
},
"methane": {
"name": "Methane"
},
"organic_acid": {
"name": "Organic acid"
},
"oxygen": {
"name": "Oxygen"
},
"performance_index": {
"name": "Performance Index"
},
"hydrogen_phosphide": {
"name": "Hydrogen Phosphide"
},
"relative_pressure": {
"name": "Relative pressure"
},
"propane": {
"name": "Propane"
},
"refigerant": {
"name": "Refrigerant"
},
"silicon_hydride": {
"name": "Silicon Hydride"
},
"noise": {
"name": "Noise"
},
"maximum_noise": {
"name": "Noise (Maximum)"
},
"radon": {
"name": "Radon"
},
"industrial_volatile_organic_compounds": {
"name": "VOCs (Industrial)"
},
"virus_index": {
"name": "Virus Index"
}
}
}
}

View File

@@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/airthings",
"iot_class": "cloud_polling",
"loggers": ["airthings"],
"requirements": ["airthings_cloud==0.1.0"]
"requirements": ["airthings-cloud==0.1.0"]
}

View File

@@ -35,62 +35,56 @@ SENSORS: dict[str, SensorEntityDescription] = {
"radonShortTermAvg": SensorEntityDescription(
key="radonShortTermAvg",
native_unit_of_measurement="Bq/m³",
name="Radon",
translation_key="radon",
),
"temp": SensorEntityDescription(
key="temp",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
name="Temperature",
),
"humidity": SensorEntityDescription(
key="humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
name="Humidity",
),
"pressure": SensorEntityDescription(
key="pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.MBAR,
name="Pressure",
),
"battery": SensorEntityDescription(
key="battery",
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=PERCENTAGE,
entity_category=EntityCategory.DIAGNOSTIC,
name="Battery",
),
"co2": SensorEntityDescription(
key="co2",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
name="CO2",
),
"voc": SensorEntityDescription(
key="voc",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
name="VOC",
),
"light": SensorEntityDescription(
key="light",
native_unit_of_measurement=PERCENTAGE,
name="Light",
translation_key="light",
),
"virusRisk": SensorEntityDescription(
key="virusRisk",
name="Virus Risk",
translation_key="virus_risk",
),
"mold": SensorEntityDescription(
key="mold",
name="Mold",
translation_key="mold",
),
"rssi": SensorEntityDescription(
key="rssi",
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS,
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
name="RSSI",
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
),
@@ -98,13 +92,11 @@ SENSORS: dict[str, SensorEntityDescription] = {
key="pm1",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
device_class=SensorDeviceClass.PM1,
name="PM1",
),
"pm25": SensorEntityDescription(
key="pm25",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
device_class=SensorDeviceClass.PM25,
name="PM25",
),
}
@@ -134,6 +126,7 @@ class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
"""Representation of a Airthings Sensor device."""
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_has_entity_name = True
def __init__(
self,
@@ -146,14 +139,17 @@ class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
self.entity_description = entity_description
self._attr_name = f"{airthings_device.name} {entity_description.name}"
self._attr_unique_id = f"{airthings_device.device_id}_{entity_description.key}"
self._id = airthings_device.device_id
self._attr_device_info = DeviceInfo(
configuration_url="https://dashboard.airthings.com/",
configuration_url=(
"https://dashboard.airthings.com/devices/"
f"{airthings_device.device_id}"
),
identifiers={(DOMAIN, airthings_device.device_id)},
name=airthings_device.name,
manufacturer="Airthings",
model=airthings_device.device_type.replace("_", " ").lower().title(),
)
@property

View File

@@ -17,5 +17,21 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
}
},
"entity": {
"sensor": {
"radon": {
"name": "Radon"
},
"light": {
"name": "Light"
},
"virus_risk": {
"name": "Virus Risk"
},
"mold": {
"name": "Mold"
}
}
}
}

View File

@@ -39,71 +39,71 @@ _LOGGER = logging.getLogger(__name__)
SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
"radon_1day_avg": SensorEntityDescription(
key="radon_1day_avg",
translation_key="radon_1day_avg",
native_unit_of_measurement=VOLUME_BECQUEREL,
name="Radon 1-day average",
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:radioactive",
),
"radon_longterm_avg": SensorEntityDescription(
key="radon_longterm_avg",
translation_key="radon_longterm_avg",
native_unit_of_measurement=VOLUME_BECQUEREL,
name="Radon longterm average",
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:radioactive",
),
"radon_1day_level": SensorEntityDescription(
key="radon_1day_level",
name="Radon 1-day level",
translation_key="radon_1day_level",
icon="mdi:radioactive",
),
"radon_longterm_level": SensorEntityDescription(
key="radon_longterm_level",
name="Radon longterm level",
translation_key="radon_longterm_level",
icon="mdi:radioactive",
),
"temperature": SensorEntityDescription(
key="temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
name="Temperature",
state_class=SensorStateClass.MEASUREMENT,
),
"humidity": SensorEntityDescription(
key="humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
name="Humidity",
state_class=SensorStateClass.MEASUREMENT,
),
"pressure": SensorEntityDescription(
key="pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.MBAR,
name="Pressure",
state_class=SensorStateClass.MEASUREMENT,
),
"battery": SensorEntityDescription(
key="battery",
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
name="Battery",
),
"co2": SensorEntityDescription(
key="co2",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
name="co2",
state_class=SensorStateClass.MEASUREMENT,
),
"voc": SensorEntityDescription(
key="voc",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS,
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
name="VOC",
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:cloud",
),
"illuminance": SensorEntityDescription(
key="illuminance",
device_class=SensorDeviceClass.ILLUMINANCE,
native_unit_of_measurement=LIGHT_LUX,
name="Illuminance",
state_class=SensorStateClass.MEASUREMENT,
),
}
@@ -150,7 +150,6 @@ class AirthingsSensor(
):
"""Airthings BLE sensors for the device."""
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_has_entity_name = True
def __init__(

View File

@@ -19,5 +19,21 @@
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
}
},
"entity": {
"sensor": {
"radon_1day_avg": {
"name": "Radon 1-day average"
},
"radon_longterm_avg": {
"name": "Radon longterm average"
},
"radon_1day_level": {
"name": "Radon 1-day level"
},
"radon_longterm_level": {
"name": "Radon longterm level"
}
}
}
}

View File

@@ -3,18 +3,26 @@ from __future__ import annotations
from typing import Any, Final
from aioairzone.common import OperationMode
from aioairzone.common import OperationAction, OperationMode
from aioairzone.const import (
API_COOL_SET_POINT,
API_HEAT_SET_POINT,
API_MODE,
API_ON,
API_SET_POINT,
AZD_DEMAND,
API_SPEED,
AZD_ACTION,
AZD_COOL_TEMP_SET,
AZD_DOUBLE_SET_POINT,
AZD_HEAT_TEMP_SET,
AZD_HUMIDITY,
AZD_MASTER,
AZD_MODE,
AZD_MODES,
AZD_NAME,
AZD_ON,
AZD_SPEED,
AZD_SPEEDS,
AZD_TEMP,
AZD_TEMP_MAX,
AZD_TEMP_MIN,
@@ -24,6 +32,12 @@ from aioairzone.const import (
)
from homeassistant.components.climate import (
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
FAN_AUTO,
FAN_HIGH,
FAN_LOW,
FAN_MEDIUM,
ClimateEntity,
ClimateEntityFeature,
HVACAction,
@@ -39,12 +53,29 @@ from .const import API_TEMPERATURE_STEP, DOMAIN, TEMP_UNIT_LIB_TO_HASS
from .coordinator import AirzoneUpdateCoordinator
from .entity import AirzoneZoneEntity
HVAC_ACTION_LIB_TO_HASS: Final[dict[OperationMode, HVACAction]] = {
OperationMode.STOP: HVACAction.OFF,
OperationMode.COOLING: HVACAction.COOLING,
OperationMode.HEATING: HVACAction.HEATING,
OperationMode.FAN: HVACAction.FAN,
OperationMode.DRY: HVACAction.DRYING,
BASE_FAN_SPEEDS: Final[dict[int, str]] = {
0: FAN_AUTO,
1: FAN_LOW,
}
FAN_SPEED_MAPS: Final[dict[int, dict[int, str]]] = {
2: BASE_FAN_SPEEDS
| {
2: FAN_HIGH,
},
3: BASE_FAN_SPEEDS
| {
2: FAN_MEDIUM,
3: FAN_HIGH,
},
}
HVAC_ACTION_LIB_TO_HASS: Final[dict[OperationAction, HVACAction]] = {
OperationAction.COOLING: HVACAction.COOLING,
OperationAction.DRYING: HVACAction.DRYING,
OperationAction.FAN: HVACAction.FAN,
OperationAction.HEATING: HVACAction.HEATING,
OperationAction.IDLE: HVACAction.IDLE,
OperationAction.OFF: HVACAction.OFF,
}
HVAC_MODE_LIB_TO_HASS: Final[dict[OperationMode, HVACMode]] = {
OperationMode.STOP: HVACMode.OFF,
@@ -83,6 +114,9 @@ async def async_setup_entry(
class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
"""Define an Airzone sensor."""
_speeds: dict[int, str] = {}
_speeds_reverse: dict[str, int] = {}
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
@@ -97,16 +131,45 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
self._attr_unique_id = f"{self._attr_unique_id}_{system_zone_id}"
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
self._attr_target_temperature_step = API_TEMPERATURE_STEP
self._attr_max_temp = self.get_airzone_value(AZD_TEMP_MAX)
self._attr_min_temp = self.get_airzone_value(AZD_TEMP_MIN)
self._attr_temperature_unit = TEMP_UNIT_LIB_TO_HASS[
self.get_airzone_value(AZD_TEMP_UNIT)
]
self._attr_hvac_modes = [
HVAC_MODE_LIB_TO_HASS[mode] for mode in self.get_airzone_value(AZD_MODES)
]
if (
self.get_airzone_value(AZD_SPEED) is not None
and self.get_airzone_value(AZD_SPEEDS) is not None
):
self._set_fan_speeds()
if self.get_airzone_value(AZD_DOUBLE_SET_POINT):
self._attr_supported_features |= (
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
)
self._async_update_attrs()
def _set_fan_speeds(self) -> None:
self._attr_supported_features |= ClimateEntityFeature.FAN_MODE
speeds = self.get_airzone_value(AZD_SPEEDS)
max_speed = max(speeds)
if _speeds := FAN_SPEED_MAPS.get(max_speed):
self._speeds = _speeds
else:
for speed in speeds:
if speed == 0:
self._speeds[speed] = FAN_AUTO
else:
self._speeds[speed] = f"{int(round((speed * 100) / max_speed, 0))}%"
self._speeds[1] = FAN_LOW
self._speeds[int(round((max_speed + 1) / 2, 0))] = FAN_MEDIUM
self._speeds[max_speed] = FAN_HIGH
self._speeds_reverse = {v: k for k, v in self._speeds.items()}
self._attr_fan_modes = list(self._speeds_reverse)
async def async_turn_on(self) -> None:
"""Turn the entity on."""
params = {
@@ -121,6 +184,13 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
}
await self._async_update_hvac_params(params)
async def async_set_fan_mode(self, fan_mode: str) -> None:
"""Set fan mode."""
params = {
API_SPEED: self._speeds_reverse.get(fan_mode),
}
await self._async_update_hvac_params(params)
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
"""Set hvac mode."""
params = {}
@@ -140,9 +210,12 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
params = {
API_SET_POINT: kwargs.get(ATTR_TEMPERATURE),
}
params = {}
if ATTR_TEMPERATURE in kwargs:
params[API_SET_POINT] = kwargs[ATTR_TEMPERATURE]
if ATTR_TARGET_TEMP_LOW in kwargs and ATTR_TARGET_TEMP_HIGH in kwargs:
params[API_COOL_SET_POINT] = kwargs[ATTR_TARGET_TEMP_LOW]
params[API_HEAT_SET_POINT] = kwargs[ATTR_TARGET_TEMP_HIGH]
await self._async_update_hvac_params(params)
@callback
@@ -156,14 +229,24 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
"""Update climate attributes."""
self._attr_current_temperature = self.get_airzone_value(AZD_TEMP)
self._attr_current_humidity = self.get_airzone_value(AZD_HUMIDITY)
self._attr_hvac_action = HVAC_ACTION_LIB_TO_HASS[
self.get_airzone_value(AZD_ACTION)
]
if self.get_airzone_value(AZD_ON):
mode = self.get_airzone_value(AZD_MODE)
self._attr_hvac_mode = HVAC_MODE_LIB_TO_HASS[mode]
if self.get_airzone_value(AZD_DEMAND):
self._attr_hvac_action = HVAC_ACTION_LIB_TO_HASS[mode]
else:
self._attr_hvac_action = HVACAction.IDLE
self._attr_hvac_mode = HVAC_MODE_LIB_TO_HASS[
self.get_airzone_value(AZD_MODE)
]
else:
self._attr_hvac_action = HVACAction.OFF
self._attr_hvac_mode = HVACMode.OFF
self._attr_max_temp = self.get_airzone_value(AZD_TEMP_MAX)
self._attr_min_temp = self.get_airzone_value(AZD_TEMP_MIN)
self._attr_target_temperature = self.get_airzone_value(AZD_TEMP_SET)
if self.supported_features & ClimateEntityFeature.FAN_MODE:
self._attr_fan_mode = self._speeds.get(self.get_airzone_value(AZD_SPEED))
if self.supported_features & ClimateEntityFeature.TARGET_TEMPERATURE_RANGE:
self._attr_target_temperature_high = self.get_airzone_value(
AZD_HEAT_TEMP_SET
)
self._attr_target_temperature_low = self.get_airzone_value(
AZD_COOL_TEMP_SET
)

View File

@@ -7,6 +7,7 @@ from typing import Any
from aioairzone.const import (
API_SYSTEM_ID,
API_ZONE_ID,
AZD_AVAILABLE,
AZD_FIRMWARE,
AZD_FULL_NAME,
AZD_ID,
@@ -66,6 +67,11 @@ class AirzoneSystemEntity(AirzoneEntity):
)
self._attr_unique_id = entry.unique_id or entry.entry_id
@property
def available(self) -> bool:
"""Return system availability."""
return super().available and self.get_airzone_value(AZD_AVAILABLE)
def get_airzone_value(self, key: str) -> Any:
"""Return system value by key."""
value = None
@@ -130,6 +136,11 @@ class AirzoneZoneEntity(AirzoneEntity):
)
self._attr_unique_id = entry.unique_id or entry.entry_id
@property
def available(self) -> bool:
"""Return zone availability."""
return super().available and self.get_airzone_value(AZD_AVAILABLE)
def get_airzone_value(self, key: str) -> Any:
"""Return zone value by key."""
value = None

View File

@@ -11,5 +11,5 @@
"documentation": "https://www.home-assistant.io/integrations/airzone",
"iot_class": "local_polling",
"loggers": ["aioairzone"],
"requirements": ["aioairzone==0.5.2"]
"requirements": ["aioairzone==0.6.4"]
}

View File

@@ -1,7 +1,7 @@
"""Support for the Airzone sensors."""
from __future__ import annotations
from dataclasses import dataclass, replace
from dataclasses import dataclass
from typing import Any, Final
from aioairzone.common import GrilleAngle, SleepTimeout
@@ -41,14 +41,14 @@ class AirzoneSelectDescription(SelectEntityDescription, AirzoneSelectDescription
GRILLE_ANGLE_DICT: Final[dict[str, int]] = {
"90º": GrilleAngle.DEG_90,
"50º": GrilleAngle.DEG_50,
"45º": GrilleAngle.DEG_45,
"40º": GrilleAngle.DEG_40,
"90deg": GrilleAngle.DEG_90,
"50deg": GrilleAngle.DEG_50,
"45deg": GrilleAngle.DEG_45,
"40deg": GrilleAngle.DEG_40,
}
SLEEP_DICT: Final[dict[str, int]] = {
"Off": SleepTimeout.SLEEP_OFF,
"off": SleepTimeout.SLEEP_OFF,
"30m": SleepTimeout.SLEEP_30,
"60m": SleepTimeout.SLEEP_60,
"90m": SleepTimeout.SLEEP_90,
@@ -61,21 +61,27 @@ ZONE_SELECT_TYPES: Final[tuple[AirzoneSelectDescription, ...]] = (
entity_category=EntityCategory.CONFIG,
key=AZD_COLD_ANGLE,
name="Cold Angle",
options=list(GRILLE_ANGLE_DICT),
options_dict=GRILLE_ANGLE_DICT,
translation_key="grille_angles",
),
AirzoneSelectDescription(
api_param=API_HEAT_ANGLE,
entity_category=EntityCategory.CONFIG,
key=AZD_HEAT_ANGLE,
name="Heat Angle",
options=list(GRILLE_ANGLE_DICT),
options_dict=GRILLE_ANGLE_DICT,
translation_key="grille_angles",
),
AirzoneSelectDescription(
api_param=API_SLEEP,
entity_category=EntityCategory.CONFIG,
key=AZD_SLEEP,
name="Sleep",
options=list(SLEEP_DICT),
options_dict=SLEEP_DICT,
translation_key="sleep_times",
),
)
@@ -91,14 +97,10 @@ async def async_setup_entry(
for system_zone_id, zone_data in coordinator.data[AZD_ZONES].items():
for description in ZONE_SELECT_TYPES:
if description.key in zone_data:
_desc = replace(
description,
options=list(description.options_dict.keys()),
)
entities.append(
AirzoneZoneSelect(
coordinator,
_desc,
description,
entry,
system_zone_id,
zone_data,

View File

@@ -23,5 +23,25 @@
}
}
}
},
"entity": {
"select": {
"grille_angles": {
"state": {
"90deg": "90°",
"50deg": "50°",
"45deg": "45°",
"40deg": "40°"
}
},
"sleep_times": {
"state": {
"off": "[%key:common::state::off%]",
"30m": "30 minutes",
"60m": "60 minutes",
"90m": "90 minutes"
}
}
}
}
}

View File

@@ -0,0 +1,51 @@
"""The Airzone Cloud integration."""
from __future__ import annotations
from aioairzone_cloud.cloudapi import AirzoneCloudApi
from aioairzone_cloud.common import ConnectionOptions
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ID, CONF_PASSWORD, CONF_USERNAME, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
PLATFORMS: list[Platform] = [
Platform.BINARY_SENSOR,
Platform.SENSOR,
]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Airzone Cloud from a config entry."""
options = ConnectionOptions(
entry.data[CONF_USERNAME],
entry.data[CONF_PASSWORD],
)
airzone = AirzoneCloudApi(aiohttp_client.async_get_clientsession(hass), options)
await airzone.login()
inst_list = await airzone.list_installations()
for inst in inst_list:
if inst.get_id() == entry.data[CONF_ID]:
airzone.select_installation(inst)
await airzone.update_installation(inst)
coordinator = AirzoneUpdateCoordinator(hass, airzone)
await coordinator.async_config_entry_first_refresh()
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
hass.data[DOMAIN].pop(entry.entry_id)
return unload_ok

View File

@@ -0,0 +1,108 @@
"""Support for the Airzone Cloud binary sensors."""
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 homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
BinarySensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneZoneEntity
@dataclass
class AirzoneBinarySensorEntityDescription(BinarySensorEntityDescription):
"""A class that describes Airzone Cloud binary sensor entities."""
attributes: dict[str, str] | None = None
ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]] = (
AirzoneBinarySensorEntityDescription(
attributes={
"warnings": AZD_WARNINGS,
},
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
key=AZD_PROBLEMS,
),
)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Add Airzone Cloud binary sensors from a config_entry."""
coordinator: AirzoneUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
binary_sensors: list[AirzoneBinarySensor] = []
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:
binary_sensors.append(
AirzoneZoneBinarySensor(
coordinator,
description,
entry,
zone_id,
zone_data,
)
)
async_add_entities(binary_sensors)
class AirzoneBinarySensor(AirzoneEntity, BinarySensorEntity):
"""Define an Airzone Cloud binary sensor."""
entity_description: AirzoneBinarySensorEntityDescription
@callback
def _handle_coordinator_update(self) -> None:
"""Update attributes when the coordinator updates."""
self._async_update_attrs()
super()._handle_coordinator_update()
@callback
def _async_update_attrs(self) -> None:
"""Update binary sensor attributes."""
self._attr_is_on = self.get_airzone_value(self.entity_description.key)
if self.entity_description.attributes:
self._attr_extra_state_attributes = {
key: self.get_airzone_value(val)
for key, val in self.entity_description.attributes.items()
}
class AirzoneZoneBinarySensor(AirzoneZoneEntity, AirzoneBinarySensor):
"""Define an Airzone Cloud Zone binary sensor."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: AirzoneBinarySensorEntityDescription,
entry: ConfigEntry,
zone_id: str,
zone_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, zone_id, zone_data)
self._attr_unique_id = f"{zone_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()

View File

@@ -0,0 +1,116 @@
"""Config flow for Airzone Cloud."""
from __future__ import annotations
from typing import Any
from aioairzone_cloud.cloudapi import AirzoneCloudApi
from aioairzone_cloud.common import ConnectionOptions
from aioairzone_cloud.const import AZD_ID, AZD_NAME, AZD_WEBSERVERS
from aioairzone_cloud.exceptions import AirzoneCloudError, LoginError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_ID, CONF_PASSWORD, CONF_USERNAME
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.selector import (
SelectOptionDict,
SelectSelector,
SelectSelectorConfig,
SelectSelectorMode,
)
from .const import DOMAIN
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle config flow for an Airzone Cloud device."""
airzone: AirzoneCloudApi
async def async_step_inst_pick(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the installation selection."""
errors = {}
options: dict[str, str] = {}
inst_desc = None
inst_id = None
if user_input is not None:
inst_id = user_input[CONF_ID]
try:
inst_list = await self.airzone.list_installations()
except AirzoneCloudError:
errors["base"] = "cannot_connect"
else:
for inst in inst_list:
_data = inst.data()
_id = _data[AZD_ID]
options[_id] = f"{_data[AZD_NAME]} {_data[AZD_WEBSERVERS][0]} ({_id})"
if _id is not None and _id == inst_id:
inst_desc = options[_id]
if user_input is not None and inst_desc is not None:
await self.async_set_unique_id(inst_id)
self._abort_if_unique_id_configured()
user_input[CONF_USERNAME] = self.airzone.options.username
user_input[CONF_PASSWORD] = self.airzone.options.password
return self.async_create_entry(title=inst_desc, data=user_input)
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{
vol.Required(CONF_ID): SelectSelector(
SelectSelectorConfig(
options=[
SelectOptionDict(value=k, label=v)
for k, v in options.items()
],
mode=SelectSelectorMode.DROPDOWN,
)
),
}
),
errors=errors,
)
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the initial step."""
errors = {}
if user_input is not None:
if CONF_ID in user_input:
return await self.async_step_inst_pick(user_input)
self.airzone = AirzoneCloudApi(
aiohttp_client.async_get_clientsession(self.hass),
ConnectionOptions(
user_input[CONF_USERNAME],
user_input[CONF_PASSWORD],
),
)
try:
await self.airzone.login()
except (AirzoneCloudError, LoginError):
errors["base"] = "cannot_connect"
else:
return await self.async_step_inst_pick()
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{
vol.Required(CONF_USERNAME): str,
vol.Required(CONF_PASSWORD): str,
}
),
errors=errors,
)

View File

@@ -0,0 +1,8 @@
"""Constants for the Airzone Cloud integration."""
from typing import Final
DOMAIN: Final[str] = "airzone_cloud"
MANUFACTURER: Final[str] = "Airzone"
AIOAIRZONE_CLOUD_TIMEOUT_SEC: Final[int] = 30

View File

@@ -0,0 +1,43 @@
"""The Airzone Cloud integration coordinator."""
from __future__ import annotations
from datetime import timedelta
import logging
from typing import Any
from aioairzone_cloud.cloudapi import AirzoneCloudApi
from aioairzone_cloud.exceptions import AirzoneCloudError
import async_timeout
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .const import AIOAIRZONE_CLOUD_TIMEOUT_SEC, DOMAIN
SCAN_INTERVAL = timedelta(seconds=60)
_LOGGER = logging.getLogger(__name__)
class AirzoneUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
"""Class to manage fetching data from the Airzone Cloud device."""
def __init__(self, hass: HomeAssistant, airzone: AirzoneCloudApi) -> None:
"""Initialize."""
self.airzone = airzone
super().__init__(
hass,
_LOGGER,
name=DOMAIN,
update_interval=SCAN_INTERVAL,
)
async def _async_update_data(self) -> dict[str, Any]:
"""Update data via library."""
async with async_timeout.timeout(AIOAIRZONE_CLOUD_TIMEOUT_SEC):
try:
await self.airzone.update()
except AirzoneCloudError as error:
raise UpdateFailed(error) from error
return self.airzone.data()

View File

@@ -0,0 +1,144 @@
"""Support for the Airzone Cloud diagnostics."""
from __future__ import annotations
from collections.abc import Mapping
from typing import Any
from aioairzone_cloud.const import (
API_CITY,
API_GROUP_ID,
API_LOCATION_ID,
API_OLD_ID,
API_PIN,
API_STAT_AP_MAC,
API_STAT_SSID,
API_USER_ID,
AZD_WIFI_MAC,
RAW_DEVICES_STATUS,
RAW_INSTALLATIONS,
RAW_WEBSERVERS,
)
from homeassistant.components.diagnostics.util import async_redact_data
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import HomeAssistant
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
TO_REDACT_API = [
API_CITY,
API_GROUP_ID,
API_LOCATION_ID,
API_OLD_ID,
API_PIN,
API_STAT_AP_MAC,
API_STAT_SSID,
API_USER_ID,
]
TO_REDACT_CONFIG = [
CONF_PASSWORD,
CONF_USERNAME,
]
TO_REDACT_COORD = [
AZD_WIFI_MAC,
]
def gather_ids(api_data: dict[str, Any]) -> dict[str, Any]:
"""Return dict with IDs."""
ids: dict[str, Any] = {}
dev_idx = 1
for dev_id in api_data[RAW_DEVICES_STATUS]:
if dev_id not in ids:
ids[dev_id] = f"device{dev_idx}"
dev_idx += 1
inst_idx = 1
for inst_id in api_data[RAW_INSTALLATIONS]:
if inst_id not in ids:
ids[inst_id] = f"installation{inst_idx}"
inst_idx += 1
ws_idx = 1
for ws_id in api_data[RAW_WEBSERVERS]:
if ws_id not in ids:
ids[ws_id] = f"webserver{ws_idx}"
ws_idx += 1
return ids
def redact_keys(data: Any, ids: dict[str, Any]) -> Any:
"""Redact sensitive keys in a dict."""
if not isinstance(data, (Mapping, list)):
return data
if isinstance(data, list):
return [redact_keys(val, ids) for val in data]
redacted = {**data}
keys = list(redacted)
for key in keys:
if key in ids:
redacted[ids[key]] = redacted.pop(key)
elif isinstance(redacted[key], Mapping):
redacted[key] = redact_keys(redacted[key], ids)
elif isinstance(redacted[key], list):
redacted[key] = [redact_keys(item, ids) for item in redacted[key]]
return redacted
def redact_values(data: Any, ids: dict[str, Any]) -> Any:
"""Redact sensitive values in a dict."""
if not isinstance(data, (Mapping, list)):
if data in ids:
return ids[data]
return data
if isinstance(data, list):
return [redact_values(val, ids) for val in data]
redacted = {**data}
for key, value in redacted.items():
if value is None:
continue
if isinstance(value, Mapping):
redacted[key] = redact_values(value, ids)
elif isinstance(value, list):
redacted[key] = [redact_values(item, ids) for item in value]
elif value in ids:
redacted[key] = ids[value]
return redacted
def redact_all(
data: dict[str, Any], ids: dict[str, Any], to_redact: list[str]
) -> dict[str, Any]:
"""Redact sensitive data."""
_data = redact_keys(data, ids)
_data = redact_values(_data, ids)
return async_redact_data(_data, to_redact)
async def async_get_config_entry_diagnostics(
hass: HomeAssistant, config_entry: ConfigEntry
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
coordinator: AirzoneUpdateCoordinator = hass.data[DOMAIN][config_entry.entry_id]
raw_data = coordinator.airzone.raw_data()
ids = gather_ids(raw_data)
return {
"api_data": redact_all(raw_data, ids, TO_REDACT_API),
"config_entry": redact_all(config_entry.as_dict(), ids, TO_REDACT_CONFIG),
"coord_data": redact_all(coordinator.data, ids, TO_REDACT_COORD),
}

View File

@@ -0,0 +1,129 @@
"""Entity classes for the Airzone Cloud integration."""
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any
from aioairzone_cloud.const import (
AZD_AIDOOS,
AZD_AVAILABLE,
AZD_FIRMWARE,
AZD_NAME,
AZD_SYSTEM_ID,
AZD_WEBSERVER,
AZD_WEBSERVERS,
AZD_ZONES,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN, MANUFACTURER
from .coordinator import AirzoneUpdateCoordinator
class AirzoneEntity(CoordinatorEntity[AirzoneUpdateCoordinator], ABC):
"""Define an Airzone Cloud entity."""
@property
def available(self) -> bool:
"""Return Airzone Cloud entity availability."""
return super().available and self.get_airzone_value(AZD_AVAILABLE)
@abstractmethod
def get_airzone_value(self, key: str) -> Any:
"""Return Airzone Cloud entity value by key."""
class AirzoneAidooEntity(AirzoneEntity):
"""Define an Airzone Cloud Aidoo entity."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
aidoo_id: str,
aidoo_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.aidoo_id = aidoo_id
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, aidoo_id)},
manufacturer=MANUFACTURER,
name=aidoo_data[AZD_NAME],
via_device=(DOMAIN, aidoo_data[AZD_WEBSERVER]),
)
def get_airzone_value(self, key: str) -> Any:
"""Return Aidoo value by key."""
value = None
if aidoo := self.coordinator.data[AZD_AIDOOS].get(self.aidoo_id):
value = aidoo.get(key)
return value
class AirzoneWebServerEntity(AirzoneEntity):
"""Define an Airzone Cloud WebServer entity."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
ws_id: str,
ws_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.ws_id = ws_id
self._attr_device_info = DeviceInfo(
connections={(dr.CONNECTION_NETWORK_MAC, ws_id)},
identifiers={(DOMAIN, ws_id)},
manufacturer=MANUFACTURER,
name=ws_data[AZD_NAME],
sw_version=ws_data[AZD_FIRMWARE],
)
def get_airzone_value(self, key: str) -> Any:
"""Return WebServer value by key."""
value = None
if webserver := self.coordinator.data[AZD_WEBSERVERS].get(self.ws_id):
value = webserver.get(key)
return value
class AirzoneZoneEntity(AirzoneEntity):
"""Define an Airzone Cloud Zone entity."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
zone_id: str,
zone_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.system_id = zone_data[AZD_SYSTEM_ID]
self.zone_id = zone_id
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, zone_id)},
manufacturer=MANUFACTURER,
name=zone_data[AZD_NAME],
via_device=(DOMAIN, self.system_id),
)
def get_airzone_value(self, key: str) -> Any:
"""Return zone value by key."""
value = None
if zone := self.coordinator.data[AZD_ZONES].get(self.zone_id):
value = zone.get(key)
return value

View File

@@ -0,0 +1,10 @@
{
"domain": "airzone_cloud",
"name": "Airzone Cloud",
"codeowners": ["@Noltari"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/airzone_cloud",
"iot_class": "cloud_polling",
"loggers": ["aioairzone_cloud"],
"requirements": ["aioairzone-cloud==0.1.9"]
}

View File

@@ -0,0 +1,204 @@
"""Support for the Airzone Cloud sensors."""
from __future__ import annotations
from typing import Any, Final
from aioairzone_cloud.const import (
AZD_AIDOOS,
AZD_HUMIDITY,
AZD_TEMP,
AZD_WEBSERVERS,
AZD_WIFI_RSSI,
AZD_ZONES,
)
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
EntityCategory,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
from .entity import (
AirzoneAidooEntity,
AirzoneEntity,
AirzoneWebServerEntity,
AirzoneZoneEntity,
)
AIDOO_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.TEMPERATURE,
key=AZD_TEMP,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
)
WEBSERVER_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
key=AZD_WIFI_RSSI,
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
state_class=SensorStateClass.MEASUREMENT,
),
)
ZONE_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.TEMPERATURE,
key=AZD_TEMP,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
device_class=SensorDeviceClass.HUMIDITY,
key=AZD_HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
),
)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Add Airzone Cloud sensors from a config_entry."""
coordinator: AirzoneUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
sensors: list[AirzoneSensor] = []
# Aidoos
for aidoo_id, aidoo_data in coordinator.data.get(AZD_AIDOOS, {}).items():
for description in AIDOO_SENSOR_TYPES:
if description.key in aidoo_data:
sensors.append(
AirzoneAidooSensor(
coordinator,
description,
entry,
aidoo_id,
aidoo_data,
)
)
# WebServers
for ws_id, ws_data in coordinator.data.get(AZD_WEBSERVERS, {}).items():
for description in WEBSERVER_SENSOR_TYPES:
if description.key in ws_data:
sensors.append(
AirzoneWebServerSensor(
coordinator,
description,
entry,
ws_id,
ws_data,
)
)
# Zones
for zone_id, zone_data in coordinator.data.get(AZD_ZONES, {}).items():
for description in ZONE_SENSOR_TYPES:
if description.key in zone_data:
sensors.append(
AirzoneZoneSensor(
coordinator,
description,
entry,
zone_id,
zone_data,
)
)
async_add_entities(sensors)
class AirzoneSensor(AirzoneEntity, SensorEntity):
"""Define an Airzone Cloud sensor."""
@callback
def _handle_coordinator_update(self) -> None:
"""Update attributes when the coordinator updates."""
self._async_update_attrs()
super()._handle_coordinator_update()
@callback
def _async_update_attrs(self) -> None:
"""Update sensor attributes."""
self._attr_native_value = self.get_airzone_value(self.entity_description.key)
class AirzoneAidooSensor(AirzoneAidooEntity, AirzoneSensor):
"""Define an Airzone Cloud Aidoo sensor."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
aidoo_id: str,
aidoo_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, aidoo_id, aidoo_data)
self._attr_has_entity_name = True
self._attr_unique_id = f"{aidoo_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()
class AirzoneWebServerSensor(AirzoneWebServerEntity, AirzoneSensor):
"""Define an Airzone Cloud WebServer sensor."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
ws_id: str,
ws_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, ws_id, ws_data)
self._attr_has_entity_name = True
self._attr_unique_id = f"{ws_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()
class AirzoneZoneSensor(AirzoneZoneEntity, AirzoneSensor):
"""Define an Airzone Cloud Zone sensor."""
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
zone_id: str,
zone_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, zone_id, zone_data)
self._attr_has_entity_name = True
self._attr_unique_id = f"{zone_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()

View File

@@ -0,0 +1,19 @@
{
"config": {
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
},
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
},
"step": {
"user": {
"data": {
"id": "Installation",
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
}
}
}

View File

@@ -40,26 +40,24 @@ class AladdinDevice(CoverEntity):
_attr_device_class = CoverDeviceClass.GARAGE
_attr_supported_features = SUPPORTED_FEATURES
_attr_has_entity_name = True
_attr_name = None
def __init__(
self, acc: AladdinConnectClient, device: DoorDevice, entry: ConfigEntry
) -> None:
"""Initialize the Aladdin Connect cover."""
self._acc = acc
self._entry_id = entry.entry_id
self._device_id = device["device_id"]
self._number = device["door_number"]
self._name = device["name"]
self._serial = device["serial"]
self._model = device["model"]
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, f"{self._device_id}-{self._number}")},
name=self._name,
name=device["name"],
manufacturer="Overhead Door",
model=self._model,
model=device["model"],
)
self._attr_has_entity_name = True
self._attr_unique_id = f"{self._device_id}-{self._number}"
async def async_added_to_hass(self) -> None:
@@ -89,15 +87,9 @@ class AladdinDevice(CoverEntity):
await self._acc.get_doors(self._serial)
self._attr_available = True
except session_manager.ConnectionError:
except (session_manager.ConnectionError, session_manager.InvalidPasswordError):
self._attr_available = False
except session_manager.InvalidPasswordError:
self._attr_available = False
await self.hass.async_create_task(
self.hass.config_entries.async_reload(self._entry_id)
)
@property
def is_closed(self) -> bool | None:
"""Update is closed attribute."""

View File

@@ -40,7 +40,6 @@ class AccSensorEntityDescription(
SENSORS: tuple[AccSensorEntityDescription, ...] = (
AccSensorEntityDescription(
key="battery_level",
name="Battery level",
device_class=SensorDeviceClass.BATTERY,
entity_registry_enabled_default=False,
native_unit_of_measurement=PERCENTAGE,
@@ -49,7 +48,7 @@ SENSORS: tuple[AccSensorEntityDescription, ...] = (
),
AccSensorEntityDescription(
key="rssi",
name="Wi-Fi RSSI",
translation_key="wifi_strength",
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
entity_registry_enabled_default=False,
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS,
@@ -58,7 +57,7 @@ SENSORS: tuple[AccSensorEntityDescription, ...] = (
),
AccSensorEntityDescription(
key="ble_strength",
name="BLE Strength",
translation_key="ble_strength",
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
entity_registry_enabled_default=False,
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS,
@@ -89,8 +88,8 @@ async def async_setup_entry(
class AladdinConnectSensor(SensorEntity):
"""A sensor implementation for Aladdin Connect devices."""
_device: AladdinConnectSensor
entity_description: AccSensorEntityDescription
_attr_has_entity_name = True
def __init__(
self,
@@ -101,24 +100,20 @@ class AladdinConnectSensor(SensorEntity):
"""Initialize a sensor for an Aladdin Connect device."""
self._device_id = device["device_id"]
self._number = device["door_number"]
self._name = device["name"]
self._model = device["model"]
self._acc = acc
self.entity_description = description
self._attr_unique_id = f"{self._device_id}-{self._number}-{description.key}"
self._attr_has_entity_name = True
if self._model == "01" and description.key in ("battery_level", "ble_strength"):
self._attr_entity_registry_enabled_default = True
@property
def device_info(self) -> DeviceInfo | None:
"""Device information for Aladdin Connect sensors."""
return DeviceInfo(
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, f"{self._device_id}-{self._number}")},
name=self._name,
name=device["name"],
manufacturer="Overhead Door",
model=self._model,
model=device["model"],
)
if device["model"] == "01" and description.key in (
"battery_level",
"ble_strength",
):
self._attr_entity_registry_enabled_default = True
@property
def native_value(self) -> float | None:

View File

@@ -25,5 +25,15 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
}
},
"entity": {
"sensor": {
"wifi_strength": {
"name": "Wi-Fi RSSI"
},
"ble_strength": {
"name": "BLE Strength"
}
}
}
}

View File

@@ -5,6 +5,7 @@ from typing import Final
import voluptuous as vol
from homeassistant.components.device_automation import async_validate_entity_schema
from homeassistant.const import (
ATTR_CODE,
ATTR_ENTITY_ID,
@@ -44,15 +45,22 @@ ACTION_TYPES: Final[set[str]] = {
"trigger",
}
ACTION_SCHEMA: Final = cv.DEVICE_ACTION_BASE_SCHEMA.extend(
_ACTION_SCHEMA: Final = cv.DEVICE_ACTION_BASE_SCHEMA.extend(
{
vol.Required(CONF_TYPE): vol.In(ACTION_TYPES),
vol.Required(CONF_ENTITY_ID): cv.entity_domain(DOMAIN),
vol.Required(CONF_ENTITY_ID): cv.entity_id_or_uuid,
vol.Optional(CONF_CODE): cv.string,
}
)
async def async_validate_action_config(
hass: HomeAssistant, config: ConfigType
) -> ConfigType:
"""Validate config."""
return async_validate_entity_schema(hass, config, _ACTION_SCHEMA)
async def async_get_actions(
hass: HomeAssistant, device_id: str
) -> list[dict[str, str]]:
@@ -70,7 +78,7 @@ async def async_get_actions(
base_action: dict = {
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_ENTITY_ID: entry.id,
}
# Add actions for each entity that belongs to this integration
@@ -124,7 +132,9 @@ async def async_get_action_capabilities(
"""List action capabilities."""
# We need to refer to the state directly because ATTR_CODE_ARM_REQUIRED is not a
# capability attribute
state = hass.states.get(config[CONF_ENTITY_ID])
registry = er.async_get(hass)
entity_id = er.async_resolve_entity_id(registry, config[CONF_ENTITY_ID])
state = hass.states.get(entity_id) if entity_id else None
code_required = state.attributes.get(ATTR_CODE_ARM_REQUIRED) if state else False
if config[CONF_TYPE] == "trigger" or (

View File

@@ -46,7 +46,7 @@ TRIGGER_TYPES: Final[set[str]] = BASIC_TRIGGER_TYPES | {
TRIGGER_SCHEMA: Final = DEVICE_TRIGGER_BASE_SCHEMA.extend(
{
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(CONF_ENTITY_ID): cv.entity_id_or_uuid,
vol.Required(CONF_TYPE): vol.In(TRIGGER_TYPES),
vol.Optional(CONF_FOR): cv.positive_time_period_dict,
}
@@ -72,7 +72,7 @@ async def async_get_triggers(
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_ENTITY_ID: entry.id,
}
triggers += [

View File

@@ -62,5 +62,11 @@
}
}
}
},
"issues": {
"platform_integration_no_support": {
"title": "[%key:common::issues::platform_integration_no_support_title%]",
"description": "[%key:common::issues::platform_integration_no_support_description%]"
}
}
}

View File

@@ -12,7 +12,7 @@ from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET
from homeassistant.core import callback
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.storage import Store
from homeassistant.util import dt
from homeassistant.util import dt as dt_util
_LOGGER = logging.getLogger(__name__)
@@ -95,12 +95,12 @@ class Auth:
if not self._prefs[STORAGE_ACCESS_TOKEN]:
return False
expire_time = dt.parse_datetime(self._prefs[STORAGE_EXPIRE_TIME])
expire_time = dt_util.parse_datetime(self._prefs[STORAGE_EXPIRE_TIME])
preemptive_expire_time = expire_time - timedelta(
seconds=PREEMPTIVE_REFRESH_TTL_IN_SECONDS
)
return dt.utcnow() < preemptive_expire_time
return dt_util.utcnow() < preemptive_expire_time
async def _async_request_new_token(self, lwa_params):
try:
@@ -130,7 +130,7 @@ class Auth:
access_token = response_json["access_token"]
refresh_token = response_json["refresh_token"]
expires_in = response_json["expires_in"]
expire_time = dt.utcnow() + timedelta(seconds=expires_in)
expire_time = dt_util.utcnow() + timedelta(seconds=expires_in)
await self._async_update_preferences(
access_token, refresh_token, expire_time.isoformat()

View File

@@ -1,9 +1,11 @@
"""Config helpers for Alexa."""
from __future__ import annotations
from abc import ABC, abstractmethod
import asyncio
import logging
from homeassistant.core import CALLBACK_TYPE, callback
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
from homeassistant.helpers.storage import Store
from .const import DOMAIN
@@ -17,14 +19,15 @@ _LOGGER = logging.getLogger(__name__)
class AbstractConfig(ABC):
"""Hold the configuration for Alexa."""
_unsub_proactive_report: asyncio.Task[CALLBACK_TYPE] | None = None
_store: AlexaConfigStore
_unsub_proactive_report: CALLBACK_TYPE | None = None
def __init__(self, hass):
def __init__(self, hass: HomeAssistant) -> None:
"""Initialize abstract config."""
self.hass = hass
self._store = None
self._enable_proactive_mode_lock = asyncio.Lock()
async def async_initialize(self):
async def async_initialize(self) -> None:
"""Perform async initialization of config."""
self._store = AlexaConfigStore(self.hass)
await self._store.async_load()
@@ -64,23 +67,20 @@ class AbstractConfig(ABC):
def user_identifier(self):
"""Return an identifier for the user that represents this config."""
async def async_enable_proactive_mode(self):
async def async_enable_proactive_mode(self) -> None:
"""Enable proactive mode."""
_LOGGER.debug("Enable proactive mode")
if self._unsub_proactive_report is None:
self._unsub_proactive_report = self.hass.async_create_task(
async_enable_proactive_mode(self.hass, self)
async with self._enable_proactive_mode_lock:
if self._unsub_proactive_report is not None:
return
self._unsub_proactive_report = await async_enable_proactive_mode(
self.hass, self
)
try:
await self._unsub_proactive_report
except Exception:
self._unsub_proactive_report = None
raise
async def async_disable_proactive_mode(self):
async def async_disable_proactive_mode(self) -> None:
"""Disable proactive mode."""
_LOGGER.debug("Disable proactive mode")
if unsub_func := await self._unsub_proactive_report:
if unsub_func := self._unsub_proactive_report:
unsub_func()
self._unsub_proactive_report = None
@@ -107,7 +107,7 @@ class AbstractConfig(ABC):
"""Return authorization status."""
return self._store.authorized
async def set_authorized(self, authorized):
async def set_authorized(self, authorized) -> None:
"""Set authorization status.
- Set when an incoming message is received from Alexa.

View File

@@ -1,6 +1,7 @@
"""Support for Alexa skill service end point."""
import enum
import logging
from typing import Any
from homeassistant.components import http
from homeassistant.core import callback
@@ -180,12 +181,15 @@ async def async_handle_intent(hass, message):
return alexa_response.as_dict()
def resolve_slot_synonyms(key, request):
def resolve_slot_data(key: str, request: dict[str, Any]) -> dict[str, str]:
"""Check slot request for synonym resolutions."""
# Default to the spoken slot value if more than one or none are found. For
# Default to the spoken slot value if more than one or none are found. Always
# passes the id and name of the nearest possible slot resolution. For
# reference to the request object structure, see the Alexa docs:
# https://tinyurl.com/ybvm7jhs
resolved_value = request["value"]
resolved_data = {}
resolved_data["value"] = request["value"]
resolved_data["id"] = ""
if (
"resolutions" in request
@@ -200,20 +204,26 @@ def resolve_slot_synonyms(key, request):
if entry["status"]["code"] != SYN_RESOLUTION_MATCH:
continue
possible_values.extend([item["value"]["name"] for item in entry["values"]])
possible_values.extend([item["value"] for item in entry["values"]])
# Always set id if available, otherwise an empty string is used as id
if len(possible_values) >= 1:
# Set ID if available
if "id" in possible_values[0]:
resolved_data["id"] = possible_values[0]["id"]
# If there is only one match use the resolved value, otherwise the
# resolution cannot be determined, so use the spoken slot value
# resolution cannot be determined, so use the spoken slot value and empty string as id
if len(possible_values) == 1:
resolved_value = possible_values[0]
resolved_data["value"] = possible_values[0]["name"]
else:
_LOGGER.debug(
"Found multiple synonym resolutions for slot value: {%s: %s}",
key,
resolved_value,
resolved_data["value"],
)
return resolved_value
return resolved_data
class AlexaResponse:
@@ -237,8 +247,10 @@ class AlexaResponse:
continue
_key = key.replace(".", "_")
_slot_data = resolve_slot_data(key, value)
self.variables[_key] = resolve_slot_synonyms(key, value)
self.variables[_key] = _slot_data["value"]
self.variables[_key + "_Id"] = _slot_data["id"]
def add_card(self, card_type, title, content):
"""Add a card to the response."""

View File

@@ -5,7 +5,7 @@ import asyncio
from http import HTTPStatus
import json
import logging
from typing import cast
from typing import TYPE_CHECKING, cast
import aiohttp
import async_timeout
@@ -23,6 +23,9 @@ from .entities import ENTITY_ADAPTERS, AlexaEntity, generate_alexa_id
from .errors import NoTokenAvailable, RequireRelink
from .messages import AlexaResponse
if TYPE_CHECKING:
from .config import AbstractConfig
_LOGGER = logging.getLogger(__name__)
DEFAULT_TIMEOUT = 10
@@ -188,7 +191,9 @@ async def async_send_changereport_message(
)
async def async_send_add_or_update_message(hass, config, entity_ids):
async def async_send_add_or_update_message(
hass: HomeAssistant, config: AbstractConfig, entity_ids: list[str]
) -> aiohttp.ClientResponse:
"""Send an AddOrUpdateReport message for entities.
https://developer.amazon.com/docs/device-apis/alexa-discovery.html#add-or-update-report
@@ -223,7 +228,9 @@ async def async_send_add_or_update_message(hass, config, entity_ids):
)
async def async_send_delete_message(hass, config, entity_ids):
async def async_send_delete_message(
hass: HomeAssistant, config: AbstractConfig, entity_ids: list[str]
) -> aiohttp.ClientResponse:
"""Send an DeleteReport message for entities.
https://developer.amazon.com/docs/device-apis/alexa-discovery.html#deletereport-event

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/alpha_vantage",
"iot_class": "cloud_polling",
"loggers": ["alpha_vantage"],
"requirements": ["alpha_vantage==2.3.1"]
"requirements": ["alpha-vantage==2.3.1"]
}

View File

@@ -167,12 +167,9 @@ class AmazonPollyProvider(Provider):
self,
message: str,
language: str,
options: dict[str, Any] | None = None,
options: dict[str, Any],
) -> TtsAudioType:
"""Request TTS file from Polly."""
if options is None or language is None:
_LOGGER.debug("language and/or options were missing")
return None, None
voice_id = options.get(CONF_VOICE, self.default_voice)
voice_in_dict = self.all_voices[voice_id]
if language != voice_in_dict.get("LanguageCode"):

View File

@@ -98,7 +98,7 @@ async def async_setup_entry(
tasks = []
for heater in data_connection.get_devices():
tasks.append(heater.update_device_info())
tasks.append(asyncio.create_task(heater.update_device_info()))
await asyncio.wait(tasks)
devs = []

View File

@@ -7,5 +7,5 @@
"documentation": "https://www.home-assistant.io/integrations/ambiclimate",
"iot_class": "cloud_polling",
"loggers": ["ambiclimate"],
"requirements": ["ambiclimate==0.2.1"]
"requirements": ["Ambiclimate==0.2.1"]
}

View File

@@ -3,6 +3,8 @@ from __future__ import annotations
import logging
from homeassistant.helpers.typing import UndefinedType
from .const import DOMAIN
@@ -14,7 +16,7 @@ def service_signal(service: str, *args: str) -> str:
def log_update_error(
logger: logging.Logger,
action: str,
name: str | None,
name: str | UndefinedType | None,
entity_type: str,
error: Exception,
level: int = logging.ERROR,

View File

@@ -6,12 +6,15 @@ import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.const import EVENT_HOMEASSISTANT_STARTED
from homeassistant.core import Event, HassJob, HomeAssistant, callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import async_call_later, async_track_time_interval
from homeassistant.helpers.typing import ConfigType
from .analytics import Analytics
from .const import ATTR_ONBOARDED, ATTR_PREFERENCES, DOMAIN, INTERVAL, PREFERENCE_SCHEMA
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
async def async_setup(hass: HomeAssistant, _: ConfigType) -> bool:
"""Set up the analytics integration."""

View File

@@ -1,6 +1,8 @@
"""The Android TV Remote integration."""
from __future__ import annotations
import logging
from androidtvremote2 import (
AndroidTVRemote,
CannotConnect,
@@ -9,20 +11,37 @@ from androidtvremote2 import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, EVENT_HOMEASSISTANT_STOP, Platform
from homeassistant.const import CONF_HOST, CONF_NAME, EVENT_HOMEASSISTANT_STOP, Platform
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from .const import DOMAIN
from .helpers import create_api
PLATFORMS: list[Platform] = [Platform.REMOTE]
_LOGGER = logging.getLogger(__name__)
PLATFORMS: list[Platform] = [Platform.MEDIA_PLAYER, Platform.REMOTE]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Android TV Remote from a config entry."""
api = create_api(hass, entry.data[CONF_HOST])
@callback
def is_available_updated(is_available: bool) -> None:
if is_available:
_LOGGER.info(
"Reconnected to %s at %s", entry.data[CONF_NAME], entry.data[CONF_HOST]
)
else:
_LOGGER.warning(
"Disconnected from %s at %s",
entry.data[CONF_NAME],
entry.data[CONF_HOST],
)
api.add_is_available_updated_callback(is_available_updated)
try:
await api.async_connect()
except InvalidAuth as exc:

View File

@@ -135,7 +135,8 @@ class AndroidTVRemoteConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self.host = discovery_info.host
self.name = discovery_info.name.removesuffix("._androidtvremote2._tcp.local.")
self.mac = discovery_info.properties.get("bt")
assert self.mac
if not self.mac:
return self.async_abort(reason="cannot_connect")
await self.async_set_unique_id(format_mac(self.mac))
self._abort_if_unique_id_configured(
updates={CONF_HOST: self.host, CONF_NAME: self.name}

View File

@@ -0,0 +1,84 @@
"""Base entity for Android TV Remote."""
from __future__ import annotations
from androidtvremote2 import AndroidTVRemote, ConnectionClosed
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.entity import DeviceInfo, Entity
from .const import DOMAIN
class AndroidTVRemoteBaseEntity(Entity):
"""Android TV Remote Base Entity."""
_attr_has_entity_name = True
_attr_should_poll = False
def __init__(self, api: AndroidTVRemote, config_entry: ConfigEntry) -> None:
"""Initialize the entity."""
self._api = api
self._host = config_entry.data[CONF_HOST]
self._name = config_entry.data[CONF_NAME]
self._attr_unique_id = config_entry.unique_id
self._attr_is_on = api.is_on
device_info = api.device_info
assert config_entry.unique_id
assert device_info
self._attr_device_info = DeviceInfo(
connections={(CONNECTION_NETWORK_MAC, config_entry.data[CONF_MAC])},
identifiers={(DOMAIN, config_entry.unique_id)},
name=self._name,
manufacturer=device_info["manufacturer"],
model=device_info["model"],
)
@callback
def _is_available_updated(self, is_available: bool) -> None:
"""Update the state when the device is ready to receive commands or is unavailable."""
self._attr_available = is_available
self.async_write_ha_state()
@callback
def _is_on_updated(self, is_on: bool) -> None:
"""Update the state when device turns on or off."""
self._attr_is_on = is_on
self.async_write_ha_state()
async def async_added_to_hass(self) -> None:
"""Register callbacks."""
self._api.add_is_available_updated_callback(self._is_available_updated)
self._api.add_is_on_updated_callback(self._is_on_updated)
async def async_will_remove_from_hass(self) -> None:
"""Remove callbacks."""
self._api.remove_is_available_updated_callback(self._is_available_updated)
self._api.remove_is_on_updated_callback(self._is_on_updated)
def _send_key_command(self, key_code: str, direction: str = "SHORT") -> None:
"""Send a key press to Android TV.
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
"""
try:
self._api.send_key_command(key_code, direction)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc
def _send_launch_app_command(self, app_link: str) -> None:
"""Launch an app on Android TV.
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
"""
try:
self._api.send_launch_app_command(app_link)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc

View File

@@ -1,13 +1,13 @@
{
"domain": "androidtv_remote",
"name": "Android TV Remote",
"codeowners": ["@tronikos"],
"codeowners": ["@tronikos", "@Drafteed"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/androidtv_remote",
"integration_type": "device",
"iot_class": "local_push",
"loggers": ["androidtvremote2"],
"quality_scale": "platinum",
"requirements": ["androidtvremote2==0.0.7"],
"requirements": ["androidtvremote2==0.0.9"],
"zeroconf": ["_androidtvremote2._tcp.local."]
}

View File

@@ -0,0 +1,198 @@
"""Media player support for Android TV Remote."""
from __future__ import annotations
import asyncio
from typing import Any
from androidtvremote2 import AndroidTVRemote, ConnectionClosed
from homeassistant.components.media_player import (
MediaPlayerDeviceClass,
MediaPlayerEntity,
MediaPlayerEntityFeature,
MediaPlayerState,
MediaType,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .entity import AndroidTVRemoteBaseEntity
PARALLEL_UPDATES = 0
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the Android TV media player entity based on a config entry."""
api: AndroidTVRemote = hass.data[DOMAIN][config_entry.entry_id]
async_add_entities([AndroidTVRemoteMediaPlayerEntity(api, config_entry)])
class AndroidTVRemoteMediaPlayerEntity(AndroidTVRemoteBaseEntity, MediaPlayerEntity):
"""Android TV Remote Media Player Entity."""
_attr_assumed_state = True
_attr_device_class = MediaPlayerDeviceClass.TV
_attr_supported_features = (
MediaPlayerEntityFeature.PAUSE
| MediaPlayerEntityFeature.VOLUME_STEP
| MediaPlayerEntityFeature.VOLUME_MUTE
| MediaPlayerEntityFeature.PREVIOUS_TRACK
| MediaPlayerEntityFeature.NEXT_TRACK
| MediaPlayerEntityFeature.TURN_ON
| MediaPlayerEntityFeature.TURN_OFF
| MediaPlayerEntityFeature.PLAY
| MediaPlayerEntityFeature.STOP
| MediaPlayerEntityFeature.PLAY_MEDIA
)
def __init__(self, api: AndroidTVRemote, config_entry: ConfigEntry) -> None:
"""Initialize the entity."""
super().__init__(api, config_entry)
# This task is needed to create a job that sends a key press
# sequence that can be canceled if concurrency occurs
self._channel_set_task: asyncio.Task | None = None
def _update_current_app(self, current_app: str) -> None:
"""Update current app info."""
self._attr_app_id = current_app
self._attr_app_name = current_app
def _update_volume_info(self, volume_info: dict[str, str | bool]) -> None:
"""Update volume info."""
if volume_info.get("max"):
self._attr_volume_level = int(volume_info["level"]) / int(
volume_info["max"]
)
self._attr_is_volume_muted = bool(volume_info["muted"])
else:
self._attr_volume_level = None
self._attr_is_volume_muted = None
@callback
def _current_app_updated(self, current_app: str) -> None:
"""Update the state when the current app changes."""
self._update_current_app(current_app)
self.async_write_ha_state()
@callback
def _volume_info_updated(self, volume_info: dict[str, str | bool]) -> None:
"""Update the state when the volume info changes."""
self._update_volume_info(volume_info)
self.async_write_ha_state()
async def async_added_to_hass(self) -> None:
"""Register callbacks."""
await super().async_added_to_hass()
self._update_current_app(self._api.current_app)
self._update_volume_info(self._api.volume_info)
self._api.add_current_app_updated_callback(self._current_app_updated)
self._api.add_volume_info_updated_callback(self._volume_info_updated)
async def async_will_remove_from_hass(self) -> None:
"""Remove callbacks."""
await super().async_will_remove_from_hass()
self._api.remove_current_app_updated_callback(self._current_app_updated)
self._api.remove_volume_info_updated_callback(self._volume_info_updated)
@property
def state(self) -> MediaPlayerState:
"""Return the state of the device."""
if self._attr_is_on:
return MediaPlayerState.ON
return MediaPlayerState.OFF
async def async_turn_on(self) -> None:
"""Turn the Android TV on."""
if not self._attr_is_on:
self._send_key_command("POWER")
async def async_turn_off(self) -> None:
"""Turn the Android TV off."""
if self._attr_is_on:
self._send_key_command("POWER")
async def async_volume_up(self) -> None:
"""Turn volume up for media player."""
self._send_key_command("VOLUME_UP")
async def async_volume_down(self) -> None:
"""Turn volume down for media player."""
self._send_key_command("VOLUME_DOWN")
async def async_mute_volume(self, mute: bool) -> None:
"""Mute the volume."""
if mute != self.is_volume_muted:
self._send_key_command("VOLUME_MUTE")
async def async_media_play(self) -> None:
"""Send play command."""
self._send_key_command("MEDIA_PLAY")
async def async_media_pause(self) -> None:
"""Send pause command."""
self._send_key_command("MEDIA_PAUSE")
async def async_media_play_pause(self) -> None:
"""Send play/pause command."""
self._send_key_command("MEDIA_PLAY_PAUSE")
async def async_media_stop(self) -> None:
"""Send stop command."""
self._send_key_command("MEDIA_STOP")
async def async_media_previous_track(self) -> None:
"""Send previous track command."""
self._send_key_command("MEDIA_PREVIOUS")
async def async_media_next_track(self) -> None:
"""Send next track command."""
self._send_key_command("MEDIA_NEXT")
async def async_play_media(
self, media_type: MediaType | str, media_id: str, **kwargs: Any
) -> None:
"""Play a piece of media."""
if media_type == MediaType.CHANNEL:
if not media_id.isnumeric():
raise ValueError(f"Channel must be numeric: {media_id}")
if self._channel_set_task:
self._channel_set_task.cancel()
self._channel_set_task = asyncio.create_task(
self._send_key_commands(list(media_id))
)
await self._channel_set_task
return
if media_type == MediaType.URL:
self._send_launch_app_command(media_id)
return
raise ValueError(f"Invalid media type: {media_type}")
async def _send_key_commands(
self, key_codes: list[str], delay_secs: float = 0.1
) -> None:
"""Send a key press sequence to Android TV.
The delay is necessary because device may ignore
some commands if we send the sequence without delay.
"""
try:
for key_code in key_codes:
self._api.send_key_command(key_code)
await asyncio.sleep(delay_secs)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc

View File

@@ -3,10 +3,9 @@ from __future__ import annotations
import asyncio
from collections.abc import Iterable
import logging
from typing import Any
from androidtvremote2 import AndroidTVRemote, ConnectionClosed
from androidtvremote2 import AndroidTVRemote
from homeassistant.components.remote import (
ATTR_ACTIVITY,
@@ -20,17 +19,13 @@ from homeassistant.components.remote import (
RemoteEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .entity import AndroidTVRemoteBaseEntity
PARALLEL_UPDATES = 0
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
@@ -43,62 +38,29 @@ async def async_setup_entry(
async_add_entities([AndroidTVRemoteEntity(api, config_entry)])
class AndroidTVRemoteEntity(RemoteEntity):
"""Representation of an Android TV Remote."""
class AndroidTVRemoteEntity(AndroidTVRemoteBaseEntity, RemoteEntity):
"""Android TV Remote Entity."""
_attr_has_entity_name = True
_attr_should_poll = False
_attr_supported_features = RemoteEntityFeature.ACTIVITY
def __init__(self, api: AndroidTVRemote, config_entry: ConfigEntry) -> None:
"""Initialize device."""
self._api = api
self._host = config_entry.data[CONF_HOST]
self._name = config_entry.data[CONF_NAME]
self._attr_unique_id = config_entry.unique_id
self._attr_supported_features = RemoteEntityFeature.ACTIVITY
self._attr_is_on = api.is_on
self._attr_current_activity = api.current_app
device_info = api.device_info
assert config_entry.unique_id
assert device_info
self._attr_device_info = DeviceInfo(
connections={(CONNECTION_NETWORK_MAC, config_entry.data[CONF_MAC])},
identifiers={(DOMAIN, config_entry.unique_id)},
name=self._name,
manufacturer=device_info["manufacturer"],
model=device_info["model"],
)
@callback
def _current_app_updated(self, current_app: str) -> None:
"""Update the state when the current app changes."""
self._attr_current_activity = current_app
self.async_write_ha_state()
@callback
def is_on_updated(is_on: bool) -> None:
self._attr_is_on = is_on
self.async_write_ha_state()
async def async_added_to_hass(self) -> None:
"""Register callbacks."""
await super().async_added_to_hass()
@callback
def current_app_updated(current_app: str) -> None:
self._attr_current_activity = current_app
self.async_write_ha_state()
self._attr_current_activity = self._api.current_app
self._api.add_current_app_updated_callback(self._current_app_updated)
@callback
def is_available_updated(is_available: bool) -> None:
if is_available:
_LOGGER.info(
"Reconnected to %s at %s",
self._name,
self._host,
)
else:
_LOGGER.warning(
"Disconnected from %s at %s",
self._name,
self._host,
)
self._attr_available = is_available
self.async_write_ha_state()
async def async_will_remove_from_hass(self) -> None:
"""Remove callbacks."""
await super().async_will_remove_from_hass()
api.add_is_on_updated_callback(is_on_updated)
api.add_current_app_updated_callback(current_app_updated)
api.add_is_available_updated_callback(is_available_updated)
self._api.remove_current_app_updated_callback(self._current_app_updated)
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the Android TV on."""
@@ -128,27 +90,3 @@ class AndroidTVRemoteEntity(RemoteEntity):
else:
self._send_key_command(single_command, "SHORT")
await asyncio.sleep(delay_secs)
def _send_key_command(self, key_code: str, direction: str = "SHORT") -> None:
"""Send a key press to Android TV.
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
"""
try:
self._api.send_key_command(key_code, direction)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc
def _send_launch_app_command(self, app_link: str) -> None:
"""Launch an app on Android TV.
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
"""
try:
self._api.send_launch_app_command(app_link)
except ConnectionClosed as exc:
raise HomeAssistantError(
"Connection to Android TV device is closed"
) from exc

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/anel_pwrctrl",
"iot_class": "local_polling",
"loggers": ["anel_pwrctrl"],
"requirements": ["anel_pwrctrl-homeassistant==0.0.1.dev2"]
"requirements": ["anel-pwrctrl-homeassistant==0.0.1.dev2"]
}

View File

@@ -3,13 +3,7 @@ from __future__ import annotations
import logging
from anova_wifi import (
AnovaApi,
AnovaPrecisionCooker,
AnovaPrecisionCookerSensor,
InvalidLogin,
NoDevicesFound,
)
from anova_wifi import AnovaApi, AnovaPrecisionCooker, InvalidLogin, NoDevicesFound
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform
@@ -67,9 +61,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
coordinators = [AnovaCoordinator(hass, device) for device in devices]
for coordinator in coordinators:
await coordinator.async_config_entry_first_refresh()
firmware_version = coordinator.data["sensors"][
AnovaPrecisionCookerSensor.FIRMWARE_VERSION
]
firmware_version = coordinator.data.sensor.firmware_version
coordinator.async_setup(str(firmware_version))
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = AnovaData(
api_jwt=api.jwt, precision_cookers=devices, coordinators=coordinators

View File

@@ -2,7 +2,7 @@
from datetime import timedelta
import logging
from anova_wifi import AnovaOffline, AnovaPrecisionCooker
from anova_wifi import AnovaOffline, AnovaPrecisionCooker, APCUpdate
import async_timeout
from homeassistant.core import HomeAssistant, callback
@@ -14,11 +14,9 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
class AnovaCoordinator(DataUpdateCoordinator):
class AnovaCoordinator(DataUpdateCoordinator[APCUpdate]):
"""Anova custom coordinator."""
data: dict[str, dict[str, str | int | float]]
def __init__(
self,
hass: HomeAssistant,
@@ -47,7 +45,7 @@ class AnovaCoordinator(DataUpdateCoordinator):
sw_version=firmware_version,
)
async def _async_update_data(self) -> dict[str, dict[str, str | int | float]]:
async def _async_update_data(self) -> APCUpdate:
try:
async with async_timeout.timeout(5):
return await self.anova_device.update()

View File

@@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/anova",
"iot_class": "cloud_polling",
"loggers": ["anova_wifi"],
"requirements": ["anova-wifi==0.8.0"]
"requirements": ["anova-wifi==0.10.0"]
}

View File

@@ -1,7 +1,10 @@
"""Support for Anova Sensors."""
from __future__ import annotations
from anova_wifi import AnovaPrecisionCookerSensor
from collections.abc import Callable
from dataclasses import dataclass
from anova_wifi import APCUpdateSensor
from homeassistant import config_entries
from homeassistant.components.sensor import (
@@ -19,57 +22,80 @@ from .const import DOMAIN
from .entity import AnovaDescriptionEntity
from .models import AnovaData
@dataclass
class AnovaSensorEntityDescriptionMixin:
"""Describes the mixin variables for anova sensors."""
value_fn: Callable[[APCUpdateSensor], float | int | str]
@dataclass
class AnovaSensorEntityDescription(
SensorEntityDescription, AnovaSensorEntityDescriptionMixin
):
"""Describes a Anova sensor."""
SENSOR_DESCRIPTIONS: list[SensorEntityDescription] = [
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.COOK_TIME,
AnovaSensorEntityDescription(
key="cook_time",
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfTime.SECONDS,
icon="mdi:clock-outline",
translation_key="cook_time",
device_class=SensorDeviceClass.DURATION,
value_fn=lambda data: data.cook_time,
),
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.STATE, translation_key="state"
AnovaSensorEntityDescription(
key="state", translation_key="state", value_fn=lambda data: data.state
),
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.MODE, translation_key="mode"
AnovaSensorEntityDescription(
key="mode", translation_key="mode", value_fn=lambda data: data.mode
),
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.TARGET_TEMPERATURE,
AnovaSensorEntityDescription(
key="target_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:thermometer",
translation_key="target_temperature",
value_fn=lambda data: data.target_temperature,
),
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.COOK_TIME_REMAINING,
AnovaSensorEntityDescription(
key="cook_time_remaining",
native_unit_of_measurement=UnitOfTime.SECONDS,
icon="mdi:clock-outline",
translation_key="cook_time_remaining",
device_class=SensorDeviceClass.DURATION,
value_fn=lambda data: data.cook_time_remaining,
),
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.HEATER_TEMPERATURE,
AnovaSensorEntityDescription(
key="heater_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:thermometer",
translation_key="heater_temperature",
value_fn=lambda data: data.heater_temperature,
),
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.TRIAC_TEMPERATURE,
AnovaSensorEntityDescription(
key="triac_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:thermometer",
translation_key="triac_temperature",
value_fn=lambda data: data.triac_temperature,
),
SensorEntityDescription(
key=AnovaPrecisionCookerSensor.WATER_TEMPERATURE,
AnovaSensorEntityDescription(
key="water_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:thermometer",
translation_key="water_temperature",
value_fn=lambda data: data.water_temperature,
),
]
@@ -91,7 +117,9 @@ async def async_setup_entry(
class AnovaSensor(AnovaDescriptionEntity, SensorEntity):
"""A sensor using Anova coordinator."""
entity_description: AnovaSensorEntityDescription
@property
def native_value(self) -> StateType:
"""Return the state."""
return self.coordinator.data["sensors"][self.entity_description.key]
return self.entity_description.value_fn(self.coordinator.data.sensor)

View File

@@ -17,7 +17,7 @@
"error": {
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"unknown": "[%key:common::config_flow::error::unknown%]",
"no_devices_found": "No devices were found. Make sure you have at least one Anova device online"
"no_devices_found": "No devices were found. Make sure you have at least one Anova device online."
}
},
"entity": {

View File

@@ -3,8 +3,6 @@ from __future__ import annotations
import logging
from apcaccess.status import ALL_UNITS
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
@@ -379,7 +377,6 @@ SENSORS: dict[str, SensorEntityDescription] = {
key="stesti",
name="UPS Self Test Interval",
icon="mdi:information-outline",
state_class=SensorStateClass.TOTAL_INCREASING,
),
"timeleft": SensorEntityDescription(
key="timeleft",
@@ -427,18 +424,26 @@ SENSORS: dict[str, SensorEntityDescription] = {
),
}
SPECIFIC_UNITS = {"ITEMP": UnitOfTemperature.CELSIUS}
INFERRED_UNITS = {
" Minutes": UnitOfTime.MINUTES,
" Seconds": UnitOfTime.SECONDS,
" Percent": PERCENTAGE,
" Volts": UnitOfElectricPotential.VOLT,
" Ampere": UnitOfElectricCurrent.AMPERE,
" Amps": UnitOfElectricCurrent.AMPERE,
" Volt-Ampere": UnitOfApparentPower.VOLT_AMPERE,
" VA": UnitOfApparentPower.VOLT_AMPERE,
" Watts": UnitOfPower.WATT,
" Hz": UnitOfFrequency.HERTZ,
" C": UnitOfTemperature.CELSIUS,
# APCUPSd reports data for "itemp" field (eventually represented by UPS Internal
# Temperature sensor in this integration) with a trailing "Internal", e.g.,
# "34.6 C Internal". Here we create a fake unit " C Internal" to handle this case.
" C Internal": UnitOfTemperature.CELSIUS,
" Percent Load Capacity": PERCENTAGE,
# "stesti" field (Self Test Interval) field could report a "days" unit, e.g.,
# "7 days", so here we add support for it.
" days": UnitOfTime.DAYS,
}
@@ -466,15 +471,16 @@ async def async_setup_entry(
def infer_unit(value: str) -> tuple[str, str | None]:
"""If the value ends with any of the units from ALL_UNITS.
"""If the value ends with any of the units from supported units.
Split the unit off the end of the value and return the value, unit tuple
pair. Else return the original value and None as the unit.
"""
for unit in ALL_UNITS:
for unit, ha_unit in INFERRED_UNITS.items():
if value.endswith(unit):
return value.removesuffix(unit), INFERRED_UNITS.get(unit, unit.strip())
return value.removesuffix(unit), ha_unit
return value, None

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