Skip to content

Commit

Permalink
Add traceback for error in #63 and only print the error one time
Browse files Browse the repository at this point in the history
  • Loading branch information
jimboca committed Dec 25, 2020
1 parent 4d93235 commit 025aaa5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nodes/Thermostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def __init__(self, controller, primary, address, thermostatId, name, revData, fu
self.do_weather = None
self.weather = None
self.forcast = None
self._gcde = {}
# We track our driver values because we need the value before it's been pushed.
self.driver = dict()
super(Thermostat, self).__init__(controller, primary, address, name)
Expand Down Expand Up @@ -269,7 +270,10 @@ def getClimateDict(self,name):
if name == cref['climateRef']:
LOGGER.info('{}:getClimateDict: Returning {}'.format(self.address,cref))
return cref
LOGGER.error('{}:getClimateDict: Unknown climateRef name {}'.format(self.address,name))
# Only show the error one time.
if not cref in self._gcde:
self._gcde[cref] = True
LOGGER.error('{}:getClimateDict: Unknown climateRef name {} See: https://github.com/Einstein42/udi-ecobee-poly/issues/63'.format(self.address,name),exc_info=True)
return None

def getSensorAddressOld(self,sdata):
Expand Down

0 comments on commit 025aaa5

Please sign in to comment.