File tree Expand file tree Collapse file tree
tests/devices/traits/b01/q10/__snapshots__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ def as_dict(self) -> dict[str, Any]:
166166 """Return the trait data as a dictionary."""
167167 result : dict [str , Any ] = {}
168168 for name , value in self .__dict__ .items ():
169- if isinstance (value , RoborockBase ):
169+ if isinstance (value , RoborockBase ) and not name . startswith ( "_" ) :
170170 result [name ] = value .as_dict ()
171171 if hasattr (self , "map" ) and hasattr (self .map , "as_dict" ):
172172 result ["map" ] = self .map .as_dict ()
Original file line number Diff line number Diff line change 1313calibration, path placement and overlay placement remain inside the renderer.
1414"""
1515
16+ import dataclasses
1617import logging
1718from dataclasses import dataclass , field
1819from typing import Any
@@ -160,8 +161,6 @@ def _render(self) -> None:
160161
161162 def as_dict (self , exclude : set [str ] | None = None ) -> dict [str , Any ]:
162163 """Return the trait data as a dictionary, excluding large binary data."""
163- import dataclasses
164-
165164 exclude_set = exclude or set ()
166165 data = {
167166 "rooms" : [dataclasses .asdict (room ) for room in self .rooms ],
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ def reset(self) -> None:
104104 "name" ,
105105 "productId" ,
106106 "ipAddress" ,
107+ "ipAdress" ,
107108 "wifiName" ,
108109 "lat" ,
109110 "long" ,
Original file line number Diff line number Diff line change 11# serializer version: 1
22# name: test_q10_properties_as_dict_and_diagnostic_data
33 dict({
4- '_map_dps': dict({
5- }),
64 'child_lock': dict({
75 'childLock': False,
86 }),
124122 }),
125123 '80': 0,
126124 '81': dict({
127- 'ipAdress': '192.168.1.52 ',
125+ 'ipAdress': '**REDACTED** ',
128126 'mac': '**REDACTED**',
129127 'signal': -42,
130128 'wifiName': '**REDACTED**',
381379 ]),
382380 }),
383381 'traits': dict({
384- '_map_dps': dict({
385- }),
386382 'child_lock': dict({
387383 'childLock': False,
388384 }),
415411 }),
416412 'network_info': dict({
417413 'netInfo': dict({
418- 'ipAdress': '1.1.1.2 ',
414+ 'ipAdress': '**REDACTED** ',
419415 'mac': '**REDACTED**',
420416 'signal': -50,
421417 'wifiName': '**REDACTED**',
471467# ---
472468# name: test_q10_properties_as_dict_empty
473469 dict({
474- '_map_dps': dict({
475- }),
476470 'child_lock': dict({
477471 }),
478472 'consumable': dict({
You can’t perform that action at this time.
0 commit comments