This module implements a pool pump task on Migro switch.
class Ewelink()
Helper class to communicate with the Ewelink server.
class PoolPump(Task, Sensor)
This task uses a Migro switch to control a pool pump.
def update_remaining_runtime()
Update the remaining runtime counter.
def has_been_running_for()
Return the time the pool pump has been running.
def adjust_priority()
Update the priority according to the target time
def already_ran_today_for(min_power=.5)
Return how long the pool pump has been running today based.
It uses the database power table.
def configure_cycle(task, power_simulator, weather)
Compute and set the current cycle target time and runtime.
def main()
Register and run the pool pump task.