Skip to content

ValueError: 6 is not a valid AirSwingLR #61

Open

Description

@andrepcg

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

Activity

  1. thxraph commented on Jan 22, 2023

    @thxraph

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions