lostfields / python-panasonic-comfort-cloud

A python module for reading and changing status of panasonic climate devices through Panasonic Comfort Cloud app api
MIT License
69 stars 40 forks source link

Expand number of airSwingUD modes #16

Open eckhart opened 5 years ago

eckhart commented 5 years ago

Apparently, there are more modes than those listed in constants.py for airSwingLR, at least for my device. According to the app the Air swing (Left-Right) was center + 1 to the left.

Traceback (most recent call last): File "/usr/local/bin/pcomfortcloud", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/pcomfortcloud/__main__.py", line 187, in main print_result( session.get_device(device['id']) ) File "/usr/local/lib/python2.7/dist-packages/pcomfortcloud/session.py", line 239, in get_device 'parameters': self._read_parameters(_json['parameters']) File "/usr/local/lib/python2.7/dist-packages/pcomfortcloud/session.py", line 374, in _read_parameters value['airSwingHorizontal'] = constants.AirSwingLR(parameters['airSwingLR']) File "/usr/lib/python2.7/dist-packages/enum/__init__.py", line 338, in __call__ return cls.__new__(cls, value) File "/usr/lib/python2.7/dist-packages/enum/__init__.py", line 651, in __new__ raise ValueError("%s is not a valid %s" % (value, cls.__name__)) ValueError: 5 is not a valid AirSwingLR

lostfields commented 5 years ago

Ok, we have to track down what differs from your model by using dump, but I can see it's hard to track down everything so I can try to make a diff tool or something.

nimikko commented 4 years ago

@lostfields Are you sure that the AirSwingLR values are correct as I went them trough on my unit and go the following values:

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

So they are the same but in reverse order and the one with 3 is 5 at least on my heatpump.

com-xuonghuynh commented 4 years ago

Some AC model don't have Air swing LR only Up and Down