Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: 6 is not a valid AirSwingLR #61

Open
andrepcg opened this issue Jul 7, 2022 · 1 comment
Open

ValueError: 6 is not a valid AirSwingLR #61

andrepcg opened this issue Jul 7, 2022 · 1 comment

Comments

@andrepcg
Copy link

andrepcg commented Jul 7, 2022

Weirdly enough I have a AirSwingLR value of 6. This is happening for a AC unit with model CS-MTZ16WKE. The weirdest part is that I have other AC units of the same model and they work fine

--- get_device()
--- raw beginning ---
{"dryTempMin":-1,"modeAvlList":{"autoMode":1,"fanMode":1},"airSwingLR":true,"nanoe":false,"autoMode":true,"autoSwingUD":false,"ecoNavi":false,"heatTempMax":-1,"temperatureUnit":0,"iAutoX":false,"coolTempMin":-1,"autoTempMin":-1,"quietMode":true,"powerfulMode":true,"timestamp":1657229036041,"fanMode":false,"coolMode":true,"summerHouse":0,"coolTempMax":-1,"permission":3,"dryMode":true,"nanoeList":{"visualizationShow":0},"nanoeStandAlone":false,"heatMode":true,"fanSpeedMode":-1,"dryTempMax":-1,"autoTempMax":-1,"fanDirectionMode":-1,"ecoFunction":0,"heatTempMin":-1,"pairedFlg":false,"parameters":{"ecoFunctionData":0,"airSwingLR":6,"nanoe":0,"lastSettingMode":0,"ecoNavi":0,"ecoMode":2,"operationMode":2,"fanAutoMode":2,"errorStatus":-255,"temperatureSet":24.0,"fanSpeed":0,"iAuto":0,"airQuality":0,"insideTemperature":22,"outTemperature":25,"operate":1,"airDirection":1,"actualNanoe":0,"airSwingUD":2}}
--- raw ending    ---
ValueError: 6 is not a valid AirSwingLR

We should probably not crash for unrecognized values

@thxraph
Copy link

thxraph commented Jan 22, 2023

just add another constant in constant.py (on my system it's /usr/local/lib/python3.9/dist-packages/pcomfortcloud/constant.py

class AirSwingLR(Enum):
Auto = -1
Left = 1
LeftMid = 5
Mid = 2
RightMid = 4
Right = 0
Swing = 6

that should fix it....
some models have more options and that's it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants