Add Roborock to strict typing (#120379)
This commit is contained in:
parent
0d2aeb846f
commit
69e0227682
5 changed files with 22 additions and 8 deletions
|
@ -167,9 +167,9 @@ class RoborockSwitch(RoborockEntity, SwitchEntity):
|
|||
@property
|
||||
def is_on(self) -> bool | None:
|
||||
"""Return True if entity is on."""
|
||||
return (
|
||||
self.get_cache(self.entity_description.cache_key).value.get(
|
||||
self.entity_description.attribute
|
||||
)
|
||||
== 1
|
||||
status = self.get_cache(self.entity_description.cache_key).value.get(
|
||||
self.entity_description.attribute
|
||||
)
|
||||
if status is None:
|
||||
return status
|
||||
return bool(status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue