Skip to content

Commit

Permalink
Remove migration of unique id for entities already correct.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschamm committed Jan 29, 2023
1 parent b1d85d8 commit d856d70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
7 changes: 0 additions & 7 deletions custom_components/bosch_shc/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):

binary_sensor = session.device_helper.smoke_detection_system
if binary_sensor:
await async_migrate_to_new_unique_id(
hass=hass,
platform=Platform.BINARY_SENSOR,
device=binary_sensor,
attr_name=None,
old_unique_id=f"{binary_sensor.root_device_id}_{binary_sensor.serial}",
)
entities.append(
SmokeDetectionSystemSensor(
device=binary_sensor,
Expand Down
11 changes: 2 additions & 9 deletions custom_components/bosch_shc/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
SUPPORT_PRESET_MODE,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, Platform
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS

from .const import DATA_SESSION, DOMAIN, LOGGER
from .entity import SHCEntity, async_migrate_to_new_unique_id
from .entity import SHCEntity


async def async_setup_entry(hass, config_entry, async_add_entities):
Expand All @@ -25,13 +25,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):

for climate in session.device_helper.climate_controls:
room_id = climate.room_id
await async_migrate_to_new_unique_id(
hass=hass,
platform=Platform.CLIMATE,
device=climate,
attr_name=None,
old_unique_id=f"{climate.root_device_id}_{climate.serial}",
)
entities.append(
ClimateControl(
device=climate,
Expand Down

0 comments on commit d856d70

Please sign in to comment.