Skip to content

Latest commit

 

History

History
88 lines (52 loc) · 1.39 KB

pool_pump.md

File metadata and controls

88 lines (52 loc) · 1.39 KB

pool_pump

This module implements a pool pump task on Migro switch.

Ewelink Objects

class Ewelink()

Helper class to communicate with the Ewelink server.

PoolPump Objects

class PoolPump(Task,  Sensor)

This task uses a Migro switch to control a pool pump.

update_remaining_runtime

def update_remaining_runtime()

Update the remaining runtime counter.

has_been_running_for

def has_been_running_for()

Return the time the pool pump has been running.

adjust_priority

def adjust_priority()

Update the priority according to the target time

already_ran_today_for

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.

configure_cycle

def configure_cycle(task, power_simulator, weather)

Compute and set the current cycle target time and runtime.

main

def main()

Register and run the pool pump task.