mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-07 17:34:42 +00:00
Add switch for pihole
This commit is contained in:
@@ -95,6 +95,7 @@ logger:
|
|||||||
logs:
|
logs:
|
||||||
homeassistant.components.shell_command: debug
|
homeassistant.components.shell_command: debug
|
||||||
homeassistant.components.amcrest: error
|
homeassistant.components.amcrest: error
|
||||||
|
homeassistant.components.switch.pihole_temp_disable: critical
|
||||||
zigpy.util: error
|
zigpy.util: error
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -144,44 +144,45 @@ cards:
|
|||||||
- type: vertical-stack
|
- type: vertical-stack
|
||||||
cards:
|
cards:
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Pi Hole
|
title: Pi-Hole
|
||||||
entities:
|
entities:
|
||||||
- script.disable_pi_hole_5
|
- switch.pihole_temp_disable
|
||||||
- script.enable_pi_hole
|
|
||||||
- type: horizontal-stack
|
- type: horizontal-stack
|
||||||
cards:
|
cards:
|
||||||
- type: "custom:mini-graph-card"
|
- type: custom:mini-graph-card
|
||||||
name: Total queries
|
name: Total queries
|
||||||
font_size: 75
|
font_size: 75
|
||||||
icon: "mdi:radio-tower"
|
icon: mdi:radio-towe
|
||||||
line_color: var(--accent-color)
|
line_color: var(--accent-color)
|
||||||
line_width: 8
|
line_width: 8
|
||||||
entities:
|
entities:
|
||||||
- sensor.pi_hole_dns_queries_today
|
- sensor.pi_hole_dns_queries_today
|
||||||
- type: "custom:mini-graph-card"
|
- type: custom:mini-graph-card
|
||||||
name: Queries blocked
|
name: Queries blocked
|
||||||
font_size: 75
|
font_size: 75
|
||||||
icon: "mdi:stop-circle"
|
icon: mdi:stop-circle
|
||||||
line_color: var(--accent-color)
|
line_color: var(--accent-color)
|
||||||
line_width: 8
|
line_width: 8
|
||||||
entities:
|
entities:
|
||||||
- sensor.pi_hole_ads_blocked_today
|
- entity: sensor.pi_hole_ads_blocked_today
|
||||||
|
icon: mdi:pi-hole
|
||||||
|
|
||||||
- type: horizontal-stack
|
- type: horizontal-stack
|
||||||
cards:
|
cards:
|
||||||
- type: "custom:mini-graph-card"
|
- type: custom:mini-graph-card
|
||||||
name: Percent blocked
|
name: Percent blocked
|
||||||
font_size: 75
|
font_size: 75
|
||||||
icon: "mdi:percent"
|
icon: mdi:percent
|
||||||
line_color: var(--accent-color)
|
line_color: var(--accent-color)
|
||||||
line_width: 8
|
line_width: 8
|
||||||
entities:
|
entities:
|
||||||
- sensor.pi_hole_ads_percentage_blocked_today
|
- sensor.pi_hole_ads_percentage_blocked_today
|
||||||
|
|
||||||
- type: "custom:mini-graph-card"
|
- type: custom:mini-graph-card
|
||||||
name: Seen clients
|
name: Seen clients
|
||||||
font_size: 75
|
font_size: 75
|
||||||
icon: "mdi:devices"
|
icon: mdi:devices
|
||||||
line_color: var(--accent-color)
|
line_color: var(--accent-color)
|
||||||
line_width: 8
|
line_width: 8
|
||||||
entities:
|
entities:
|
||||||
|
|||||||
@@ -36,18 +36,16 @@ switch:
|
|||||||
turn_off:
|
turn_off:
|
||||||
service: script.security_camera_off
|
service: script.security_camera_off
|
||||||
|
|
||||||
script:
|
- platform: command_line
|
||||||
disable_pi_hole_5:
|
switches:
|
||||||
alias: Security · Disable Pi Hole for 5 mins
|
pihole_temp_disable:
|
||||||
sequence:
|
friendly_name: "Pi-Hole pause for 5 mins"
|
||||||
- service: pi_hole.disable
|
command_on: !secret pihole_disable_5
|
||||||
data:
|
command_off: !secret pihole_enable
|
||||||
duration: 5
|
command_state: !secret pihole_status
|
||||||
enable_pi_hole:
|
value_template: '{{ value_json.status == "disabled" }}'
|
||||||
alias: Security · Enable Pi Hole
|
|
||||||
sequence:
|
|
||||||
- service: pi_hole.enable
|
|
||||||
|
|
||||||
|
script:
|
||||||
security_camera_on:
|
security_camera_on:
|
||||||
alias: Security camera · Turn on
|
alias: Security camera · Turn on
|
||||||
sequence:
|
sequence:
|
||||||
|
|||||||
Reference in New Issue
Block a user