fredericvl / py-agua-iot

py-agua-iot provides controlling heating devices connected via the IOT Agua platform of Micronova
Apache License 2.0
31 stars 16 forks source link

Cannot retrieve gas_temperature value #50

Closed BertSchel closed 1 year ago

BertSchel commented 1 year ago

Hi, i use the Nordic Fire 2.0 app where I can see my gas temperature and for some reason i cannot get the gas_temperature using the python-module, the rest works fine really.

The script i try:

from py_agua_iot import agua_iot

connection = agua_iot("https://nordicfire.agua-iot.com/", "132678", "someguy@gmail.com", "passpass", "93908fb3-5e14-4850-a922-dd1a762f4bc7", brand_id="1")
device = connection.devices[0]

for device in connection.devices:
    print(device.gas_temperature)

The output it gives:

Traceback (most recent call last):
  File "/Users/someguy/Downloads/klad/klad.py", line 7, in <module>
    print(device.gas_temperature)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/py_agua_iot/__init__.py", line 600, in gas_temperature
    return float(self.__get_information_item('temp_gas_flue_get'))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/py_agua_iot/__init__.py", line 430, in __get_information_item
    formula = self.__register_map_dict[item]['formula']
              ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'temp_gas_flue_get'

When I retrieve and print out values for each property this is a part of the output:

...
air_temperature: 19.0
alarms: 192
gas_temperature: 'temp_gas_flue_get'
...

Any thoughts on how I can fix this? Would like to log that temperature. Thx