|
@@ -142,7 +142,8 @@ async def start_on_ratio_mode(device_id: str, target: float, period_time: int):
|
|
|
on_ratio = controller.calculate_on_ratio(delta_on, delta_off)
|
|
|
on_range = round_half_up(period_time * on_ratio)
|
|
|
off_range = period_time - on_range
|
|
|
- logger.debug(f'on time: {on_range}, off time: {off_range}, on ratio: {on_ratio}')
|
|
|
+ logger.debug(f'life count: {life_count}, {device_id}, on time: {on_range}, off time: {off_range}, '
|
|
|
+ f'on ratio: {on_ratio}, delta_on: {delta_on * 900}, delta_off: {delta_off * 900}')
|
|
|
|
|
|
await send_instructions(device_id, switch, speed, water_valve)
|
|
|
await asyncio.sleep(on_range)
|