Use DeviceInfo in sharkiq (#58519)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-10-27 12:35:53 +02:00 committed by GitHub
parent 9d3c75510f
commit c1dc2bbf28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,15 +123,15 @@ class SharkVacuumEntity(CoordinatorEntity, StateVacuumEntity):
@property
def device_info(self) -> DeviceInfo:
"""Device info dictionary."""
return {
"identifiers": {(DOMAIN, self.serial_number)},
"name": self.name,
"manufacturer": SHARK,
"model": self.model,
"sw_version": self.sharkiq.get_property_value(
return DeviceInfo(
identifiers={(DOMAIN, self.serial_number)},
manufacturer=SHARK,
model=self.model,
name=self.name,
sw_version=self.sharkiq.get_property_value(
Properties.ROBOT_FIRMWARE_VERSION
),
}
)
@property
def supported_features(self) -> int: