Skip to content

Commit 6eeeac4

Browse files
authored
Convert Roomba hw_version to string for device registry (home-assistant#172497)
1 parent 86542b8 commit 6eeeac4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

homeassistant/components/roomba/entity.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ def __init__(self, roomba, blid) -> None:
2929
model=self.vacuum_state.get("sku"),
3030
name=str(self.vacuum_state.get("name")),
3131
sw_version=self.vacuum_state.get("softwareVer"),
32-
hw_version=self.vacuum_state.get("hardwareRev"),
32+
hw_version=(
33+
str(hw_rev)
34+
if (hw_rev := self.vacuum_state.get("hardwareRev")) is not None
35+
else None
36+
),
3337
)
3438

3539
if mac_address := self.vacuum_state.get("hwPartsRev", {}).get(

0 commit comments

Comments
 (0)