Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelli74 committed Dec 22, 2024
1 parent f5ce571 commit 37b9b78
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions homeassistant/components/shelly/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,17 +554,19 @@ def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None:
super().__init__(coordinator, f"{BLU_TRV_IDENTIFIER}:{id_}")
self._id = id_
self._config = coordinator.device.config[f"{BLU_TRV_IDENTIFIER}:{id_}"]
device_id: str = self._config["addr"]
self._attr_unique_id = f"{device_id}-{self.key}"
ble_addr: str = self._config["addr"]
self._attr_unique_id = f"{ble_addr}-{self.key}"
name = self._config["name"] or f"shellyblutrv-{ble_addr.replace(":", "")}"
self._attr_name = name
model_id = self._config.get("local_name")
self._attr_device_info = DeviceInfo(
connections={(CONNECTION_BLUETOOTH, device_id)},
identifiers={(DOMAIN, device_id)},
connections={(CONNECTION_BLUETOOTH, ble_addr)},
identifiers={(DOMAIN, ble_addr)},
via_device=(DOMAIN, self.coordinator.mac),
manufacturer="Shelly",
model=BLU_TRV_MODEL_NAME.get(model_id),
model_id=model_id,
name=self._config["name"] or f"shelyblutrv-{device_id.replace(":", "")}",
name=name,
)
self._humidity_key: str | None = None
# Check if there is a corresponding humidity key for the thermostat ID
Expand Down

0 comments on commit 37b9b78

Please sign in to comment.