Example #1
0
def SensorUpdated(sender, **kwargs):
  CheckThermostats.delay(sensor=kwargs["instance"])
  if kwargs["instance"].temperature is not None:
    kwargs["instance"].temperature = float(kwargs["instance"].temperature)

  publish(
      "pimostat", "sensor-%d" % kwargs["instance"].pk,
      {"temperature": kwargs["instance"].temperature})
Example #2
0
def ThermostatUpdated(sender, **kwargs):
  CheckThermostats.delay()