Convert Roomba hw_version to string for device registry (#172497)

This commit is contained in:
Franck Nijhof
2026-05-28 23:13:08 +02:00
committed by GitHub
parent 86542b8ad0
commit 6eeeac46f3
+5 -1
View File
@@ -29,7 +29,11 @@ class IRobotEntity(Entity):
model=self.vacuum_state.get("sku"),
name=str(self.vacuum_state.get("name")),
sw_version=self.vacuum_state.get("softwareVer"),
hw_version=self.vacuum_state.get("hardwareRev"),
hw_version=(
str(hw_rev)
if (hw_rev := self.vacuum_state.get("hardwareRev")) is not None
else None
),
)
if mac_address := self.vacuum_state.get("hwPartsRev", {}).get(