]> mj.ucw.cz Git - home-hw.git/blobdiff - auto/burrow-auto
Auto: Broadcast computed AC state
[home-hw.git] / auto / burrow-auto
index 8e1a338629d2e76c2ca38bdd7454e400281d4c1c..7aaca0f74da5a77011c14007872a5987e2d2ae47 100755 (executable)
@@ -238,13 +238,18 @@ 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
     tii = st.get_sensor_avg('air/inside-intake')
     tie = st.get_sensor_avg('air/inside-exhaust')
     house_hot = st.hysteresis('ac_house_hot', tii, 23.5, 24)
-    outside_hot = st.hysteresis('ac_outside_hot', tie, 24, 25)
+    outside_hot = st.hysteresis('ac_outside_hot', tie, 23, 24)
     ac_on = ac_is_on()
 
     if house_hot > 0 and outside_hot > 0: