Add hw info for Shelly devices (#62643)

* Add hw info for Shelly devices

* Better rappresentation

* Remove date parsing

* Added model as requested
pull/63093/head
Simone Chemelli 2021-12-30 20:08:29 +01:00 committed by GitHub
parent 849dc0e53a
commit 34e732ebc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -433,6 +433,7 @@ class BlockDeviceWrapper(update_coordinator.DataUpdateCoordinator):
manufacturer="Shelly",
model=aioshelly.const.MODEL_NAMES.get(self.model, self.model),
sw_version=sw_version,
hw_version=f"gen{self.device.gen} ({self.model})",
configuration_url=f"http://{self.entry.data[CONF_HOST]}",
)
self.device_id = entry.id
@ -717,6 +718,7 @@ class RpcDeviceWrapper(update_coordinator.DataUpdateCoordinator):
manufacturer="Shelly",
model=aioshelly.const.MODEL_NAMES.get(self.model, self.model),
sw_version=sw_version,
hw_version=f"gen{self.device.gen} ({self.model})",
configuration_url=f"http://{self.entry.data[CONF_HOST]}",
)
self.device_id = entry.id