diff --git a/homeassistant/components/roomba/entity.py b/homeassistant/components/roomba/entity.py index aaa2c8963736..3f4559f2188e 100644 --- a/homeassistant/components/roomba/entity.py +++ b/homeassistant/components/roomba/entity.py @@ -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(