From 0f6b059e3e576523f0e1940820906b0b241ef5b8 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Sun, 7 Aug 2022 14:51:00 -0600 Subject: [PATCH 01/13] Add debug logging for unknown Notion errors (#76395) * Add debug logging for unknown Notion errors * Remove unused constant * Code review --- homeassistant/components/notion/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/notion/__init__.py b/homeassistant/components/notion/__init__.py index 2a73d12d946..eaa3f55e56c 100644 --- a/homeassistant/components/notion/__init__.py +++ b/homeassistant/components/notion/__init__.py @@ -3,6 +3,8 @@ from __future__ import annotations import asyncio from datetime import timedelta +import logging +import traceback from typing import Any from aionotion import async_get_client @@ -31,7 +33,6 @@ PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR] ATTR_SYSTEM_MODE = "system_mode" ATTR_SYSTEM_NAME = "system_name" -DEFAULT_ATTRIBUTION = "Data provided by Notion" DEFAULT_SCAN_INTERVAL = timedelta(minutes=1) CONFIG_SCHEMA = cv.removed(DOMAIN, raise_if_present=False) @@ -75,6 +76,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: f"There was a Notion error while updating {attr}: {result}" ) from result if isinstance(result, Exception): + if LOGGER.isEnabledFor(logging.DEBUG): + LOGGER.debug("".join(traceback.format_tb(result.__traceback__))) raise UpdateFailed( f"There was an unknown error while updating {attr}: {result}" ) from result From 79b371229dfe9bef26b389545d871a90b04dfd2a Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Sun, 7 Aug 2022 14:27:52 -0600 Subject: [PATCH 02/13] Automatically enable common RainMachine restriction entities (#76405) Automatically enable common delay-related RainMachine entities --- homeassistant/components/rainmachine/binary_sensor.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/homeassistant/components/rainmachine/binary_sensor.py b/homeassistant/components/rainmachine/binary_sensor.py index 6ba374a28ba..80e3b90e577 100644 --- a/homeassistant/components/rainmachine/binary_sensor.py +++ b/homeassistant/components/rainmachine/binary_sensor.py @@ -77,7 +77,6 @@ BINARY_SENSOR_DESCRIPTIONS = ( name="Hourly restrictions", icon="mdi:cancel", entity_category=EntityCategory.DIAGNOSTIC, - entity_registry_enabled_default=False, api_category=DATA_RESTRICTIONS_CURRENT, data_key="hourly", ), @@ -86,7 +85,6 @@ BINARY_SENSOR_DESCRIPTIONS = ( name="Month restrictions", icon="mdi:cancel", entity_category=EntityCategory.DIAGNOSTIC, - entity_registry_enabled_default=False, api_category=DATA_RESTRICTIONS_CURRENT, data_key="month", ), @@ -95,7 +93,6 @@ BINARY_SENSOR_DESCRIPTIONS = ( name="Rain delay restrictions", icon="mdi:cancel", entity_category=EntityCategory.DIAGNOSTIC, - entity_registry_enabled_default=False, api_category=DATA_RESTRICTIONS_CURRENT, data_key="rainDelay", ), @@ -113,7 +110,6 @@ BINARY_SENSOR_DESCRIPTIONS = ( name="Weekday restrictions", icon="mdi:cancel", entity_category=EntityCategory.DIAGNOSTIC, - entity_registry_enabled_default=False, api_category=DATA_RESTRICTIONS_CURRENT, data_key="weekDay", ), From ee2acabcbe3eb96b8b00a7903b8c3df59ea8c7c6 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Sun, 7 Aug 2022 13:44:50 -0600 Subject: [PATCH 03/13] Fix bug where RainMachine entity states don't populate on startup (#76412) --- homeassistant/components/rainmachine/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/rainmachine/__init__.py b/homeassistant/components/rainmachine/__init__.py index 3feeac7a827..07dbe63ca00 100644 --- a/homeassistant/components/rainmachine/__init__.py +++ b/homeassistant/components/rainmachine/__init__.py @@ -437,7 +437,7 @@ class RainMachineEntity(CoordinatorEntity): self.async_write_ha_state() async def async_added_to_hass(self) -> None: - """Handle entity which will be added.""" + """When entity is added to hass.""" await super().async_added_to_hass() self.update_from_latest_data() From f01b0a1a62eef8912cb7ba6dbb19533745cab885 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 7 Aug 2022 10:11:34 -1000 Subject: [PATCH 04/13] Fix Govee 5185 Meat Thermometers with older firmware not being discovered (#76414) --- homeassistant/components/govee_ble/manifest.json | 6 +++++- homeassistant/generated/bluetooth.py | 5 +++++ requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/govee_ble/manifest.json b/homeassistant/components/govee_ble/manifest.json index 624a38ebe9d..eb33df867e1 100644 --- a/homeassistant/components/govee_ble/manifest.json +++ b/homeassistant/components/govee_ble/manifest.json @@ -15,6 +15,10 @@ "manufacturer_id": 18994, "service_uuid": "00008551-0000-1000-8000-00805f9b34fb" }, + { + "manufacturer_id": 818, + "service_uuid": "00008551-0000-1000-8000-00805f9b34fb" + }, { "manufacturer_id": 14474, "service_uuid": "00008151-0000-1000-8000-00805f9b34fb" @@ -24,7 +28,7 @@ "service_uuid": "00008251-0000-1000-8000-00805f9b34fb" } ], - "requirements": ["govee-ble==0.12.6"], + "requirements": ["govee-ble==0.12.7"], "dependencies": ["bluetooth"], "codeowners": ["@bdraco"], "iot_class": "local_push" diff --git a/homeassistant/generated/bluetooth.py b/homeassistant/generated/bluetooth.py index ef8193dad28..d704d00ab8a 100644 --- a/homeassistant/generated/bluetooth.py +++ b/homeassistant/generated/bluetooth.py @@ -41,6 +41,11 @@ BLUETOOTH: list[dict[str, str | int | list[int]]] = [ "manufacturer_id": 18994, "service_uuid": "00008551-0000-1000-8000-00805f9b34fb" }, + { + "domain": "govee_ble", + "manufacturer_id": 818, + "service_uuid": "00008551-0000-1000-8000-00805f9b34fb" + }, { "domain": "govee_ble", "manufacturer_id": 14474, diff --git a/requirements_all.txt b/requirements_all.txt index 5bd396ea124..f2bcb78f8c8 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -760,7 +760,7 @@ googlemaps==2.5.1 goslide-api==0.5.1 # homeassistant.components.govee_ble -govee-ble==0.12.6 +govee-ble==0.12.7 # homeassistant.components.remote_rpi_gpio gpiozero==1.6.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 86b7dbb93e6..551896a46e9 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -561,7 +561,7 @@ google-nest-sdm==2.0.0 googlemaps==2.5.1 # homeassistant.components.govee_ble -govee-ble==0.12.6 +govee-ble==0.12.7 # homeassistant.components.gree greeclimate==1.3.0 From af90159e7cd86bbdc06d1288ba06bebc64b5cef7 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 8 Aug 2022 15:35:45 +0200 Subject: [PATCH 05/13] Fix iCloud listeners (#76437) --- homeassistant/components/icloud/account.py | 4 +++- homeassistant/components/icloud/device_tracker.py | 2 +- homeassistant/components/icloud/sensor.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/icloud/account.py b/homeassistant/components/icloud/account.py index 4dc3c07aba7..d0e3b8059a4 100644 --- a/homeassistant/components/icloud/account.py +++ b/homeassistant/components/icloud/account.py @@ -17,7 +17,7 @@ from pyicloud.services.findmyiphone import AppleDevice from homeassistant.components.zone import async_active_zone from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry from homeassistant.const import ATTR_ATTRIBUTION, CONF_USERNAME -from homeassistant.core import HomeAssistant +from homeassistant.core import CALLBACK_TYPE, HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers.dispatcher import dispatcher_send from homeassistant.helpers.event import track_point_in_utc_time @@ -104,6 +104,8 @@ class IcloudAccount: self._retried_fetch = False self._config_entry = config_entry + self.listeners: list[CALLBACK_TYPE] = [] + def setup(self) -> None: """Set up an iCloud account.""" try: diff --git a/homeassistant/components/icloud/device_tracker.py b/homeassistant/components/icloud/device_tracker.py index 9c2004f0edb..4a63486ae8d 100644 --- a/homeassistant/components/icloud/device_tracker.py +++ b/homeassistant/components/icloud/device_tracker.py @@ -35,7 +35,7 @@ async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: """Set up device tracker for iCloud component.""" - account = hass.data[DOMAIN][entry.unique_id] + account: IcloudAccount = hass.data[DOMAIN][entry.unique_id] tracked = set[str]() @callback diff --git a/homeassistant/components/icloud/sensor.py b/homeassistant/components/icloud/sensor.py index 6e415aa3350..3feb30f078f 100644 --- a/homeassistant/components/icloud/sensor.py +++ b/homeassistant/components/icloud/sensor.py @@ -20,7 +20,7 @@ async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: """Set up device tracker for iCloud component.""" - account = hass.data[DOMAIN][entry.unique_id] + account: IcloudAccount = hass.data[DOMAIN][entry.unique_id] tracked = set[str]() @callback From 8e3f5ec4709e990d80d19b920b9e3d5042e09a9a Mon Sep 17 00:00:00 2001 From: Christopher Bailey Date: Mon, 8 Aug 2022 13:50:41 -0400 Subject: [PATCH 06/13] Bump version of pyunifiprotect to 4.0.12 (#76465) --- homeassistant/components/unifiprotect/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/unifiprotect/manifest.json b/homeassistant/components/unifiprotect/manifest.json index 815b5250e1d..ad18be3dba9 100644 --- a/homeassistant/components/unifiprotect/manifest.json +++ b/homeassistant/components/unifiprotect/manifest.json @@ -3,7 +3,7 @@ "name": "UniFi Protect", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/unifiprotect", - "requirements": ["pyunifiprotect==4.0.11", "unifi-discovery==1.1.5"], + "requirements": ["pyunifiprotect==4.0.12", "unifi-discovery==1.1.5"], "dependencies": ["http"], "codeowners": ["@briis", "@AngellusMortis", "@bdraco"], "quality_scale": "platinum", diff --git a/requirements_all.txt b/requirements_all.txt index f2bcb78f8c8..9c2c2f0eaae 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2003,7 +2003,7 @@ pytrafikverket==0.2.0.1 pyudev==0.23.2 # homeassistant.components.unifiprotect -pyunifiprotect==4.0.11 +pyunifiprotect==4.0.12 # homeassistant.components.uptimerobot pyuptimerobot==22.2.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 551896a46e9..2cf8308fac1 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1354,7 +1354,7 @@ pytrafikverket==0.2.0.1 pyudev==0.23.2 # homeassistant.components.unifiprotect -pyunifiprotect==4.0.11 +pyunifiprotect==4.0.12 # homeassistant.components.uptimerobot pyuptimerobot==22.2.0 From 5213148fa84da1d6c89188c99bd95bb998440085 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 8 Aug 2022 13:06:49 -1000 Subject: [PATCH 07/13] Bump aiohomekit to 1.2.6 (#76488) --- homeassistant/components/homekit_controller/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/homekit_controller/manifest.json b/homeassistant/components/homekit_controller/manifest.json index 5f6b3f92220..fa7bf39d385 100644 --- a/homeassistant/components/homekit_controller/manifest.json +++ b/homeassistant/components/homekit_controller/manifest.json @@ -3,7 +3,7 @@ "name": "HomeKit Controller", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/homekit_controller", - "requirements": ["aiohomekit==1.2.5"], + "requirements": ["aiohomekit==1.2.6"], "zeroconf": ["_hap._tcp.local.", "_hap._udp.local."], "bluetooth": [{ "manufacturer_id": 76, "manufacturer_data_start": [6] }], "dependencies": ["bluetooth", "zeroconf"], diff --git a/requirements_all.txt b/requirements_all.txt index 9c2c2f0eaae..21e2ffd6d68 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -168,7 +168,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.2.5 +aiohomekit==1.2.6 # homeassistant.components.emulated_hue # homeassistant.components.http diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 2cf8308fac1..7c37c01b24d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -152,7 +152,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.2.5 +aiohomekit==1.2.6 # homeassistant.components.emulated_hue # homeassistant.components.http From edac82487d950f3a507d6141a57f63ee942fa7a3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 9 Aug 2022 04:49:17 -1000 Subject: [PATCH 08/13] Fix inkbird ibbq2s that identify with xbbq (#76492) --- homeassistant/components/inkbird/manifest.json | 3 ++- homeassistant/generated/bluetooth.py | 4 ++++ requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/inkbird/manifest.json b/homeassistant/components/inkbird/manifest.json index 686c9bada2d..b0ef08143c2 100644 --- a/homeassistant/components/inkbird/manifest.json +++ b/homeassistant/components/inkbird/manifest.json @@ -7,9 +7,10 @@ { "local_name": "sps" }, { "local_name": "Inkbird*" }, { "local_name": "iBBQ*" }, + { "local_name": "xBBQ*" }, { "local_name": "tps" } ], - "requirements": ["inkbird-ble==0.5.1"], + "requirements": ["inkbird-ble==0.5.2"], "dependencies": ["bluetooth"], "codeowners": ["@bdraco"], "iot_class": "local_push" diff --git a/homeassistant/generated/bluetooth.py b/homeassistant/generated/bluetooth.py index d704d00ab8a..15a822599c6 100644 --- a/homeassistant/generated/bluetooth.py +++ b/homeassistant/generated/bluetooth.py @@ -75,6 +75,10 @@ BLUETOOTH: list[dict[str, str | int | list[int]]] = [ "domain": "inkbird", "local_name": "iBBQ*" }, + { + "domain": "inkbird", + "local_name": "xBBQ*" + }, { "domain": "inkbird", "local_name": "tps" diff --git a/requirements_all.txt b/requirements_all.txt index 21e2ffd6d68..be2ccf21bf8 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -902,7 +902,7 @@ influxdb-client==1.24.0 influxdb==5.3.1 # homeassistant.components.inkbird -inkbird-ble==0.5.1 +inkbird-ble==0.5.2 # homeassistant.components.insteon insteon-frontend-home-assistant==0.2.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 7c37c01b24d..e72cb275136 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -655,7 +655,7 @@ influxdb-client==1.24.0 influxdb==5.3.1 # homeassistant.components.inkbird -inkbird-ble==0.5.1 +inkbird-ble==0.5.2 # homeassistant.components.insteon insteon-frontend-home-assistant==0.2.0 From 6c1597ff9885a10f83a9d7ae74e6bf2e0d5a23f0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 9 Aug 2022 03:35:08 -1000 Subject: [PATCH 09/13] Bump govee-ble to 0.14.0 to fix H5052 sensors (#76497) --- homeassistant/components/govee_ble/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/govee_ble/manifest.json b/homeassistant/components/govee_ble/manifest.json index eb33df867e1..2ba97b95d08 100644 --- a/homeassistant/components/govee_ble/manifest.json +++ b/homeassistant/components/govee_ble/manifest.json @@ -28,7 +28,7 @@ "service_uuid": "00008251-0000-1000-8000-00805f9b34fb" } ], - "requirements": ["govee-ble==0.12.7"], + "requirements": ["govee-ble==0.14.0"], "dependencies": ["bluetooth"], "codeowners": ["@bdraco"], "iot_class": "local_push" diff --git a/requirements_all.txt b/requirements_all.txt index be2ccf21bf8..29d5c25c679 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -760,7 +760,7 @@ googlemaps==2.5.1 goslide-api==0.5.1 # homeassistant.components.govee_ble -govee-ble==0.12.7 +govee-ble==0.14.0 # homeassistant.components.remote_rpi_gpio gpiozero==1.6.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index e72cb275136..bfafbdefe81 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -561,7 +561,7 @@ google-nest-sdm==2.0.0 googlemaps==2.5.1 # homeassistant.components.govee_ble -govee-ble==0.12.7 +govee-ble==0.14.0 # homeassistant.components.gree greeclimate==1.3.0 From e5088d7e84f8b91e0e3b50e4c772694cb5e60d19 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 9 Aug 2022 09:48:48 -1000 Subject: [PATCH 10/13] Fix pairing with HK accessories that do not provide format for vendor chars (#76502) --- .../homekit_controller/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- .../fixtures/schlage_sense.json | 356 ++++++++++++++++++ .../specific_devices/test_schlage_sense.py | 40 ++ 5 files changed, 399 insertions(+), 3 deletions(-) create mode 100644 tests/components/homekit_controller/fixtures/schlage_sense.json create mode 100644 tests/components/homekit_controller/specific_devices/test_schlage_sense.py diff --git a/homeassistant/components/homekit_controller/manifest.json b/homeassistant/components/homekit_controller/manifest.json index fa7bf39d385..3107f5efbb2 100644 --- a/homeassistant/components/homekit_controller/manifest.json +++ b/homeassistant/components/homekit_controller/manifest.json @@ -3,7 +3,7 @@ "name": "HomeKit Controller", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/homekit_controller", - "requirements": ["aiohomekit==1.2.6"], + "requirements": ["aiohomekit==1.2.7"], "zeroconf": ["_hap._tcp.local.", "_hap._udp.local."], "bluetooth": [{ "manufacturer_id": 76, "manufacturer_data_start": [6] }], "dependencies": ["bluetooth", "zeroconf"], diff --git a/requirements_all.txt b/requirements_all.txt index 29d5c25c679..4b0ca28e2a4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -168,7 +168,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.2.6 +aiohomekit==1.2.7 # homeassistant.components.emulated_hue # homeassistant.components.http diff --git a/requirements_test_all.txt b/requirements_test_all.txt index bfafbdefe81..6e79656b69c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -152,7 +152,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.2.6 +aiohomekit==1.2.7 # homeassistant.components.emulated_hue # homeassistant.components.http diff --git a/tests/components/homekit_controller/fixtures/schlage_sense.json b/tests/components/homekit_controller/fixtures/schlage_sense.json new file mode 100644 index 00000000000..04e1923da55 --- /dev/null +++ b/tests/components/homekit_controller/fixtures/schlage_sense.json @@ -0,0 +1,356 @@ +[ + { + "aid": 1, + "services": [ + { + "iid": 1, + "type": "0000003E-0000-1000-8000-0026BB765291", + "characteristics": [ + { + "type": "00000020-0000-1000-8000-0026BB765291", + "iid": 4, + "perms": ["pr"], + "format": "string", + "value": "Schlage ", + "description": "Manufacturer", + "maxLen": 64 + }, + { + "type": "00000021-0000-1000-8000-0026BB765291", + "iid": 5, + "perms": ["pr"], + "format": "string", + "value": "BE479CAM619", + "description": "Model", + "maxLen": 64 + }, + { + "type": "00000023-0000-1000-8000-0026BB765291", + "iid": 6, + "perms": ["pr"], + "format": "string", + "value": "SENSE ", + "description": "Name", + "maxLen": 64 + }, + { + "type": "00000030-0000-1000-8000-0026BB765291", + "iid": 7, + "perms": ["pr"], + "format": "string", + "value": "AAAAAAA000", + "description": "Serial Number", + "maxLen": 64 + }, + { + "type": "00000014-0000-1000-8000-0026BB765291", + "iid": 3, + "perms": ["pw"], + "format": "bool", + "description": "Identify" + }, + { + "type": "00000052-0000-1000-8000-0026BB765291", + "iid": 8, + "perms": ["pr"], + "format": "string", + "value": "004.027.000", + "description": "Firmware Revision", + "maxLen": 64 + }, + { + "type": "00000053-0000-1000-8000-0026BB765291", + "iid": 51, + "perms": ["pr"], + "format": "string", + "value": "1.3.0", + "description": "Hardware Revision", + "maxLen": 64 + }, + { + "type": "00000054-0000-1000-8000-0026BB765291", + "iid": 50, + "perms": ["pr"], + "format": "string", + "value": "002.001.000", + "maxLen": 64 + } + ] + }, + { + "iid": 10, + "type": "7F0DEE73-4A3F-4103-98E6-A46CD301BDFB", + "characteristics": [ + { + "type": "44FF6853-58DB-4956-B298-5F6650DD61F6", + "iid": 25, + "perms": ["pw"], + "format": "data" + }, + { + "type": "CF68C40F-DC6F-4F7E-918C-4C536B643A2B", + "iid": 26, + "perms": ["pr", "pw"], + "format": "uint8", + "value": 0, + "minValue": 0, + "maxValue": 3, + "minStep": 1 + }, + { + "type": "4058C2B8-4545-4E77-B6B7-157C38F9718B", + "iid": 27, + "perms": ["pr", "pw"], + "format": "uint8", + "value": 0, + "minValue": 1, + "maxValue": 5, + "minStep": 1 + }, + { + "type": "B498F4B5-6364-4F79-B5CC-1563ADE070DF", + "iid": 28, + "perms": ["pr", "pw"], + "format": "uint8", + "value": 1, + "minValue": 0, + "maxValue": 1 + }, + { + "type": "AFAE7AD2-8DD3-4B20-BAE0-C0B18B79EDB5", + "iid": 29, + "perms": ["pw"], + "format": "data" + }, + { + "type": "87D91EC6-C508-4CAD-89F1-A21B0BF179A0", + "iid": 30, + "perms": ["pr"], + "format": "data", + "value": "000a00000000000000000000" + }, + { + "type": "4C3E2641-F57F-11E3-A3AC-0800200C9A66", + "iid": 31, + "perms": ["pr"], + "format": "uint64", + "value": 3468600224 + }, + { + "type": "EEC26990-F628-11E3-A3AC-0800200C9A66", + "iid": 32, + "perms": ["pr", "pw"], + "format": "uint8", + "value": 4, + "minValue": 4, + "maxValue": 8, + "minStep": 1 + }, + { + "type": "BCDE3B9E-3963-4123-B24D-42ECCBB3A9C4", + "iid": 33, + "perms": ["pr"], + "format": "data", + "value": "4e6f6e65" + }, + { + "type": "A9464D14-6806-4375-BA53-E14F7E0A6BEE", + "iid": 34, + "perms": ["pr", "pw"], + "format": null, + "value": "ff" + }, + { + "type": "00000023-0000-1000-8000-0026BB765291", + "iid": 35, + "perms": ["pr"], + "format": "string", + "value": "Additional Settings", + "description": "Name", + "maxLen": 64 + }, + { + "type": "63D23C2F-2FBB-45E8-8540-47CC26C517D0", + "iid": 36, + "perms": ["pr"], + "format": "uint8", + "value": 100 + } + ] + }, + { + "iid": 23, + "type": "00000044-0000-1000-8000-0026BB765291", + "characteristics": [ + { + "type": "00000019-0000-1000-8000-0026BB765291", + "iid": 16, + "perms": ["pw"], + "format": "data", + "description": "Lock Control Point" + }, + { + "type": "00000037-0000-1000-8000-0026BB765291", + "iid": 17, + "perms": ["pr"], + "format": "string", + "value": "02.00.00", + "description": "Version", + "maxLen": 64 + }, + { + "type": "0000001F-0000-1000-8000-0026BB765291", + "iid": 18, + "perms": ["pr"], + "format": "data", + "value": "012431443133423434392d423941312d334135392d463042412d3245393030304233453430450208000000000000000003010404030001ff", + "description": "Logs" + }, + { + "type": "00000005-0000-1000-8000-0026BB765291", + "iid": 19, + "perms": ["pr", "pw"], + "format": "bool", + "value": true, + "description": "Audio Feedback" + }, + { + "type": "0000001A-0000-1000-8000-0026BB765291", + "iid": 20, + "perms": ["pr", "pw"], + "format": "uint32", + "value": 0, + "description": "Lock Management Auto Security Timeout", + "unit": "seconds" + }, + { + "type": "00000001-0000-1000-8000-0026BB765291", + "iid": 21, + "perms": ["pr", "pw"], + "format": "bool", + "value": false, + "description": "Administrator Only Access" + } + ] + }, + { + "iid": 30, + "type": "00000045-0000-1000-8000-0026BB765291", + "characteristics": [ + { + "type": "0000001D-0000-1000-8000-0026BB765291", + "iid": 11, + "perms": ["pr", "ev"], + "format": "uint8", + "value": 3, + "description": "Lock Current State", + "minValue": 0, + "maxValue": 3, + "minStep": 1 + }, + { + "type": "0000001E-0000-1000-8000-0026BB765291", + "iid": 12, + "perms": ["pr", "pw", "ev"], + "format": "uint8", + "value": 1, + "description": "Lock Target State", + "minValue": 0, + "maxValue": 1, + "minStep": 1 + }, + { + "type": "00000023-0000-1000-8000-0026BB765291", + "iid": 13, + "perms": ["pr"], + "format": "string", + "value": "Lock Mechanism", + "description": "Name", + "maxLen": 64 + } + ] + }, + { + "iid": 34, + "type": "1F6B43AA-94DE-4BA9-981C-DA38823117BD", + "characteristics": [ + { + "type": "048D8799-695B-4A7F-A7F7-A4A1301587FE", + "iid": 39, + "perms": ["pw"], + "format": "data" + }, + { + "type": "66B7C7FD-95A7-4F89-B0AD-38073A67C46C", + "iid": 40, + "perms": ["pw"], + "format": "data" + }, + { + "type": "507EFC3F-9231-438C-976A-FA04427F1F8F", + "iid": 41, + "perms": ["pw"], + "format": "data" + }, + { + "type": "1DC15719-0882-4BAD-AB0F-9AEAB0600C90", + "iid": 42, + "perms": ["pr"], + "format": "data", + "value": "03" + } + ] + }, + { + "iid": 39, + "type": "00000055-0000-1000-8000-0026BB765291", + "characteristics": [ + { + "type": "0000004C-0000-1000-8000-0026BB765291", + "iid": 45, + "perms": [], + "format": "data", + "description": "Pair Setup" + }, + { + "type": "0000004E-0000-1000-8000-0026BB765291", + "iid": 46, + "perms": [], + "format": "data", + "description": "Pair Verify" + }, + { + "type": "0000004F-0000-1000-8000-0026BB765291", + "iid": 47, + "perms": [], + "format": "uint8", + "description": "Pairing Features" + }, + { + "type": "00000050-0000-1000-8000-0026BB765291", + "iid": 48, + "perms": ["pr", "pw"], + "format": "data", + "value": null, + "description": "Pairing Pairings" + } + ] + }, + { + "iid": 44, + "type": "000000A2-0000-1000-8000-0026BB765291", + "characteristics": [ + { + "type": "00000037-0000-1000-8000-0026BB765291", + "iid": 62, + "perms": ["pr"], + "format": "string", + "value": "02.00.00", + "description": "Version", + "maxLen": 64 + } + ] + } + ] + } +] diff --git a/tests/components/homekit_controller/specific_devices/test_schlage_sense.py b/tests/components/homekit_controller/specific_devices/test_schlage_sense.py new file mode 100644 index 00000000000..d572989e345 --- /dev/null +++ b/tests/components/homekit_controller/specific_devices/test_schlage_sense.py @@ -0,0 +1,40 @@ +"""Make sure that Schlage Sense is enumerated properly.""" + + +from tests.components.homekit_controller.common import ( + HUB_TEST_ACCESSORY_ID, + DeviceTestInfo, + EntityTestInfo, + assert_devices_and_entities_created, + setup_accessories_from_file, + setup_test_accessories, +) + + +async def test_schlage_sense_setup(hass): + """Test that the accessory can be correctly setup in HA.""" + accessories = await setup_accessories_from_file(hass, "schlage_sense.json") + await setup_test_accessories(hass, accessories) + + await assert_devices_and_entities_created( + hass, + DeviceTestInfo( + unique_id=HUB_TEST_ACCESSORY_ID, + name="SENSE ", + model="BE479CAM619", + manufacturer="Schlage ", + sw_version="004.027.000", + hw_version="1.3.0", + serial_number="AAAAAAA000", + devices=[], + entities=[ + EntityTestInfo( + entity_id="lock.sense_lock_mechanism", + friendly_name="SENSE Lock Mechanism", + unique_id="homekit-AAAAAAA000-30", + supported_features=0, + state="unknown", + ), + ], + ), + ) From 972c05eac8385a0b1abc0851f30029dce018ce46 Mon Sep 17 00:00:00 2001 From: Oscar Calvo <2091582+ocalvo@users.noreply.github.com> Date: Tue, 9 Aug 2022 14:46:22 -0600 Subject: [PATCH 11/13] Fix #76283 (#76531) --- homeassistant/components/sms/notify.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/sms/notify.py b/homeassistant/components/sms/notify.py index d076f3625ba..21b48946f55 100644 --- a/homeassistant/components/sms/notify.py +++ b/homeassistant/components/sms/notify.py @@ -20,31 +20,32 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( def get_service(hass, config, discovery_info=None): """Get the SMS notification service.""" - if SMS_GATEWAY not in hass.data[DOMAIN]: - _LOGGER.error("SMS gateway not found, cannot initialize service") - return - - gateway = hass.data[DOMAIN][SMS_GATEWAY][GATEWAY] - if discovery_info is None: number = config[CONF_RECIPIENT] else: number = discovery_info[CONF_RECIPIENT] - return SMSNotificationService(gateway, number) + return SMSNotificationService(hass, number) class SMSNotificationService(BaseNotificationService): """Implement the notification service for SMS.""" - def __init__(self, gateway, number): + def __init__(self, hass, number): """Initialize the service.""" - self.gateway = gateway + + self.hass = hass self.number = number async def async_send_message(self, message="", **kwargs): """Send SMS message.""" + if SMS_GATEWAY not in self.hass.data[DOMAIN]: + _LOGGER.error("SMS gateway not found, cannot send message") + return + + gateway = self.hass.data[DOMAIN][SMS_GATEWAY][GATEWAY] + targets = kwargs.get(CONF_TARGET, [self.number]) smsinfo = { "Class": -1, @@ -67,6 +68,6 @@ class SMSNotificationService(BaseNotificationService): encoded_message["Number"] = target try: # Actually send the message - await self.gateway.send_sms_async(encoded_message) + await gateway.send_sms_async(encoded_message) except gammu.GSMError as exc: _LOGGER.error("Sending to %s failed: %s", target, exc) From 303d8b05d1b79421784e3c06bd8c35c60455d1e7 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 9 Aug 2022 11:08:38 -1000 Subject: [PATCH 12/13] Bump aiohomekit to 1.2.8 (#76532) --- homeassistant/components/homekit_controller/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/homekit_controller/manifest.json b/homeassistant/components/homekit_controller/manifest.json index 3107f5efbb2..cf3069e3b0d 100644 --- a/homeassistant/components/homekit_controller/manifest.json +++ b/homeassistant/components/homekit_controller/manifest.json @@ -3,7 +3,7 @@ "name": "HomeKit Controller", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/homekit_controller", - "requirements": ["aiohomekit==1.2.7"], + "requirements": ["aiohomekit==1.2.8"], "zeroconf": ["_hap._tcp.local.", "_hap._udp.local."], "bluetooth": [{ "manufacturer_id": 76, "manufacturer_data_start": [6] }], "dependencies": ["bluetooth", "zeroconf"], diff --git a/requirements_all.txt b/requirements_all.txt index 4b0ca28e2a4..c5254b61842 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -168,7 +168,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.2.7 +aiohomekit==1.2.8 # homeassistant.components.emulated_hue # homeassistant.components.http diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 6e79656b69c..c64f4506850 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -152,7 +152,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.2.7 +aiohomekit==1.2.8 # homeassistant.components.emulated_hue # homeassistant.components.http From 56c80cd31accf41107fafb5269b0cde3f1ec87fd Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 9 Aug 2022 17:18:19 -0400 Subject: [PATCH 13/13] Bumped version to 2022.8.3 --- 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 dda81cbdc5c..f877b3f34f5 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -7,7 +7,7 @@ from .backports.enum import StrEnum MAJOR_VERSION: Final = 2022 MINOR_VERSION: Final = 8 -PATCH_VERSION: Final = "2" +PATCH_VERSION: Final = "3" __short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__: Final = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0) diff --git a/pyproject.toml b/pyproject.toml index 568607d6d0d..61f6b20af07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "homeassistant" -version = "2022.8.2" +version = "2022.8.3" license = {text = "Apache-2.0"} description = "Open-source home automation platform running on Python 3." readme = "README.rst"