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, 24.5, 25)
- house_hot = st.hysteresis('ac_house_hot', tii, 23, 24)
+ house_hot = st.hysteresis('ac_house_hot', tii, 23.5, 24)
outside_hot = st.hysteresis('ac_outside_hot', tie, 20, 21)
ac_on = ac_is_on()
if not hasattr(st, 'last_ac_change'):
st.last_ac_change = st.now
- if st.last_ac_change >= st.now - 600:
- action = "wait"
+ if st.last_ac_change >= st.now - 300: # FIXME: Increase
+ action = f"wait({st.now - st.last_ac_change})"
elif ac_on == 0:
action = "need-data"
elif ac_on != want_ac: