Skip to content

Commit 7fc33e3

Browse files
fix: fixes after first test
1 parent 32879ce commit 7fc33e3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

custom_components/robovac/robovac.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class RoboVac(TuyaDevice):
1111
""""""
1212

1313
def __init__(self, model_code, *args, **kwargs):
14-
if model_code not in ROBOVAC_MODELS[model_code] is None:
14+
if model_code not in ROBOVAC_MODELS:
1515
raise ModelNotSupportedException(
1616
"Model {} is not supported".format(model_code)
1717
)
@@ -26,20 +26,20 @@ def getRoboVacFeatures(self):
2626
return self.model_details.robovac_features
2727

2828
def getFanSpeeds(self):
29-
return self.model_details.commands[RobovacCommand.FAN_SPEED].values
29+
return self.model_details.commands[RobovacCommand.FAN_SPEED]["values"]
3030

3131
def getModes(self):
32-
return self.model_details.commands[RobovacCommand.MODE].values
32+
return self.model_details.commands[RobovacCommand.MODE]["values"]
3333

3434
def getSupportedCommands(self):
3535
return list(self.model_details.commands.keys())
3636

3737
def getCommandCodes(self):
3838
command_codes = {}
39-
for key, value in self.model_details.commands:
39+
for key, value in self.model_details.commands.items():
4040
if isinstance(value, dict):
41-
command_codes[key] = value.code
41+
command_codes[key] = str(value["code"])
4242
else:
43-
command_codes[key] = value
43+
command_codes[key] = str(value)
4444

4545
return command_codes

0 commit comments

Comments
 (0)