Skip to content

Commit

Permalink
Need to keep the update API call in memory so this works with asyncio
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyphillips committed Jul 6, 2021
1 parent f25f070 commit 3383955
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pychonet/HomeAirConditioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 3383955

Please sign in to comment.