]> mj.ucw.cz Git - home-hw.git/blobdiff - auto/burrow-auto
Auto: Meditation mode turned off
[home-hw.git] / auto / burrow-auto
index 8e1a338629d2e76c2ca38bdd7454e400281d4c1c..b876223dae335efe839a193bb07c71600fa0d8db 100755 (executable)
@@ -154,7 +154,9 @@ def auto_loft_fan():
     lt = st.get_sensor_avg("temp/loft")
     out = st.get_sensor_avg('air/outside-intake')
 
-    if lt is None or out is None:
+    if False and st.hour in range(21, 24) or st.hour in range(6, 10):
+        fs = 0
+    elif lt is None or out is None:
         fs = 0
     elif st.hysteresis('lf_out_cold', out, 5, 6) < 0:
         fs = 0
@@ -238,6 +240,11 @@ def auto_air():
 
     debug("Air: house_warm={} house_hot={} ac_on={} outside_warmer={} mixed_warmer={}".format(house_warm, house_hot, ac_on, outside_warmer, mixed_warmer))
 
+    if ac_on != 0:
+        st.set("air/ac-on", "{} {}".format(1 if ac_on > 0 else 0, int(st.now)))
+    else:
+        st.set("air/ac-on", "")
+
 
 def auto_aircon():
     global st