From c9359daa6ee6910f468d68d00e5c5feb3c457733 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Tue, 3 Feb 2026 10:58:12 -0500 Subject: [PATCH] Add automation to re-enable Pi-hole after 60 minutes of being off in pihole_ha.yaml --- config/packages/pihole_ha.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/config/packages/pihole_ha.yaml b/config/packages/pihole_ha.yaml index 4cb94732..a3cda3d5 100644 --- a/config/packages/pihole_ha.yaml +++ b/config/packages/pihole_ha.yaml @@ -7,6 +7,7 @@ # Keep Pi-hole blocking on docker_10 and docker_14 in lockstep. # ------------------------------------------------------------------- # Notes: Uses switch.pi_hole + switch.pi_hole_2 from the Pi-hole integration. +# Notes: Auto re-enables Pi-hole after 60 minutes of being off. ###################################################################### automation: @@ -61,3 +62,20 @@ automation: target: entity_id: switch.pi_hole mode: single + + - id: pihole_auto_reenable_after_60_minutes + alias: "Pi-hole HA - Auto Re-enable After 60 Minutes" + description: "Turn Pi-hole back on after it has been off for 60 minutes." + trigger: + - platform: state + entity_id: + - switch.pi_hole + - switch.pi_hole_2 + to: "off" + for: + hours: 1 + action: + - service: switch.turn_on + data: + entity_id: "{{ trigger.entity_id }}" + mode: single