- fixed heater
This commit is contained in:
+2
-1
@@ -17,7 +17,7 @@ class HeaterTask(ATask):
|
|||||||
self.pulse_counter = 0
|
self.pulse_counter = 0
|
||||||
|
|
||||||
def actor(self, y):
|
def actor(self, y):
|
||||||
self.power_soll = max(0, 250 + self.device.get_power_max() * y)
|
self.power_soll = max(0, self.device.get_power_max() * y)
|
||||||
|
|
||||||
def on_changed_active(self, is_activated):
|
def on_changed_active(self, is_activated):
|
||||||
asyncio.create_task(self.send({'Activate': int(is_activated)}))
|
asyncio.create_task(self.send({'Activate': int(is_activated)}))
|
||||||
@@ -52,6 +52,7 @@ class HeaterTask(ATask):
|
|||||||
if self.pulse_counter >= pulse_period_count:
|
if self.pulse_counter >= pulse_period_count:
|
||||||
self.pulse_counter = 0
|
self.pulse_counter = 0
|
||||||
|
|
||||||
|
print ("power_soll = {}".format(self.power_soll))
|
||||||
if self.power_soll < self.device.get_power_min():
|
if self.power_soll < self.device.get_power_min():
|
||||||
if self.power_soll == 0 or self.pulse_counter >= on_count:
|
if self.power_soll == 0 or self.pulse_counter >= on_count:
|
||||||
self.device.set_power(0)
|
self.device.set_power(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user