From 3383955b4f004db5d53c55369ee908c60760b14c Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Tue, 6 Jul 2021 19:04:20 +1000 Subject: [PATCH] Need to keep the update API call in memory so this works with asyncio --- pychonet/HomeAirConditioner.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pychonet/HomeAirConditioner.py b/pychonet/HomeAirConditioner.py index af67b08..c1d4ec5 100644 --- a/pychonet/HomeAirConditioner.py +++ b/pychonet/HomeAirConditioner.py @@ -208,6 +208,7 @@ def __init__(self, netif, instance = 0x1): self.eojgc = 0x01 # Air conditioner-related device group self.eojcc = 0x30 # Home air conditioner class EchonetInstance.__init__(self, self.eojgc, self.eojcc, instance, netif) + self.update_data = {} # self.available_functions = EPC_CODE[self.eojgc][self.eojcc]['functions'] @@ -249,8 +250,8 @@ def update(self): returned_json_data.update(_30B0(data['rx_edt'])) elif data['rx_epc'] == 0xBE: #mode returned_json_data.update(_30BE(data['rx_edt'])) - - return returned_json_data + self.update_data = returned_json_data + return self.update_data """ GetOperationaTemperature get the temperature that has been set in the HVAC diff --git a/setup.py b/setup.py index ba62b99..e902e2d 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='pychonet', - version='1.0.2', + version='1.0.3', author='Scott Phillips', author_email='jrh@example.com', packages=['pychonet', 'pychonet.lib'],