Skip to content

Commit 7575aee

Browse files
fix: adding is_valid function to RoborockBase
1 parent 7e73eb2 commit 7575aee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

roborock/containers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ def __init__(self, data: dict[str, any]) -> None:
257257
if isinstance(data, dict):
258258
self.update(data)
259259

260+
def is_valid(self):
261+
return set(self.keys()) == set([
262+
f for f in dir(self)
263+
if not callable(getattr(self,f)) and not f.startswith('__')
264+
])
265+
260266
def as_dict(self):
261267
return self.__dict__
262268

0 commit comments

Comments
 (0)