From f325122da5ee9a54f54cba84adec1a1880a8c26b Mon Sep 17 00:00:00 2001 From: uvjustin <46082645+uvjustin@users.noreply.github.com> Date: Fri, 4 Aug 2023 18:54:54 +0800 Subject: [PATCH 01/36] Raise PlatformNotReady on initial OwnTone connection failure (#97257) --- .../components/forked_daapd/__init__.py | 5 +++-- .../components/forked_daapd/media_player.py | 6 ++++-- .../forked_daapd/test_config_flow.py | 19 ++++++++++++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/forked_daapd/__init__.py b/homeassistant/components/forked_daapd/__init__.py index 14f40db2057..9dfb92c60c8 100644 --- a/homeassistant/components/forked_daapd/__init__.py +++ b/homeassistant/components/forked_daapd/__init__.py @@ -18,9 +18,10 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Remove forked-daapd component.""" status = await hass.config_entries.async_unload_platforms(entry, PLATFORMS) if status and hass.data.get(DOMAIN) and hass.data[DOMAIN].get(entry.entry_id): - hass.data[DOMAIN][entry.entry_id][ + if websocket_handler := hass.data[DOMAIN][entry.entry_id][ HASS_DATA_UPDATER_KEY - ].websocket_handler.cancel() + ].websocket_handler: + websocket_handler.cancel() for remove_listener in hass.data[DOMAIN][entry.entry_id][ HASS_DATA_REMOVE_LISTENERS_KEY ]: diff --git a/homeassistant/components/forked_daapd/media_player.py b/homeassistant/components/forked_daapd/media_player.py index e1f1ece055b..868ec8e1f9e 100644 --- a/homeassistant/components/forked_daapd/media_player.py +++ b/homeassistant/components/forked_daapd/media_player.py @@ -31,6 +31,7 @@ from homeassistant.components.spotify import ( from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT from homeassistant.core import HomeAssistant, callback +from homeassistant.exceptions import PlatformNotReady from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, @@ -127,10 +128,10 @@ async def async_setup_entry( forked_daapd_updater = ForkedDaapdUpdater( hass, forked_daapd_api, config_entry.entry_id ) - await forked_daapd_updater.async_init() hass.data[DOMAIN][config_entry.entry_id][ HASS_DATA_UPDATER_KEY ] = forked_daapd_updater + await forked_daapd_updater.async_init() async def update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None: @@ -914,7 +915,8 @@ class ForkedDaapdUpdater: async def async_init(self): """Perform async portion of class initialization.""" - server_config = await self._api.get_request("config") + if not (server_config := await self._api.get_request("config")): + raise PlatformNotReady if websocket_port := server_config.get("websocket_port"): self.websocket_handler = asyncio.create_task( self._api.start_websocket_handler( diff --git a/tests/components/forked_daapd/test_config_flow.py b/tests/components/forked_daapd/test_config_flow.py index 81357b6f3eb..fc02cdb4123 100644 --- a/tests/components/forked_daapd/test_config_flow.py +++ b/tests/components/forked_daapd/test_config_flow.py @@ -1,5 +1,5 @@ """The config flow tests for the forked_daapd media player platform.""" -from unittest.mock import AsyncMock, patch +from unittest.mock import AsyncMock, MagicMock, patch import pytest @@ -12,9 +12,11 @@ from homeassistant.components.forked_daapd.const import ( CONF_TTS_VOLUME, DOMAIN, ) +from homeassistant.components.forked_daapd.media_player import async_setup_entry from homeassistant.config_entries import SOURCE_USER, SOURCE_ZEROCONF from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT from homeassistant.core import HomeAssistant +from homeassistant.exceptions import PlatformNotReady from tests.common import MockConfigEntry @@ -242,3 +244,18 @@ async def test_options_flow(hass: HomeAssistant, config_entry) -> None: }, ) assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY + + +async def test_async_setup_entry_not_ready(hass: HomeAssistant, config_entry) -> None: + """Test that a PlatformNotReady exception is thrown during platform setup.""" + + with patch( + "homeassistant.components.forked_daapd.media_player.ForkedDaapdAPI", + autospec=True, + ) as mock_api: + mock_api.return_value.get_request.return_value = None + config_entry.add_to_hass(hass) + with pytest.raises(PlatformNotReady): + await async_setup_entry(hass, config_entry, MagicMock()) + await hass.async_block_till_done() + mock_api.return_value.get_request.assert_called_once() From 77eec53f63949a6ebaa7db643d60bbbf9095c954 Mon Sep 17 00:00:00 2001 From: Matthieu Barthelemy Date: Fri, 4 Aug 2023 11:50:03 +0200 Subject: [PATCH 02/36] Add overkiz battery sensor level medium (#97472) --- homeassistant/components/overkiz/sensor.py | 2 +- homeassistant/components/overkiz/strings.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/overkiz/sensor.py b/homeassistant/components/overkiz/sensor.py index c841e3b0e36..b5296d772df 100644 --- a/homeassistant/components/overkiz/sensor.py +++ b/homeassistant/components/overkiz/sensor.py @@ -67,7 +67,7 @@ SENSOR_DESCRIPTIONS: list[OverkizSensorDescription] = [ entity_category=EntityCategory.DIAGNOSTIC, icon="mdi:battery", device_class=SensorDeviceClass.ENUM, - options=["full", "normal", "low", "verylow"], + options=["full", "normal", "medium", "low", "verylow"], translation_key="battery", ), OverkizSensorDescription( diff --git a/homeassistant/components/overkiz/strings.json b/homeassistant/components/overkiz/strings.json index c4daf32499a..bcf1e121f6f 100644 --- a/homeassistant/components/overkiz/strings.json +++ b/homeassistant/components/overkiz/strings.json @@ -77,6 +77,7 @@ "full": "Full", "low": "Low", "normal": "Normal", + "medium": "Medium", "verylow": "Very low" } }, From 21f878bfa4c608bdba7f7dfc265f0f8190b5cb65 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Thu, 3 Aug 2023 21:20:40 +0200 Subject: [PATCH 03/36] Fix ZHA `turn_on` issues with `transition=0`, improve tests (#97539) * Fix turn_on ignoring transition=0 and brightness=None, add test This fixes light.turn_on for ZHA lights ignoring a transition of 0 when no brightness is given at the same time. It also adds a test for that case. Fixes https://github.com/home-assistant/core/issues/93265 * Add test for "force on" lights This test checks that "force on" lights also get an "on" command (in addition to the "move to level" command) when turn_on is called with only transition=0. * Fix "on" command sent for transition=0 calls, fix FORCE_ON missing for transition=0 This fixes an issue where the "on" command is sent in addition to a "move_to_level_with_on_off" command, even though the latter one is enough (for non-FORCE_ON lights). It also fixes the test to not expect the unnecessary "on" command (in addition to the expected "move_to_level_with_on_off" command). The `brightness != 0` change is needed to fix an issue where FORCE_ON lights did not get the required "on" command (in addition to "move_to_level_with_on_off") if turn_on was called with only transition=0. (It could have been `brightness not None`, but that would also send an "on" command if turn_on is called with brightness=0 which HA somewhat "supports". The brightness != 0 check avoids that issue.) * Improve comments in ZHA light class --- homeassistant/components/zha/light.py | 12 ++-- tests/components/zha/test_light.py | 85 +++++++++++++++++++++++---- 2 files changed, 80 insertions(+), 17 deletions(-) diff --git a/homeassistant/components/zha/light.py b/homeassistant/components/zha/light.py index 9e71691aaa5..73955614c07 100644 --- a/homeassistant/components/zha/light.py +++ b/homeassistant/components/zha/light.py @@ -329,7 +329,7 @@ class BaseLight(LogMixin, light.LightEntity): return if ( - (brightness is not None or transition) + (brightness is not None or transition is not None) and not new_color_provided_while_off and brightness_supported(self._attr_supported_color_modes) ): @@ -350,11 +350,11 @@ class BaseLight(LogMixin, light.LightEntity): self._attr_brightness = level if ( - brightness is None + (brightness is None and transition is None) and not new_color_provided_while_off - or (self._FORCE_ON and brightness) + or (self._FORCE_ON and brightness != 0) ): - # since some lights don't always turn on with move_to_level_with_on_off, + # since FORCE_ON lights don't turn on with move_to_level_with_on_off, # we should call the on command on the on_off cluster # if brightness is not 0. result = await self._on_off_cluster_handler.on() @@ -385,7 +385,7 @@ class BaseLight(LogMixin, light.LightEntity): return if new_color_provided_while_off: - # The light is has the correct color, so we can now transition + # The light has the correct color, so we can now transition # it to the correct brightness level. result = await self._level_cluster_handler.move_to_level( level=level, transition_time=int(10 * duration) @@ -1076,7 +1076,7 @@ class HueLight(Light): manufacturers={"Jasco", "Quotra-Vision", "eWeLight", "eWeLink"}, ) class ForceOnLight(Light): - """Representation of a light which does not respect move_to_level_with_on_off.""" + """Representation of a light which does not respect on/off for move_to_level_with_on_off commands.""" _attr_name: str = "Light" _FORCE_ON = True diff --git a/tests/components/zha/test_light.py b/tests/components/zha/test_light.py index 3abfd0e4f9c..c1f5cf04e35 100644 --- a/tests/components/zha/test_light.py +++ b/tests/components/zha/test_light.py @@ -530,7 +530,78 @@ async def test_transitions( light2_state = hass.states.get(device_2_entity_id) assert light2_state.state == STATE_OFF - # first test 0 length transition with no color provided + # first test 0 length transition with no color and no brightness provided + dev1_cluster_on_off.request.reset_mock() + dev1_cluster_level.request.reset_mock() + await hass.services.async_call( + LIGHT_DOMAIN, + "turn_on", + {"entity_id": device_1_entity_id, "transition": 0}, + blocking=True, + ) + assert dev1_cluster_on_off.request.call_count == 0 + assert dev1_cluster_on_off.request.await_count == 0 + assert dev1_cluster_color.request.call_count == 0 + assert dev1_cluster_color.request.await_count == 0 + assert dev1_cluster_level.request.call_count == 1 + assert dev1_cluster_level.request.await_count == 1 + assert dev1_cluster_level.request.call_args == call( + False, + dev1_cluster_level.commands_by_name["move_to_level_with_on_off"].id, + dev1_cluster_level.commands_by_name["move_to_level_with_on_off"].schema, + level=254, # default "full on" brightness + transition_time=0, + expect_reply=True, + manufacturer=None, + tsn=None, + ) + + light1_state = hass.states.get(device_1_entity_id) + assert light1_state.state == STATE_ON + assert light1_state.attributes["brightness"] == 254 + + # test 0 length transition with no color and no brightness provided again, but for "force on" lights + eWeLink_cluster_on_off.request.reset_mock() + eWeLink_cluster_level.request.reset_mock() + await hass.services.async_call( + LIGHT_DOMAIN, + "turn_on", + {"entity_id": eWeLink_light_entity_id, "transition": 0}, + blocking=True, + ) + assert eWeLink_cluster_on_off.request.call_count == 1 + assert eWeLink_cluster_on_off.request.await_count == 1 + assert eWeLink_cluster_on_off.request.call_args_list[0] == call( + False, + eWeLink_cluster_on_off.commands_by_name["on"].id, + eWeLink_cluster_on_off.commands_by_name["on"].schema, + expect_reply=True, + manufacturer=None, + tsn=None, + ) + assert eWeLink_cluster_color.request.call_count == 0 + assert eWeLink_cluster_color.request.await_count == 0 + assert eWeLink_cluster_level.request.call_count == 1 + assert eWeLink_cluster_level.request.await_count == 1 + assert eWeLink_cluster_level.request.call_args == call( + False, + eWeLink_cluster_level.commands_by_name["move_to_level_with_on_off"].id, + eWeLink_cluster_level.commands_by_name["move_to_level_with_on_off"].schema, + level=254, # default "full on" brightness + transition_time=0, + expect_reply=True, + manufacturer=None, + tsn=None, + ) + + eWeLink_state = hass.states.get(eWeLink_light_entity_id) + assert eWeLink_state.state == STATE_ON + assert eWeLink_state.attributes["brightness"] == 254 + + eWeLink_cluster_on_off.request.reset_mock() + eWeLink_cluster_level.request.reset_mock() + + # test 0 length transition with brightness, but no color provided dev1_cluster_on_off.request.reset_mock() dev1_cluster_level.request.reset_mock() await hass.services.async_call( @@ -1423,18 +1494,10 @@ async def async_test_level_on_off_from_hass( {"entity_id": entity_id, "transition": 10}, blocking=True, ) - assert on_off_cluster.request.call_count == 1 - assert on_off_cluster.request.await_count == 1 + assert on_off_cluster.request.call_count == 0 + assert on_off_cluster.request.await_count == 0 assert level_cluster.request.call_count == 1 assert level_cluster.request.await_count == 1 - assert on_off_cluster.request.call_args == call( - False, - on_off_cluster.commands_by_name["on"].id, - on_off_cluster.commands_by_name["on"].schema, - expect_reply=True, - manufacturer=None, - tsn=None, - ) assert level_cluster.request.call_args == call( False, level_cluster.commands_by_name["move_to_level_with_on_off"].id, From b6671385bcffa771941346e6994e4c4c68dba4ed Mon Sep 17 00:00:00 2001 From: Maikel Punie Date: Wed, 2 Aug 2023 08:23:37 +0200 Subject: [PATCH 04/36] Bump pyDuotecno to 2023.8.1 (#97583) --- homeassistant/components/duotecno/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/duotecno/manifest.json b/homeassistant/components/duotecno/manifest.json index ae82574146e..c0bd29547c5 100644 --- a/homeassistant/components/duotecno/manifest.json +++ b/homeassistant/components/duotecno/manifest.json @@ -5,5 +5,5 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/duotecno", "iot_class": "local_push", - "requirements": ["pyduotecno==2023.8.0"] + "requirements": ["pyduotecno==2023.8.1"] } diff --git a/requirements_all.txt b/requirements_all.txt index 28140477411..4d18091e019 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1650,7 +1650,7 @@ pydrawise==2023.7.1 pydroid-ipcam==2.0.0 # homeassistant.components.duotecno -pyduotecno==2023.8.0 +pyduotecno==2023.8.1 # homeassistant.components.ebox pyebox==1.1.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 03dc3bbf994..59a8a20f185 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1223,7 +1223,7 @@ pydiscovergy==2.0.1 pydroid-ipcam==2.0.0 # homeassistant.components.duotecno -pyduotecno==2023.8.0 +pyduotecno==2023.8.1 # homeassistant.components.econet pyeconet==0.1.20 From 20bddec328861915beca056a2863cd049af7a524 Mon Sep 17 00:00:00 2001 From: Blastoise186 <40033667+blastoise186@users.noreply.github.com> Date: Thu, 3 Aug 2023 20:36:12 +0100 Subject: [PATCH 05/36] Bump Cryptography to 41.0.3 for a second security fix (#97611) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston --- homeassistant/package_constraints.txt | 2 +- pyproject.toml | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 7401c747890..615e5fa9444 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -15,7 +15,7 @@ bluetooth-auto-recovery==1.2.1 bluetooth-data-tools==1.6.1 certifi>=2021.5.30 ciso8601==2.3.0 -cryptography==41.0.2 +cryptography==41.0.3 dbus-fast==1.87.5 fnv-hash-fast==0.4.0 ha-av==10.1.1 diff --git a/pyproject.toml b/pyproject.toml index 26a9525a176..e4e8fab4b15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ "lru-dict==1.2.0", "PyJWT==2.8.0", # PyJWT has loose dependency. We want the latest one. - "cryptography==41.0.2", + "cryptography==41.0.3", # pyOpenSSL 23.2.0 is required to work with cryptography 41+ "pyOpenSSL==23.2.0", "orjson==3.9.2", diff --git a/requirements.txt b/requirements.txt index 9f5023c9a1c..4106a8515d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ ifaddr==0.2.0 Jinja2==3.1.2 lru-dict==1.2.0 PyJWT==2.8.0 -cryptography==41.0.2 +cryptography==41.0.3 pyOpenSSL==23.2.0 orjson==3.9.2 pip>=21.3.1 From c5747dffbc55f4aa65fcfea373d4f8e44a75c059 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 4 Aug 2023 08:45:36 +0200 Subject: [PATCH 06/36] Waqi State unknown if value is string (#97617) --- homeassistant/components/waqi/sensor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/waqi/sensor.py b/homeassistant/components/waqi/sensor.py index e91e3da5aa5..ae4e46c2a0b 100644 --- a/homeassistant/components/waqi/sensor.py +++ b/homeassistant/components/waqi/sensor.py @@ -2,6 +2,7 @@ from __future__ import annotations import asyncio +from contextlib import suppress from datetime import timedelta import logging @@ -141,8 +142,9 @@ class WaqiSensor(SensorEntity): @property def native_value(self): """Return the state of the device.""" - if self._data is not None: - return self._data.get("aqi") + if value := self._data.get("aqi"): + with suppress(ValueError): + return float(value) return None @property From 72533ad292f8387b886f359119369dc662af66a9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Aug 2023 01:33:05 -1000 Subject: [PATCH 07/36] Bump dbus-fast to 1.90.1 (#97619) * Bump dbus-fast to 1.88.0 - cython 3 fixes - performance improvements changelog: https://github.com/Bluetooth-Devices/dbus-fast/compare/v1.87.5...v1.88.0 * one more * Bump dbus-fast to 1.90.0 * bump again for yet another round of cython3 fixes --- homeassistant/components/bluetooth/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/bluetooth/manifest.json b/homeassistant/components/bluetooth/manifest.json index bc07e2b94ae..67c27f014d1 100644 --- a/homeassistant/components/bluetooth/manifest.json +++ b/homeassistant/components/bluetooth/manifest.json @@ -19,6 +19,6 @@ "bluetooth-adapters==0.16.0", "bluetooth-auto-recovery==1.2.1", "bluetooth-data-tools==1.6.1", - "dbus-fast==1.87.5" + "dbus-fast==1.90.1" ] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 615e5fa9444..618b284a619 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -16,7 +16,7 @@ bluetooth-data-tools==1.6.1 certifi>=2021.5.30 ciso8601==2.3.0 cryptography==41.0.3 -dbus-fast==1.87.5 +dbus-fast==1.90.1 fnv-hash-fast==0.4.0 ha-av==10.1.1 hass-nabucasa==0.69.0 diff --git a/requirements_all.txt b/requirements_all.txt index 4d18091e019..f656ca2bba9 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -632,7 +632,7 @@ datadog==0.15.0 datapoint==0.9.8 # homeassistant.components.bluetooth -dbus-fast==1.87.5 +dbus-fast==1.90.1 # homeassistant.components.debugpy debugpy==1.6.7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 59a8a20f185..89496b540c0 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -515,7 +515,7 @@ datadog==0.15.0 datapoint==0.9.8 # homeassistant.components.bluetooth -dbus-fast==1.87.5 +dbus-fast==1.90.1 # homeassistant.components.debugpy debugpy==1.6.7 From 62421d9ec3e50eefb288a9a4c348d0e4ef204e31 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 3 Aug 2023 06:15:20 -0400 Subject: [PATCH 08/36] Bump python-roborock to 0.31.1 (#97632) bump to 0.31.1 --- homeassistant/components/roborock/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/roborock/manifest.json b/homeassistant/components/roborock/manifest.json index d26116a7818..eda6a5609a2 100644 --- a/homeassistant/components/roborock/manifest.json +++ b/homeassistant/components/roborock/manifest.json @@ -6,5 +6,5 @@ "documentation": "https://www.home-assistant.io/integrations/roborock", "iot_class": "local_polling", "loggers": ["roborock"], - "requirements": ["python-roborock==0.30.2"] + "requirements": ["python-roborock==0.31.1"] } diff --git a/requirements_all.txt b/requirements_all.txt index f656ca2bba9..2a2f0d1aa20 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2150,7 +2150,7 @@ python-qbittorrent==0.4.3 python-ripple-api==0.0.3 # homeassistant.components.roborock -python-roborock==0.30.2 +python-roborock==0.31.1 # homeassistant.components.smarttub python-smarttub==0.0.33 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 89496b540c0..de45c832370 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1579,7 +1579,7 @@ python-picnic-api==1.1.0 python-qbittorrent==0.4.3 # homeassistant.components.roborock -python-roborock==0.30.2 +python-roborock==0.31.1 # homeassistant.components.smarttub python-smarttub==0.0.33 From 455ac084ece466eb657c0a745883b8e46033a0b1 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 2 Aug 2023 19:01:30 -0500 Subject: [PATCH 09/36] Bump intents to 2023.8.2 (#97636) --- homeassistant/components/conversation/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/conversation/snapshots/test_init.ambr | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/conversation/manifest.json b/homeassistant/components/conversation/manifest.json index 1eb58e96ff9..9e0909b6dfc 100644 --- a/homeassistant/components/conversation/manifest.json +++ b/homeassistant/components/conversation/manifest.json @@ -7,5 +7,5 @@ "integration_type": "system", "iot_class": "local_push", "quality_scale": "internal", - "requirements": ["hassil==1.2.5", "home-assistant-intents==2023.7.25"] + "requirements": ["hassil==1.2.5", "home-assistant-intents==2023.8.2"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 618b284a619..6564dfb3a0d 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -23,7 +23,7 @@ hass-nabucasa==0.69.0 hassil==1.2.5 home-assistant-bluetooth==1.10.2 home-assistant-frontend==20230802.0 -home-assistant-intents==2023.7.25 +home-assistant-intents==2023.8.2 httpx==0.24.1 ifaddr==0.2.0 janus==1.0.0 diff --git a/requirements_all.txt b/requirements_all.txt index 2a2f0d1aa20..3191f722f18 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -991,7 +991,7 @@ holidays==0.28 home-assistant-frontend==20230802.0 # homeassistant.components.conversation -home-assistant-intents==2023.7.25 +home-assistant-intents==2023.8.2 # homeassistant.components.home_connect homeconnect==0.7.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index de45c832370..5b52309d58c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -777,7 +777,7 @@ holidays==0.28 home-assistant-frontend==20230802.0 # homeassistant.components.conversation -home-assistant-intents==2023.7.25 +home-assistant-intents==2023.8.2 # homeassistant.components.home_connect homeconnect==0.7.2 diff --git a/tests/components/conversation/snapshots/test_init.ambr b/tests/components/conversation/snapshots/test_init.ambr index f9fe284bcb0..f7145a9ab56 100644 --- a/tests/components/conversation/snapshots/test_init.ambr +++ b/tests/components/conversation/snapshots/test_init.ambr @@ -30,6 +30,7 @@ 'id': 'homeassistant', 'name': 'Home Assistant', 'supported_languages': list([ + 'af', 'ar', 'bg', 'bn', From d131b8c80b593042d8e23b565637abcc33c3aebc Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Wed, 2 Aug 2023 23:48:37 +0200 Subject: [PATCH 10/36] Add device naming to Yeelight (#97639) --- homeassistant/components/yeelight/light.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index 35739b0f596..2180eecff22 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -930,6 +930,8 @@ class YeelightColorLightWithoutNightlightSwitch( ): """Representation of a Color Yeelight light.""" + _attr_name = None + class YeelightColorLightWithNightlightSwitch( YeelightNightLightSupport, YeelightColorLightSupport, YeelightGenericLight From 5da94f40ec63fea01c923882e2386c9b68da537f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Aug 2023 00:20:35 -1000 Subject: [PATCH 11/36] Fix typo in tplink OUI (#97644) The last two were reversed for https://ouilookup.com/search/788cb5 --- homeassistant/components/tplink/manifest.json | 2 +- homeassistant/generated/dhcp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tplink/manifest.json b/homeassistant/components/tplink/manifest.json index c33106d13cc..b2fcc5c0161 100644 --- a/homeassistant/components/tplink/manifest.json +++ b/homeassistant/components/tplink/manifest.json @@ -154,7 +154,7 @@ }, { "hostname": "k[lps]*", - "macaddress": "788C5B*" + "macaddress": "788CB5*" } ], "documentation": "https://www.home-assistant.io/integrations/tplink", diff --git a/homeassistant/generated/dhcp.py b/homeassistant/generated/dhcp.py index 8b5dd91f64c..91a02ac3e06 100644 --- a/homeassistant/generated/dhcp.py +++ b/homeassistant/generated/dhcp.py @@ -782,7 +782,7 @@ DHCP: list[dict[str, str | bool]] = [ { "domain": "tplink", "hostname": "k[lps]*", - "macaddress": "788C5B*", + "macaddress": "788CB5*", }, { "domain": "tuya", From a36e746eb46270a46d5a263607096055784183e8 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Thu, 3 Aug 2023 09:13:23 +0200 Subject: [PATCH 12/36] Revert "Add device naming to Yeelight" (#97647) Revert "Add device naming to Yeelight (#97639)" This reverts commit 82f27115f5b53074fa385cd571c37115544efbe8. --- homeassistant/components/yeelight/light.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index 2180eecff22..35739b0f596 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -930,8 +930,6 @@ class YeelightColorLightWithoutNightlightSwitch( ): """Representation of a Color Yeelight light.""" - _attr_name = None - class YeelightColorLightWithNightlightSwitch( YeelightNightLightSupport, YeelightColorLightSupport, YeelightGenericLight From 2f5f15b3452125182249223757ff49aff1fe781f Mon Sep 17 00:00:00 2001 From: Nick Iacullo Date: Thu, 3 Aug 2023 09:30:56 -0700 Subject: [PATCH 13/36] Enable the `PRESET_MODE` `FanEntityFeature` for VeSync air purifiers (#97657) --- homeassistant/components/vesync/fan.py | 4 ++-- .../vesync/snapshots/test_diagnostics.ambr | 2 +- tests/components/vesync/snapshots/test_fan.ambr | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/vesync/fan.py b/homeassistant/components/vesync/fan.py index a3bf027c28f..e5347b204e6 100644 --- a/homeassistant/components/vesync/fan.py +++ b/homeassistant/components/vesync/fan.py @@ -86,10 +86,10 @@ def _setup_entities(devices, async_add_entities): class VeSyncFanHA(VeSyncDevice, FanEntity): """Representation of a VeSync fan.""" - _attr_supported_features = FanEntityFeature.SET_SPEED + _attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE _attr_name = None - def __init__(self, fan): + def __init__(self, fan) -> None: """Initialize the VeSync fan device.""" super().__init__(fan) self.smartfan = fan diff --git a/tests/components/vesync/snapshots/test_diagnostics.ambr b/tests/components/vesync/snapshots/test_diagnostics.ambr index c463db179eb..10dfdd2ba14 100644 --- a/tests/components/vesync/snapshots/test_diagnostics.ambr +++ b/tests/components/vesync/snapshots/test_diagnostics.ambr @@ -200,7 +200,7 @@ 'auto', 'sleep', ]), - 'supported_features': 1, + 'supported_features': 9, }), 'entity_id': 'fan.fan', 'last_changed': str, diff --git a/tests/components/vesync/snapshots/test_fan.ambr b/tests/components/vesync/snapshots/test_fan.ambr index 428f066e6cc..fa1a7a7b332 100644 --- a/tests/components/vesync/snapshots/test_fan.ambr +++ b/tests/components/vesync/snapshots/test_fan.ambr @@ -58,7 +58,7 @@ 'original_icon': None, 'original_name': None, 'platform': 'vesync', - 'supported_features': , + 'supported_features': , 'translation_key': None, 'unique_id': 'air-purifier', 'unit_of_measurement': None, @@ -73,7 +73,7 @@ 'auto', 'sleep', ]), - 'supported_features': , + 'supported_features': , }), 'context': , 'entity_id': 'fan.air_purifier_131s', @@ -140,7 +140,7 @@ 'original_icon': None, 'original_name': None, 'platform': 'vesync', - 'supported_features': , + 'supported_features': , 'translation_key': None, 'unique_id': 'asd_sdfKIHG7IJHGwJGJ7GJ_ag5h3G55', 'unit_of_measurement': None, @@ -161,7 +161,7 @@ 'sleep', ]), 'screen_status': True, - 'supported_features': , + 'supported_features': , }), 'context': , 'entity_id': 'fan.air_purifier_200s', @@ -229,7 +229,7 @@ 'original_icon': None, 'original_name': None, 'platform': 'vesync', - 'supported_features': , + 'supported_features': , 'translation_key': None, 'unique_id': '400s-purifier', 'unit_of_measurement': None, @@ -251,7 +251,7 @@ 'sleep', ]), 'screen_status': True, - 'supported_features': , + 'supported_features': , }), 'context': , 'entity_id': 'fan.air_purifier_400s', @@ -319,7 +319,7 @@ 'original_icon': None, 'original_name': None, 'platform': 'vesync', - 'supported_features': , + 'supported_features': , 'translation_key': None, 'unique_id': '600s-purifier', 'unit_of_measurement': None, @@ -341,7 +341,7 @@ 'sleep', ]), 'screen_status': True, - 'supported_features': , + 'supported_features': , }), 'context': , 'entity_id': 'fan.air_purifier_600s', From 6a8484b6daca3b91d8340dd418ebcd65abb8f4bf Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Aug 2023 00:35:22 -1000 Subject: [PATCH 14/36] Fix tplink child plug state reporting (#97658) regressed in https://github.com/home-assistant/core/pull/96246 --- homeassistant/components/tplink/switch.py | 11 ++++-- tests/components/tplink/__init__.py | 2 + tests/components/tplink/test_switch.py | 45 +++++++++++++++-------- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/homeassistant/components/tplink/switch.py b/homeassistant/components/tplink/switch.py index 6c843246663..fb812abc293 100644 --- a/homeassistant/components/tplink/switch.py +++ b/homeassistant/components/tplink/switch.py @@ -116,7 +116,7 @@ class SmartPlugSwitchChild(SmartPlugSwitch): coordinator: TPLinkDataUpdateCoordinator, plug: SmartDevice, ) -> None: - """Initialize the switch.""" + """Initialize the child switch.""" super().__init__(device, coordinator) self._plug = plug self._attr_unique_id = legacy_device_id(plug) @@ -124,10 +124,15 @@ class SmartPlugSwitchChild(SmartPlugSwitch): @async_refresh_after async def async_turn_on(self, **kwargs: Any) -> None: - """Turn the switch on.""" + """Turn the child switch on.""" await self._plug.turn_on() @async_refresh_after async def async_turn_off(self, **kwargs: Any) -> None: - """Turn the switch off.""" + """Turn the child switch off.""" await self._plug.turn_off() + + @property + def is_on(self) -> bool: + """Return true if child switch is on.""" + return bool(self._plug.is_on) diff --git a/tests/components/tplink/__init__.py b/tests/components/tplink/__init__.py index 4232d3e6909..816251ae3bb 100644 --- a/tests/components/tplink/__init__.py +++ b/tests/components/tplink/__init__.py @@ -180,12 +180,14 @@ def _mocked_strip() -> SmartStrip: plug0.alias = "Plug0" plug0.device_id = "bb:bb:cc:dd:ee:ff_PLUG0DEVICEID" plug0.mac = "bb:bb:cc:dd:ee:ff" + plug0.is_on = True plug0.protocol = _mock_protocol() plug1 = _mocked_plug() plug1.device_id = "cc:bb:cc:dd:ee:ff_PLUG1DEVICEID" plug1.mac = "cc:bb:cc:dd:ee:ff" plug1.alias = "Plug1" plug1.protocol = _mock_protocol() + plug1.is_on = False strip.children = [plug0, plug1] return strip diff --git a/tests/components/tplink/test_switch.py b/tests/components/tplink/test_switch.py index 1e5e03c0f37..05286e5ff48 100644 --- a/tests/components/tplink/test_switch.py +++ b/tests/components/tplink/test_switch.py @@ -9,7 +9,7 @@ import pytest from homeassistant.components import tplink from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN from homeassistant.components.tplink.const import DOMAIN -from homeassistant.const import ATTR_ENTITY_ID, STATE_ON, STATE_UNAVAILABLE +from homeassistant.const import ATTR_ENTITY_ID, STATE_OFF, STATE_ON, STATE_UNAVAILABLE from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er from homeassistant.setup import async_setup_component @@ -146,22 +146,37 @@ async def test_strip(hass: HomeAssistant) -> None: # since this is what the previous version did assert hass.states.get("switch.my_strip") is None - for plug_id in range(2): - entity_id = f"switch.my_strip_plug{plug_id}" - state = hass.states.get(entity_id) - assert state.state == STATE_ON + entity_id = "switch.my_strip_plug0" + state = hass.states.get(entity_id) + assert state.state == STATE_ON - await hass.services.async_call( - SWITCH_DOMAIN, "turn_off", {ATTR_ENTITY_ID: entity_id}, blocking=True - ) - strip.children[plug_id].turn_off.assert_called_once() - strip.children[plug_id].turn_off.reset_mock() + await hass.services.async_call( + SWITCH_DOMAIN, "turn_off", {ATTR_ENTITY_ID: entity_id}, blocking=True + ) + strip.children[0].turn_off.assert_called_once() + strip.children[0].turn_off.reset_mock() - await hass.services.async_call( - SWITCH_DOMAIN, "turn_on", {ATTR_ENTITY_ID: entity_id}, blocking=True - ) - strip.children[plug_id].turn_on.assert_called_once() - strip.children[plug_id].turn_on.reset_mock() + await hass.services.async_call( + SWITCH_DOMAIN, "turn_on", {ATTR_ENTITY_ID: entity_id}, blocking=True + ) + strip.children[0].turn_on.assert_called_once() + strip.children[0].turn_on.reset_mock() + + entity_id = "switch.my_strip_plug1" + state = hass.states.get(entity_id) + assert state.state == STATE_OFF + + await hass.services.async_call( + SWITCH_DOMAIN, "turn_off", {ATTR_ENTITY_ID: entity_id}, blocking=True + ) + strip.children[1].turn_off.assert_called_once() + strip.children[1].turn_off.reset_mock() + + await hass.services.async_call( + SWITCH_DOMAIN, "turn_on", {ATTR_ENTITY_ID: entity_id}, blocking=True + ) + strip.children[1].turn_on.assert_called_once() + strip.children[1].turn_on.reset_mock() async def test_strip_unique_ids(hass: HomeAssistant) -> None: From 79729043ed464a324185a867d428ee5df09d61d6 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Thu, 3 Aug 2023 13:59:37 +0200 Subject: [PATCH 15/36] Fix date and timestamp device class in Command Line Sensor (#97663) * Fix date in Command Line sensor * prettier --- .../components/command_line/sensor.py | 24 ++++++--- tests/components/command_line/test_sensor.py | 51 +++++++++++++++++++ 2 files changed, 69 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/command_line/sensor.py b/homeassistant/components/command_line/sensor.py index 1b865827e69..dd5ad2d5190 100644 --- a/homeassistant/components/command_line/sensor.py +++ b/homeassistant/components/command_line/sensor.py @@ -15,9 +15,11 @@ from homeassistant.components.sensor import ( DOMAIN as SENSOR_DOMAIN, PLATFORM_SCHEMA, STATE_CLASSES_SCHEMA, + SensorDeviceClass, SensorEntity, SensorStateClass, ) +from homeassistant.components.sensor.helpers import async_parse_date_datetime from homeassistant.const import ( CONF_COMMAND, CONF_DEVICE_CLASS, @@ -206,14 +208,24 @@ class CommandSensor(ManualTriggerEntity, SensorEntity): return if self._value_template is not None: - self._attr_native_value = ( - self._value_template.async_render_with_possible_json_value( - value, - None, - ) + value = self._value_template.async_render_with_possible_json_value( + value, + None, ) - else: + + if self.device_class not in { + SensorDeviceClass.DATE, + SensorDeviceClass.TIMESTAMP, + }: self._attr_native_value = value + self._process_manual_data(value) + return + + self._attr_native_value = None + if value is not None: + self._attr_native_value = async_parse_date_datetime( + value, self.entity_id, self.device_class + ) self._process_manual_data(value) self.async_write_ha_state() diff --git a/tests/components/command_line/test_sensor.py b/tests/components/command_line/test_sensor.py index a0f8f2cdf84..bc24ff5419f 100644 --- a/tests/components/command_line/test_sensor.py +++ b/tests/components/command_line/test_sensor.py @@ -646,3 +646,54 @@ async def test_updating_manually( ) await hass.async_block_till_done() assert called + + +@pytest.mark.parametrize( + "get_config", + [ + { + "command_line": [ + { + "sensor": { + "name": "Test", + "command": "echo 2022-12-22T13:15:30Z", + "device_class": "timestamp", + } + } + ] + } + ], +) +async def test_scrape_sensor_device_timestamp( + hass: HomeAssistant, load_yaml_integration: None +) -> None: + """Test Command Line sensor with a device of type TIMESTAMP.""" + entity_state = hass.states.get("sensor.test") + assert entity_state + assert entity_state.state == "2022-12-22T13:15:30+00:00" + + +@pytest.mark.parametrize( + "get_config", + [ + { + "command_line": [ + { + "sensor": { + "name": "Test", + "command": "echo January 17, 2022", + "device_class": "date", + "value_template": "{{ strptime(value, '%B %d, %Y').strftime('%Y-%m-%d') }}", + } + } + ] + } + ], +) +async def test_scrape_sensor_device_date( + hass: HomeAssistant, load_yaml_integration: None +) -> None: + """Test Command Line sensor with a device of type DATE.""" + entity_state = hass.states.get("sensor.test") + assert entity_state + assert entity_state.state == "2022-01-17" From 1945275b7c1fbee53b333014f61287082938dca1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Aug 2023 06:57:34 -1000 Subject: [PATCH 16/36] Bump zeroconf to 0.72.3 (#97668) --- homeassistant/components/zeroconf/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/zeroconf/manifest.json b/homeassistant/components/zeroconf/manifest.json index 73ebe15d0c7..bb0ec29271e 100644 --- a/homeassistant/components/zeroconf/manifest.json +++ b/homeassistant/components/zeroconf/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_push", "loggers": ["zeroconf"], "quality_scale": "internal", - "requirements": ["zeroconf==0.72.0"] + "requirements": ["zeroconf==0.72.3"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 6564dfb3a0d..12e8afc3cf7 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -52,7 +52,7 @@ voluptuous-serialize==2.6.0 voluptuous==0.13.1 webrtcvad==2.0.10 yarl==1.9.2 -zeroconf==0.72.0 +zeroconf==0.72.3 # Constrain pycryptodome to avoid vulnerability # see https://github.com/home-assistant/core/pull/16238 diff --git a/requirements_all.txt b/requirements_all.txt index 3191f722f18..bd803d8152d 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2749,7 +2749,7 @@ zamg==0.2.4 zengge==0.2 # homeassistant.components.zeroconf -zeroconf==0.72.0 +zeroconf==0.72.3 # homeassistant.components.zeversolar zeversolar==0.3.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 5b52309d58c..fe022d74c6b 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2022,7 +2022,7 @@ youtubeaio==1.1.5 zamg==0.2.4 # homeassistant.components.zeroconf -zeroconf==0.72.0 +zeroconf==0.72.3 # homeassistant.components.zeversolar zeversolar==0.3.1 From 0a24299e231a335e5e03d184ec6fa1aea24f363f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Aug 2023 01:31:49 -1000 Subject: [PATCH 17/36] Bump pyatv to 0.13.3 (#97670) changelog: https://github.com/postlund/pyatv/compare/v0.13.2...v0.13.3 maybe fixes #80215 --- homeassistant/components/apple_tv/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/apple_tv/manifest.json b/homeassistant/components/apple_tv/manifest.json index 4ead41e86e9..1d1c26b5fcd 100644 --- a/homeassistant/components/apple_tv/manifest.json +++ b/homeassistant/components/apple_tv/manifest.json @@ -7,7 +7,7 @@ "documentation": "https://www.home-assistant.io/integrations/apple_tv", "iot_class": "local_push", "loggers": ["pyatv", "srptools"], - "requirements": ["pyatv==0.13.2"], + "requirements": ["pyatv==0.13.3"], "zeroconf": [ "_mediaremotetv._tcp.local.", "_companion-link._tcp.local.", diff --git a/requirements_all.txt b/requirements_all.txt index bd803d8152d..67041b69fa0 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1572,7 +1572,7 @@ pyatag==0.3.5.3 pyatmo==7.5.0 # homeassistant.components.apple_tv -pyatv==0.13.2 +pyatv==0.13.3 # homeassistant.components.aussie_broadband pyaussiebb==0.0.15 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index fe022d74c6b..38022121f85 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1178,7 +1178,7 @@ pyatag==0.3.5.3 pyatmo==7.5.0 # homeassistant.components.apple_tv -pyatv==0.13.2 +pyatv==0.13.3 # homeassistant.components.aussie_broadband pyaussiebb==0.0.15 From 12d3bce3a73189a57b214b969c9e867c50d646ab Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Thu, 3 Aug 2023 21:06:45 +0200 Subject: [PATCH 18/36] Fix color mode attribute for both official and non official Hue lights (#97683) --- homeassistant/components/hue/v2/light.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/hue/v2/light.py b/homeassistant/components/hue/v2/light.py index 957aa4a7806..f42da406599 100644 --- a/homeassistant/components/hue/v2/light.py +++ b/homeassistant/components/hue/v2/light.py @@ -89,6 +89,7 @@ class HueLight(HueBaseEntity, LightEntity): self._supported_color_modes.add(ColorMode.BRIGHTNESS) # support transition if brightness control self._attr_supported_features |= LightEntityFeature.TRANSITION + self._color_temp_active: bool = False # get list of supported effects (combine effects and timed_effects) self._attr_effect_list = [] if effects := resource.effects: @@ -121,10 +122,8 @@ class HueLight(HueBaseEntity, LightEntity): @property def color_mode(self) -> ColorMode: """Return the color mode of the light.""" - if color_temp := self.resource.color_temperature: - # Hue lights return `mired_valid` to indicate CT is active - if color_temp.mirek is not None: - return ColorMode.COLOR_TEMP + if self.color_temp_active: + return ColorMode.COLOR_TEMP if self.resource.supports_color: return ColorMode.XY if self.resource.supports_dimming: @@ -132,6 +131,18 @@ class HueLight(HueBaseEntity, LightEntity): # fallback to on_off return ColorMode.ONOFF + @property + def color_temp_active(self) -> bool: + """Return if the light is in Color Temperature mode.""" + color_temp = self.resource.color_temperature + if color_temp is None or color_temp.mirek is None: + return False + # Official Hue lights return `mirek_valid` to indicate CT is active + # while non-official lights do not. + if self.device.product_data.certified: + return self.resource.color_temperature.mirek_valid + return self._color_temp_active + @property def xy_color(self) -> tuple[float, float] | None: """Return the xy color.""" @@ -193,6 +204,7 @@ class HueLight(HueBaseEntity, LightEntity): xy_color = kwargs.get(ATTR_XY_COLOR) color_temp = normalize_hue_colortemp(kwargs.get(ATTR_COLOR_TEMP)) brightness = normalize_hue_brightness(kwargs.get(ATTR_BRIGHTNESS)) + self._color_temp_active = color_temp is not None flash = kwargs.get(ATTR_FLASH) effect = effect_str = kwargs.get(ATTR_EFFECT) if effect_str in (EFFECT_NONE, EFFECT_NONE.lower()): From 694d28ae3bb52015a5fa6059b9a90bcfe9727ce1 Mon Sep 17 00:00:00 2001 From: Robert Svensson Date: Thu, 3 Aug 2023 21:11:15 +0200 Subject: [PATCH 19/36] Fix UniFi image platform not loading when passphrase is missing from WLAN (#97684) --- homeassistant/components/unifi/image.py | 4 ++-- homeassistant/components/unifi/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/unifi/image.py b/homeassistant/components/unifi/image.py index dc4fb93eded..c3969c21bc4 100644 --- a/homeassistant/components/unifi/image.py +++ b/homeassistant/components/unifi/image.py @@ -41,7 +41,7 @@ class UnifiImageEntityDescriptionMixin(Generic[HandlerT, ApiItemT]): """Validate and load entities from different UniFi handlers.""" image_fn: Callable[[UniFiController, ApiItemT], bytes] - value_fn: Callable[[ApiItemT], str] + value_fn: Callable[[ApiItemT], str | None] @dataclass @@ -99,7 +99,7 @@ class UnifiImageEntity(UnifiEntity[HandlerT, ApiItemT], ImageEntity): _attr_content_type = "image/png" current_image: bytes | None = None - previous_value = "" + previous_value: str | None = None def __init__( self, diff --git a/homeassistant/components/unifi/manifest.json b/homeassistant/components/unifi/manifest.json index c34d1035158..4cc45ddb6b8 100644 --- a/homeassistant/components/unifi/manifest.json +++ b/homeassistant/components/unifi/manifest.json @@ -8,7 +8,7 @@ "iot_class": "local_push", "loggers": ["aiounifi"], "quality_scale": "platinum", - "requirements": ["aiounifi==50"], + "requirements": ["aiounifi==51"], "ssdp": [ { "manufacturer": "Ubiquiti Networks", diff --git a/requirements_all.txt b/requirements_all.txt index 67041b69fa0..250d1a452ef 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -360,7 +360,7 @@ aiosyncthing==0.5.1 aiotractive==0.5.5 # homeassistant.components.unifi -aiounifi==50 +aiounifi==51 # homeassistant.components.vlc_telnet aiovlc==0.1.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 38022121f85..2b5e7ea5658 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -335,7 +335,7 @@ aiosyncthing==0.5.1 aiotractive==0.5.5 # homeassistant.components.unifi -aiounifi==50 +aiounifi==51 # homeassistant.components.vlc_telnet aiovlc==0.1.0 From 7a244e30a4fd9e4999e5913de2393cd33fdec656 Mon Sep 17 00:00:00 2001 From: Nerdix <70015952+N3rdix@users.noreply.github.com> Date: Fri, 4 Aug 2023 11:31:54 +0200 Subject: [PATCH 20/36] Fix Kostal_Plenticore SELECT entities using device_info correctly (#97690) --- homeassistant/components/kostal_plenticore/select.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/kostal_plenticore/select.py b/homeassistant/components/kostal_plenticore/select.py index 2118d4b47c6..1a89e5617cc 100644 --- a/homeassistant/components/kostal_plenticore/select.py +++ b/homeassistant/components/kostal_plenticore/select.py @@ -111,7 +111,7 @@ class PlenticoreDataSelect( self.platform_name = platform_name self.module_id = description.module_id self.data_id = description.key - self._device_info = device_info + self._attr_device_info = device_info self._attr_unique_id = f"{entry_id}_{description.module_id}" @property From 0617363f53551fc33b41d6e4565b16d28a22aa7d Mon Sep 17 00:00:00 2001 From: Cyr-ius <1258123+cyr-ius@users.noreply.github.com> Date: Fri, 4 Aug 2023 09:25:51 +0200 Subject: [PATCH 21/36] Fix freebox enumerate raid disks (#97696) --- homeassistant/components/freebox/router.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/freebox/router.py b/homeassistant/components/freebox/router.py index 4a9c22847ae..122242f1959 100644 --- a/homeassistant/components/freebox/router.py +++ b/homeassistant/components/freebox/router.py @@ -161,10 +161,13 @@ class FreeboxRouter: async def _update_raids_sensors(self) -> None: """Update Freebox raids.""" # None at first request - fbx_raids: list[dict[str, Any]] = await self._api.storage.get_raids() or [] - - for fbx_raid in fbx_raids: - self.raids[fbx_raid["id"]] = fbx_raid + try: + fbx_raids: list[dict[str, Any]] = await self._api.storage.get_raids() or [] + except HttpRequestError: + _LOGGER.warning("Unable to enumerate raid disks") + else: + for fbx_raid in fbx_raids: + self.raids[fbx_raid["id"]] = fbx_raid async def update_home_devices(self) -> None: """Update Home devices (alarm, light, sensor, switch, remote ...).""" From f066b4645a26575a87ee5e4a89d852909cf11d73 Mon Sep 17 00:00:00 2001 From: amitfin Date: Fri, 4 Aug 2023 13:51:04 +0300 Subject: [PATCH 22/36] Fix allow_name_translation logic (#97701) --- script/hassfest/translations.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/hassfest/translations.py b/script/hassfest/translations.py index 1754c166ef7..22c3e927703 100644 --- a/script/hassfest/translations.py +++ b/script/hassfest/translations.py @@ -61,8 +61,9 @@ def allow_name_translation(integration: Integration) -> bool: """Validate that the translation name is not the same as the integration name.""" # Only enforce for core because custom integrations can't be # added to allow list. - return integration.core and ( - integration.domain in ALLOW_NAME_TRANSLATION + return ( + not integration.core + or integration.domain in ALLOW_NAME_TRANSLATION or integration.quality_scale == "internal" ) From 6a9318b90ae8a6dc42baaa97c41b6381eb32ae50 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:15:08 -0700 Subject: [PATCH 23/36] Fix NWS twice_daily forecast day/night detection (#97703) --- homeassistant/components/nws/const.py | 1 - homeassistant/components/nws/weather.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/nws/const.py b/homeassistant/components/nws/const.py index 109af7a565b..e5718d5132f 100644 --- a/homeassistant/components/nws/const.py +++ b/homeassistant/components/nws/const.py @@ -26,7 +26,6 @@ CONF_STATION = "station" ATTRIBUTION = "Data from National Weather Service/NOAA" ATTR_FORECAST_DETAILED_DESCRIPTION = "detailed_description" -ATTR_FORECAST_DAYTIME = "daytime" CONDITION_CLASSES: dict[str, list[str]] = { ATTR_CONDITION_EXCEPTIONAL: [ diff --git a/homeassistant/components/nws/weather.py b/homeassistant/components/nws/weather.py index e8a35ba66f1..8ddf842cd62 100644 --- a/homeassistant/components/nws/weather.py +++ b/homeassistant/components/nws/weather.py @@ -9,6 +9,7 @@ from homeassistant.components.weather import ( ATTR_CONDITION_SUNNY, ATTR_FORECAST_CONDITION, ATTR_FORECAST_HUMIDITY, + ATTR_FORECAST_IS_DAYTIME, ATTR_FORECAST_NATIVE_DEW_POINT, ATTR_FORECAST_NATIVE_TEMP, ATTR_FORECAST_NATIVE_WIND_SPEED, @@ -36,7 +37,6 @@ from homeassistant.util.unit_system import UnitSystem from . import base_unique_id, device_info from .const import ( - ATTR_FORECAST_DAYTIME, ATTR_FORECAST_DETAILED_DESCRIPTION, ATTRIBUTION, CONDITION_CLASSES, @@ -101,7 +101,6 @@ if TYPE_CHECKING: """Forecast with extra fields needed for NWS.""" detailed_description: str | None - daytime: bool | None class NWSWeather(WeatherEntity): @@ -268,7 +267,7 @@ class NWSWeather(WeatherEntity): data[ATTR_FORECAST_HUMIDITY] = forecast_entry.get("relativeHumidity") if self.mode == DAYNIGHT: - data[ATTR_FORECAST_DAYTIME] = forecast_entry.get("isDaytime") + data[ATTR_FORECAST_IS_DAYTIME] = forecast_entry.get("isDaytime") time = forecast_entry.get("iconTime") weather = forecast_entry.get("iconWeather") From 16e1212572aec41758c4f3514ea007f914fc0115 Mon Sep 17 00:00:00 2001 From: tronikos Date: Thu, 3 Aug 2023 11:07:44 -0700 Subject: [PATCH 24/36] Bump opower to 0.0.19 (#97706) --- homeassistant/components/opower/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/opower/manifest.json b/homeassistant/components/opower/manifest.json index c0eb319c10c..1b351d73011 100644 --- a/homeassistant/components/opower/manifest.json +++ b/homeassistant/components/opower/manifest.json @@ -6,5 +6,5 @@ "dependencies": ["recorder"], "documentation": "https://www.home-assistant.io/integrations/opower", "iot_class": "cloud_polling", - "requirements": ["opower==0.0.18"] + "requirements": ["opower==0.0.19"] } diff --git a/requirements_all.txt b/requirements_all.txt index 250d1a452ef..3526ad77311 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1368,7 +1368,7 @@ openwrt-luci-rpc==1.1.16 openwrt-ubus-rpc==0.0.2 # homeassistant.components.opower -opower==0.0.18 +opower==0.0.19 # homeassistant.components.oralb oralb-ble==0.17.6 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 2b5e7ea5658..655162059ef 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1037,7 +1037,7 @@ openerz-api==0.2.0 openhomedevice==2.2.0 # homeassistant.components.opower -opower==0.0.18 +opower==0.0.19 # homeassistant.components.oralb oralb-ble==0.17.6 From 047a210786aa484d8dae5a47e35ac97c8ae34600 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Thu, 3 Aug 2023 20:36:09 +0200 Subject: [PATCH 25/36] Fix detection of client wan-access rule in AVM Fritz!Box Tools (#97708) --- homeassistant/components/fritz/common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/fritz/common.py b/homeassistant/components/fritz/common.py index cdea8ebee54..8dfe5be9308 100644 --- a/homeassistant/components/fritz/common.py +++ b/homeassistant/components/fritz/common.py @@ -469,6 +469,11 @@ class FritzBoxTools( if not host.get("MACAddress"): continue + if (wan_access := host.get("X_AVM-DE_WANAccess")) is not None: + wan_access_result = "granted" in wan_access + else: + wan_access_result = None + hosts[host["MACAddress"]] = Device( name=host["HostName"], connected=host["Active"], @@ -476,7 +481,7 @@ class FritzBoxTools( connection_type="", ip_address=host["IPAddress"], ssid=None, - wan_access="granted" in host["X_AVM-DE_WANAccess"], + wan_access=wan_access_result, ) if not self.fritz_status.device_has_mesh_support or ( From 2b876fa4851946c47bdb21468d9bc8731a7d9e8f Mon Sep 17 00:00:00 2001 From: Matthias Alphart Date: Thu, 3 Aug 2023 23:23:12 +0200 Subject: [PATCH 26/36] Fix unloading KNX integration without sensors (#97720) --- homeassistant/components/knx/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/knx/__init__.py b/homeassistant/components/knx/__init__.py index 1bb6d9bbdd2..3444e9b002a 100644 --- a/homeassistant/components/knx/__init__.py +++ b/homeassistant/components/knx/__init__.py @@ -342,10 +342,13 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: unload_ok = await hass.config_entries.async_unload_platforms( entry, [ - platform - for platform in SUPPORTED_PLATFORMS - if platform in hass.data[DATA_KNX_CONFIG] - and platform is not Platform.NOTIFY + Platform.SENSOR, # always unload system entities (telegram counter, etc.) + *[ + platform + for platform in SUPPORTED_PLATFORMS + if platform in hass.data[DATA_KNX_CONFIG] + and platform not in (Platform.SENSOR, Platform.NOTIFY) + ], ], ) if unload_ok: From 5283afc1168c9c5ea1863c4a6c4e0944c071d9bd Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:30:13 +0200 Subject: [PATCH 27/36] Update zigpy to 0.56.3 (#97480) --- homeassistant/components/zha/manifest.json | 4 ++-- requirements_all.txt | 4 ++-- requirements_test_all.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/zha/manifest.json b/homeassistant/components/zha/manifest.json index 5e33377ec0e..5d0fdc646cf 100644 --- a/homeassistant/components/zha/manifest.json +++ b/homeassistant/components/zha/manifest.json @@ -25,10 +25,10 @@ "pyserial-asyncio==0.6", "zha-quirks==0.0.102", "zigpy-deconz==0.21.0", - "zigpy==0.56.2", + "zigpy==0.56.3", "zigpy-xbee==0.18.1", "zigpy-zigate==0.11.0", - "zigpy-znp==0.11.3" + "zigpy-znp==0.11.4" ], "usb": [ { diff --git a/requirements_all.txt b/requirements_all.txt index 3526ad77311..ae45bb029a5 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2773,10 +2773,10 @@ zigpy-xbee==0.18.1 zigpy-zigate==0.11.0 # homeassistant.components.zha -zigpy-znp==0.11.3 +zigpy-znp==0.11.4 # homeassistant.components.zha -zigpy==0.56.2 +zigpy==0.56.3 # homeassistant.components.zoneminder zm-py==0.5.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 655162059ef..38a3f6d09fa 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2040,10 +2040,10 @@ zigpy-xbee==0.18.1 zigpy-zigate==0.11.0 # homeassistant.components.zha -zigpy-znp==0.11.3 +zigpy-znp==0.11.4 # homeassistant.components.zha -zigpy==0.56.2 +zigpy==0.56.3 # homeassistant.components.zwave_js zwave-js-server-python==0.49.0 From 79486f18809ab960f83ab7af44492a088d731b9b Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Fri, 4 Aug 2023 00:11:36 +0200 Subject: [PATCH 28/36] Bump zigpy to 0.56.4 (#97722) --- homeassistant/components/zha/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/zha/manifest.json b/homeassistant/components/zha/manifest.json index 5d0fdc646cf..041a93a8ead 100644 --- a/homeassistant/components/zha/manifest.json +++ b/homeassistant/components/zha/manifest.json @@ -25,7 +25,7 @@ "pyserial-asyncio==0.6", "zha-quirks==0.0.102", "zigpy-deconz==0.21.0", - "zigpy==0.56.3", + "zigpy==0.56.4", "zigpy-xbee==0.18.1", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.4" diff --git a/requirements_all.txt b/requirements_all.txt index ae45bb029a5..e8520806328 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2776,7 +2776,7 @@ zigpy-zigate==0.11.0 zigpy-znp==0.11.4 # homeassistant.components.zha -zigpy==0.56.3 +zigpy==0.56.4 # homeassistant.components.zoneminder zm-py==0.5.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 38a3f6d09fa..c79da53ec2c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2043,7 +2043,7 @@ zigpy-zigate==0.11.0 zigpy-znp==0.11.4 # homeassistant.components.zha -zigpy==0.56.3 +zigpy==0.56.4 # homeassistant.components.zwave_js zwave-js-server-python==0.49.0 From 53ee17854501bda202582b12442579506232a443 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 4 Aug 2023 09:34:04 +0200 Subject: [PATCH 29/36] Fix keymitt_ble RuntimeWarning (#97729) --- homeassistant/components/keymitt_ble/config_flow.py | 2 +- tests/components/keymitt_ble/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/keymitt_ble/config_flow.py b/homeassistant/components/keymitt_ble/config_flow.py index 49ab04163dc..e8176b152a6 100644 --- a/homeassistant/components/keymitt_ble/config_flow.py +++ b/homeassistant/components/keymitt_ble/config_flow.py @@ -138,7 +138,7 @@ class MicroBotConfigFlow(ConfigFlow, domain=DOMAIN): await self._client.connect(init=True) return self.async_show_form(step_id="link") - if not self._client.is_connected(): + if not await self._client.is_connected(): errors["base"] = "linking" else: await self._client.disconnect() diff --git a/tests/components/keymitt_ble/__init__.py b/tests/components/keymitt_ble/__init__.py index 2938e22c924..c6e56739d76 100644 --- a/tests/components/keymitt_ble/__init__.py +++ b/tests/components/keymitt_ble/__init__.py @@ -77,6 +77,6 @@ class MockMicroBotApiClientFail: async def disconnect(self): """Mock disconnect.""" - def is_connected(self): + async def is_connected(self): """Mock disconnected.""" return False From 9bec7ea93ba3aa050db29b0fb2b94dbdb3f14356 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Aug 2023 16:48:53 -1000 Subject: [PATCH 30/36] Bump zeroconf to 0.74.0 (#97745) * Bump zeroconf to 0.74.0 changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.72.3...0.74.0 - more cython build fixes - performance improvements (mostly for pyatv) * handle typing * handle typing * remove if TYPE_CHECKING, this doesnt get called that often * remove if TYPE_CHECKING, this doesnt get called that often --- homeassistant/components/thread/discovery.py | 33 +++++++++++++------ homeassistant/components/zeroconf/__init__.py | 8 ++++- .../components/zeroconf/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 6 files changed, 34 insertions(+), 15 deletions(-) diff --git a/homeassistant/components/thread/discovery.py b/homeassistant/components/thread/discovery.py index 1006a44d5d3..d07469f36fb 100644 --- a/homeassistant/components/thread/discovery.py +++ b/homeassistant/components/thread/discovery.py @@ -57,25 +57,29 @@ def async_discovery_data_from_service( except UnicodeDecodeError: return None - ext_addr = service.properties.get(b"xa") - ext_pan_id = service.properties.get(b"xp") - network_name = try_decode(service.properties.get(b"nn")) - model_name = try_decode(service.properties.get(b"mn")) + # Service properties are always bytes if they are set from the network. + # For legacy backwards compatibility zeroconf allows properties to be set + # as strings but we never do that so we can safely cast here. + service_properties = cast(dict[bytes, bytes | None], service.properties) + ext_addr = service_properties.get(b"xa") + ext_pan_id = service_properties.get(b"xp") + network_name = try_decode(service_properties.get(b"nn")) + model_name = try_decode(service_properties.get(b"mn")) server = service.server - vendor_name = try_decode(service.properties.get(b"vn")) - thread_version = try_decode(service.properties.get(b"tv")) + vendor_name = try_decode(service_properties.get(b"vn")) + thread_version = try_decode(service_properties.get(b"tv")) unconfigured = None brand = KNOWN_BRANDS.get(vendor_name) if brand == "homeassistant": # Attempt to detect incomplete configuration - if (state_bitmap_b := service.properties.get(b"sb")) is not None: + if (state_bitmap_b := service_properties.get(b"sb")) is not None: try: state_bitmap = StateBitmap.from_bytes(state_bitmap_b) if not state_bitmap.is_active: unconfigured = True except ValueError: _LOGGER.debug("Failed to decode state bitmap in service %s", service) - if service.properties.get(b"at") is None: + if service_properties.get(b"at") is None: unconfigured = True return ThreadRouterDiscoveryData( @@ -168,10 +172,19 @@ class ThreadRouterDiscovery: return _LOGGER.debug("_add_update_service %s %s", name, service) + # Service properties are always bytes if they are set from the network. + # For legacy backwards compatibility zeroconf allows properties to be set + # as strings but we never do that so we can safely cast here. + service_properties = cast(dict[bytes, bytes | None], service.properties) + + if not (xa := service_properties.get(b"xa")): + _LOGGER.debug("_add_update_service failed to find xa in %s", service) + return + # We use the extended mac address as key, bail out if it's missing try: - extended_mac_address = service.properties[b"xa"].hex() - except (KeyError, UnicodeDecodeError) as err: + extended_mac_address = xa.hex() + except UnicodeDecodeError as err: _LOGGER.debug("_add_update_service failed to parse service %s", err) return diff --git a/homeassistant/components/zeroconf/__init__.py b/homeassistant/components/zeroconf/__init__.py index f77909b1bdd..b85f9f0fd83 100644 --- a/homeassistant/components/zeroconf/__init__.py +++ b/homeassistant/components/zeroconf/__init__.py @@ -553,11 +553,17 @@ def info_from_service(service: AsyncServiceInfo) -> ZeroconfServiceInfo | None: break if not host: return None + + # Service properties are always bytes if they are set from the network. + # For legacy backwards compatibility zeroconf allows properties to be set + # as strings but we never do that so we can safely cast here. + service_properties = cast(dict[bytes, bytes | None], service.properties) + properties: dict[str, Any] = { k.decode("ascii", "replace"): None if v is None else v.decode("utf-8", "replace") - for k, v in service.properties.items() + for k, v in service_properties.items() } assert service.server is not None, "server cannot be none if there are addresses" diff --git a/homeassistant/components/zeroconf/manifest.json b/homeassistant/components/zeroconf/manifest.json index bb0ec29271e..cd7b9e95e75 100644 --- a/homeassistant/components/zeroconf/manifest.json +++ b/homeassistant/components/zeroconf/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_push", "loggers": ["zeroconf"], "quality_scale": "internal", - "requirements": ["zeroconf==0.72.3"] + "requirements": ["zeroconf==0.74.0"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 12e8afc3cf7..fa5b52478d0 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -52,7 +52,7 @@ voluptuous-serialize==2.6.0 voluptuous==0.13.1 webrtcvad==2.0.10 yarl==1.9.2 -zeroconf==0.72.3 +zeroconf==0.74.0 # Constrain pycryptodome to avoid vulnerability # see https://github.com/home-assistant/core/pull/16238 diff --git a/requirements_all.txt b/requirements_all.txt index e8520806328..98d6c3f29db 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2749,7 +2749,7 @@ zamg==0.2.4 zengge==0.2 # homeassistant.components.zeroconf -zeroconf==0.72.3 +zeroconf==0.74.0 # homeassistant.components.zeversolar zeversolar==0.3.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index c79da53ec2c..6a32c356d58 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2022,7 +2022,7 @@ youtubeaio==1.1.5 zamg==0.2.4 # homeassistant.components.zeroconf -zeroconf==0.72.3 +zeroconf==0.74.0 # homeassistant.components.zeversolar zeversolar==0.3.1 From cdabf76d158145bc0a34cb83263925d774b3331d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Aug 2023 23:46:19 -1000 Subject: [PATCH 31/36] Avoid calling the http access logging when logging is disabled in emulated_hue (#97750) --- homeassistant/components/emulated_hue/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/emulated_hue/__init__.py b/homeassistant/components/emulated_hue/__init__.py index 1ba93da716c..a98d2c08a48 100644 --- a/homeassistant/components/emulated_hue/__init__.py +++ b/homeassistant/components/emulated_hue/__init__.py @@ -6,6 +6,7 @@ import logging from aiohttp import web import voluptuous as vol +from homeassistant.components.http import HomeAssistantAccessLogger from homeassistant.components.network import async_get_source_ip from homeassistant.const import ( CONF_ENTITIES, @@ -100,7 +101,7 @@ async def start_emulated_hue_bridge( config.advertise_port or config.listen_port, ) - runner = web.AppRunner(app) + runner = web.AppRunner(app, access_log_class=HomeAssistantAccessLogger) await runner.setup() site = web.TCPSite(runner, config.host_ip_addr, config.listen_port) From 39fc557189418ddce003f869e21b7af91dd288c4 Mon Sep 17 00:00:00 2001 From: tronikos Date: Fri, 4 Aug 2023 00:32:59 -0700 Subject: [PATCH 32/36] Bump opower to 0.0.20 (#97752) --- homeassistant/components/opower/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/opower/manifest.json b/homeassistant/components/opower/manifest.json index 1b351d73011..94758720722 100644 --- a/homeassistant/components/opower/manifest.json +++ b/homeassistant/components/opower/manifest.json @@ -6,5 +6,5 @@ "dependencies": ["recorder"], "documentation": "https://www.home-assistant.io/integrations/opower", "iot_class": "cloud_polling", - "requirements": ["opower==0.0.19"] + "requirements": ["opower==0.0.20"] } diff --git a/requirements_all.txt b/requirements_all.txt index 98d6c3f29db..a2c9bc85eb6 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1368,7 +1368,7 @@ openwrt-luci-rpc==1.1.16 openwrt-ubus-rpc==0.0.2 # homeassistant.components.opower -opower==0.0.19 +opower==0.0.20 # homeassistant.components.oralb oralb-ble==0.17.6 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 6a32c356d58..d35544c68d9 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1037,7 +1037,7 @@ openerz-api==0.2.0 openhomedevice==2.2.0 # homeassistant.components.opower -opower==0.0.19 +opower==0.0.20 # homeassistant.components.oralb oralb-ble==0.17.6 From 9479a59a2fbfa20f6ba70cce5ac1b3f3d4be3419 Mon Sep 17 00:00:00 2001 From: Maikel Punie Date: Fri, 4 Aug 2023 11:33:03 +0200 Subject: [PATCH 33/36] Bump pyduotecno to 2023.8.3 (#97759) --- homeassistant/components/duotecno/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/duotecno/manifest.json b/homeassistant/components/duotecno/manifest.json index c0bd29547c5..69490b6b5aa 100644 --- a/homeassistant/components/duotecno/manifest.json +++ b/homeassistant/components/duotecno/manifest.json @@ -5,5 +5,5 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/duotecno", "iot_class": "local_push", - "requirements": ["pyduotecno==2023.8.1"] + "requirements": ["pyduotecno==2023.8.3"] } diff --git a/requirements_all.txt b/requirements_all.txt index a2c9bc85eb6..21d10628ecb 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1650,7 +1650,7 @@ pydrawise==2023.7.1 pydroid-ipcam==2.0.0 # homeassistant.components.duotecno -pyduotecno==2023.8.1 +pyduotecno==2023.8.3 # homeassistant.components.ebox pyebox==1.1.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index d35544c68d9..5cb970c7132 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1223,7 +1223,7 @@ pydiscovergy==2.0.1 pydroid-ipcam==2.0.0 # homeassistant.components.duotecno -pyduotecno==2023.8.1 +pyduotecno==2023.8.3 # homeassistant.components.econet pyeconet==0.1.20 From d71f16c8b12a1a1308ca6775aa336ef48ae49be2 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 4 Aug 2023 12:46:53 +0200 Subject: [PATCH 34/36] Add has entity name to Solarlog (#97764) --- homeassistant/components/solarlog/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/solarlog/sensor.py b/homeassistant/components/solarlog/sensor.py index a69d2a4c382..936dc998c86 100644 --- a/homeassistant/components/solarlog/sensor.py +++ b/homeassistant/components/solarlog/sensor.py @@ -218,6 +218,8 @@ async def async_setup_entry( class SolarlogSensor(CoordinatorEntity[SolarlogData], SensorEntity): """Representation of a Sensor.""" + _attr_has_entity_name = True + entity_description: SolarLogSensorEntityDescription def __init__( @@ -228,7 +230,6 @@ class SolarlogSensor(CoordinatorEntity[SolarlogData], SensorEntity): """Initialize the sensor.""" super().__init__(coordinator) self.entity_description = description - self._attr_name = f"{coordinator.name} {description.name}" self._attr_unique_id = f"{coordinator.unique_id}_{description.key}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, coordinator.unique_id)}, From 3b48c8a0f5347af2ed54ab19cee7ea6511b08d28 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 4 Aug 2023 12:46:23 +0200 Subject: [PATCH 35/36] Fix WAQI being zero (#97767) --- homeassistant/components/waqi/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/waqi/sensor.py b/homeassistant/components/waqi/sensor.py index ae4e46c2a0b..71ec703df3f 100644 --- a/homeassistant/components/waqi/sensor.py +++ b/homeassistant/components/waqi/sensor.py @@ -142,7 +142,7 @@ class WaqiSensor(SensorEntity): @property def native_value(self): """Return the state of the device.""" - if value := self._data.get("aqi"): + if (value := self._data.get("aqi")) is not None: with suppress(ValueError): return float(value) return None From b00fc9660b4a2d6595e2c14f6f1d3fa634a293b9 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 4 Aug 2023 13:26:05 +0200 Subject: [PATCH 36/36] Bumped version to 2023.8.1 --- homeassistant/const.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index db7ef9e305a..0568650deb5 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -7,7 +7,7 @@ from typing import Final APPLICATION_NAME: Final = "HomeAssistant" MAJOR_VERSION: Final = 2023 MINOR_VERSION: Final = 8 -PATCH_VERSION: Final = "0" +PATCH_VERSION: Final = "1" __short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__: Final = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 11, 0) diff --git a/pyproject.toml b/pyproject.toml index e4e8fab4b15..fdcd2788b58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "homeassistant" -version = "2023.8.0" +version = "2023.8.1" license = {text = "Apache-2.0"} description = "Open-source home automation platform running on Python 3." readme = "README.rst"