- alias: End Quick Clean Mode description: Turns off Quick Clean Mode after 8 hours triggers: - minutes: /10 trigger: time_pattern conditions: - condition: state entity_id: input_boolean.quick_clean_mode state: 'on' - condition: template value_template: '{{ now() >= (states(''input_datetime.quick_clean_start'') | as_datetime + timedelta(hours=8)) }} ' actions: - target: entity_id: input_boolean.quick_clean_mode action: input_boolean.turn_off data: {} mode: single - alias: ✅ Flow Restored - Clear Alert description: '' triggers: - entity_id: sensor.pool_flow_monitor_flow_gpm above: 0.1 trigger: numeric_state conditions: - condition: numeric_state entity_id: sensor.esp32_pool_pump_pump_actual_rpm above: 0 actions: - data: notification_id: pool_pump_flow_warning action: persistent_notification.dismiss - alias: Gallon Counter Increment description: '' triggers: - minutes: /1 trigger: time_pattern conditions: - condition: numeric_state entity_id: sensor.pool_flow_monitor_flow_gpm above: 0 actions: - repeat: count: '{{ states(''sensor.pool_flow_monitor_flow_gpm'') | float | round(0) }}' sequence: - target: entity_id: counter.gallons_this_cycle action: counter.increment data: {} - alias: Pool Pump Manual Override - Turn Off description: Reset manual override when pump turns off triggers: - entity_id: switch.esp32_pool_pump_pool_pump_run to: 'off' trigger: state conditions: [] actions: - target: entity_id: input_boolean.pool_pump_manual action: input_boolean.turn_off data: {} mode: single - alias: Pool Pump Manual Override - Turn On description: Set manual override if pump is turned on outside of automation triggers: - entity_id: switch.esp32_pool_pump_pool_pump_run to: 'on' trigger: state conditions: - condition: not conditions: - condition: time after: 07:59:00 before: 08:01:00 - condition: state entity_id: input_boolean.pool_pump_manual state: 'off' actions: - target: entity_id: input_boolean.pool_pump_manual action: input_boolean.turn_on data: {} mode: single - alias: Pump Cycle End - Stop at 18000 Gallons description: '' triggers: - entity_id: counter.gallons_this_cycle above: 17999 trigger: numeric_state conditions: - condition: time after: 08:00:00 actions: - target: entity_id: switch.esp32_pool_pump_pool_pump_run action: switch.turn_off data: {} mode: single - alias: Pump Cycle Start - 3000 RPM at 8 AM description: '' triggers: - at: 08:00:00 trigger: time conditions: - condition: state entity_id: timer.quick_clean_timer state: idle actions: - target: entity_id: switch.esp32_pool_pump_pool_pump_run action: switch.turn_on data: {} - target: entity_id: number.esp32_pool_pump_pump_target_rpm data: value: 3000 action: number.set_value mode: single - alias: Pump Cycle Step 2 - 2450 RPM at 6000 Gallons description: '' triggers: - entity_id: counter.gallons_this_cycle above: 5999 below: 12000 trigger: numeric_state conditions: - condition: time after: 08:00:00 - condition: state entity_id: timer.quick_clean_timer state: idle actions: - target: entity_id: number.esp32_pool_pump_pump_target_rpm data: value: 2450 action: number.set_value mode: single - alias: Pump Cycle Step 3 - 1700 RPM at 12000 Gallons description: '' triggers: - entity_id: counter.gallons_this_cycle above: 11999 below: 18000 trigger: numeric_state conditions: - condition: time after: 08:00:00 - condition: state entity_id: timer.quick_clean_timer state: idle actions: - target: entity_id: number.esp32_pool_pump_pump_target_rpm data: value: 1700 action: number.set_value mode: single - alias: ⚠️ Pump Running But No Flow (3+ Minutes) description: Alerts if RPM > 0 but flow is zero for more than 3 minutes. triggers: - entity_id: - sensor.esp32_pool_pump_pump_actual_rpm - sensor.pool_flow_monitor_flow_gpm for: 00:03:00 trigger: state conditions: - condition: numeric_state entity_id: sensor.esp32_pool_pump_pump_actual_rpm above: 0 - condition: numeric_state entity_id: sensor.pool_flow_monitor_flow_gpm below: 0.1 actions: - data: title: ⚠️ Pool Pump Flow Warning message: The pump is running (RPM > 0) but flow is 0 GPM. Please check for clogs, closed valves, or airlocks. action: notify.persistent_notification mode: single - alias: Reset Gallons After Pump Idle description: '' triggers: - entity_id: - sensor.pool_flow_monitor_flow_gpm - sensor.esp32_pool_pump_pump_actual_rpm to: '0' for: 00:02:00 trigger: state conditions: - condition: numeric_state entity_id: sensor.pool_flow_monitor_flow_gpm below: 0.1 - condition: numeric_state entity_id: sensor.esp32_pool_pump_pump_actual_rpm below: 1 actions: - target: entity_id: counter.gallons_this_cycle action: counter.reset data: {} mode: single - alias: Start Quick Clean Mode description: Activates Quick Clean Mode for 8 hours triggers: - event_type: call_service event_data: domain: input_button service: press service_data: entity_id: input_button.quick_clean_button trigger: event - trigger: webhook allowed_methods: - POST - PUT - GET local_only: true webhook_id: INSERT WEBHOOK ID HERE conditions: [] actions: - target: entity_id: input_datetime.quick_clean_start data: datetime: '{{ now().isoformat() }}' action: input_datetime.set_datetime - target: entity_id: input_boolean.quick_clean_mode action: input_boolean.turn_on data: {} - action: script.pool_pump_quick_clean data: {} - action: timer.start metadata: {} data: {} target: entity_id: timer.quick_clean_timer - action: counter.reset metadata: {} data: {} target: entity_id: counter.gallons_this_cycle mode: single - alias: Update Pump Stage Start Time description: '' triggers: - entity_id: counter.gallons_this_cycle below: 1 trigger: numeric_state - entity_id: counter.gallons_this_cycle above: 5999 below: 6001 trigger: numeric_state - entity_id: counter.gallons_this_cycle above: 11999 below: 12001 trigger: numeric_state - entity_id: counter.gallons_this_cycle above: 17999 trigger: numeric_state conditions: - condition: numeric_state entity_id: sensor.esp32_pool_pump_pump_actual_rpm above: 0 actions: - target: entity_id: input_datetime.stage_start_time data: datetime: '{{ now().isoformat() }}' action: input_datetime.set_datetime mode: single