Skip to content

Commit

Permalink
HACK to allow custom component install
Browse files Browse the repository at this point in the history
DO NOT MERGE - REMOVE WHEN SQUASHING
  • Loading branch information
roysjosh committed Jan 19, 2022
1 parent 1edcdfa commit 9ab0b98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions homeassistant/components/homekit_controller/connection.py
Expand Up @@ -12,7 +12,7 @@
from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import ServicesTypes

from homeassistant.const import ATTR_VIA_DEVICE
from homeassistant.const import ATTR_VIA_DEVICE, MAJOR_VERSION
from homeassistant.core import callback
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.entity import DeviceInfo
Expand Down Expand Up @@ -244,9 +244,13 @@ def async_create_devices(self):
manufacturer=info.value(CharacteristicsTypes.MANUFACTURER, ""),
model=info.value(CharacteristicsTypes.MODEL, ""),
sw_version=info.value(CharacteristicsTypes.FIRMWARE_REVISION, ""),
hw_version=info.value(CharacteristicsTypes.HARDWARE_REVISION, ""),
#hw_version=info.value(CharacteristicsTypes.HARDWARE_REVISION, ""),
)

# XXX XXX XXX temporary hack to allow "custom component" install on 2021.X.Y
if MAJOR_VERSION >= 2022:
device_info["hw_version"] = info.value(CharacteristicsTypes.HARDWARE_REVISION, "")

if accessory.aid != 1:
# Every pairing has an accessory 1
# It *doesn't* have a via_device, as it is the device we are connecting to
Expand Down

0 comments on commit 9ab0b98

Please sign in to comment.