FilipDem / Domoticz-NEST-plugin

NEST Plugin for Domoticz using the Google credentials.
13 stars 4 forks source link

KeyError: 'Postal_code' #38

Closed ganq76 closed 1 year ago

ganq76 commented 1 year ago

Hello, I don't have Postal Code in json : Nest Thermostat XXXXX: {'Target_temperature': 17.03543, 'Current_temperature': 18.21999, 'Temperature_scale': 'C', 'Humidity': 63, 'Eco': False, 'Heating': False, 'Target_mode': 'heat', 'Target_temperature_low': 20.0, 'Target_temperature_high': 24.0, 'Where': 'Bedroom', 'Auto_away': -1}

so i get a error : Traceback (most recent call last): File "nest.py", line 499, in info = thermostat.GetOutsideTempHum() File "nest.py", line 355, in GetOutsideTempHum if not ('Postal_code' in NestInfo and 'Country_code' in NestInfo) and (NestInfo['Postal_code'] == '' or NestInfo['Country_code'] == ''): KeyError: 'Postal_code'

FilipDem commented 1 year ago

Did you enter the address of the NEST Thermostat (in the NEST)? There was somewhere another issue with somebody (don't know the details anymore) and he simply hadn't entered his/her address...

ganq76 commented 1 year ago

That was the pb. I passed the afternoon to modify files (and I sucess) because I thunk it was linked to the version of the thermostat, but not !

Thanks a lot !