360manu / pimatic-mythermostat

Thermostat plugin for the Pimatic
7 stars 3 forks source link

Implement destroy() method for pimatic 0.9 #1

Closed mwittig closed 7 years ago

mwittig commented 8 years ago

For pimatic 0.9 your MyHeatingThermostat device needs to implement a destroy method as follows:

destroy: () ->
  # shutdown device, i.e., remove Timers, de-register event handlers registered with the framework
  super()

I have quickly reviewed your code and as far as I understand this you need to deregister the event callback functions for "variableAdded" and ""variableValueChanged" in _startObservation(). Moreover, you need call @modeSchedule.stop() and @modeManual.stop().

360manu commented 7 years ago

Hello

It's done. Thanks