Set DeviceInfo.model_id in Shelly integration (#122040)

This commit is contained in:
Maciej Bieniek 2024-07-17 09:04:40 +02:00 committed by GitHub
parent 0aea9b0edb
commit 14ec7e5f76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,9 +145,10 @@ class ShellyCoordinatorBase[_DeviceT: BlockDevice | RpcDevice](
name=self.name,
connections={(CONNECTION_NETWORK_MAC, self.mac)},
manufacturer="Shelly",
model=MODEL_NAMES.get(self.model, self.model),
model=MODEL_NAMES.get(self.model),
model_id=self.model,
sw_version=self.sw_version,
hw_version=f"gen{get_device_entry_gen(self.entry)} ({self.model})",
hw_version=f"gen{get_device_entry_gen(self.entry)}",
configuration_url=f"http://{get_host(self.entry.data[CONF_HOST])}:{get_http_port(self.entry.data)}",
)
self.device_id = device_entry.id