Separated on/off-messages from temperature readings

This commit is contained in:
Sebastian 2019-03-26 19:28:34 +01:00
parent 8a7ec74538
commit 2538b01a48

View File

@ -56,6 +56,7 @@ def on_message(client, userdata, message):
thermostatCantina.target_temperature=temperature_off thermostatCantina.target_temperature=temperature_off
else: else:
thermostatCantina.target_temperature=round(float(msg),1) thermostatCantina.target_temperature=round(float(msg),1)
sendReadings()
def sendReadings(): def sendReadings():
log.debug('read target temperature from thermostats') log.debug('read target temperature from thermostats')