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:
|
||||
homeassistant.components.shell_command: debug
|
||||
homeassistant.components.amcrest: error
|
||||
homeassistant.components.switch.pihole_temp_disable: critical
|
||||
zigpy.util: error
|
||||
|
||||
#
|
||||
|
||||
@@ -144,44 +144,45 @@ cards:
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
- type: entities
|
||||
title: Pi Hole
|
||||
title: Pi-Hole
|
||||
entities:
|
||||
- script.disable_pi_hole_5
|
||||
- script.enable_pi_hole
|
||||
- switch.pihole_temp_disable
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: "custom:mini-graph-card"
|
||||
- type: custom:mini-graph-card
|
||||
name: Total queries
|
||||
font_size: 75
|
||||
icon: "mdi:radio-tower"
|
||||
icon: mdi:radio-towe
|
||||
line_color: var(--accent-color)
|
||||
line_width: 8
|
||||
entities:
|
||||
- sensor.pi_hole_dns_queries_today
|
||||
- type: "custom:mini-graph-card"
|
||||
- type: custom:mini-graph-card
|
||||
name: Queries blocked
|
||||
font_size: 75
|
||||
icon: "mdi:stop-circle"
|
||||
icon: mdi:stop-circle
|
||||
line_color: var(--accent-color)
|
||||
line_width: 8
|
||||
entities:
|
||||
- sensor.pi_hole_ads_blocked_today
|
||||
- entity: sensor.pi_hole_ads_blocked_today
|
||||
icon: mdi:pi-hole
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: "custom:mini-graph-card"
|
||||
- type: custom:mini-graph-card
|
||||
name: Percent blocked
|
||||
font_size: 75
|
||||
icon: "mdi:percent"
|
||||
icon: mdi:percent
|
||||
line_color: var(--accent-color)
|
||||
line_width: 8
|
||||
entities:
|
||||
- sensor.pi_hole_ads_percentage_blocked_today
|
||||
|
||||
- type: "custom:mini-graph-card"
|
||||
- type: custom:mini-graph-card
|
||||
name: Seen clients
|
||||
font_size: 75
|
||||
icon: "mdi:devices"
|
||||
icon: mdi:devices
|
||||
line_color: var(--accent-color)
|
||||
line_width: 8
|
||||
entities:
|
||||
|
||||
@@ -36,18 +36,16 @@ switch:
|
||||
turn_off:
|
||||
service: script.security_camera_off
|
||||
|
||||
script:
|
||||
disable_pi_hole_5:
|
||||
alias: Security · Disable Pi Hole for 5 mins
|
||||
sequence:
|
||||
- service: pi_hole.disable
|
||||
data:
|
||||
duration: 5
|
||||
enable_pi_hole:
|
||||
alias: Security · Enable Pi Hole
|
||||
sequence:
|
||||
- service: pi_hole.enable
|
||||
- platform: command_line
|
||||
switches:
|
||||
pihole_temp_disable:
|
||||
friendly_name: "Pi-Hole pause for 5 mins"
|
||||
command_on: !secret pihole_disable_5
|
||||
command_off: !secret pihole_enable
|
||||
command_state: !secret pihole_status
|
||||
value_template: '{{ value_json.status == "disabled" }}'
|
||||
|
||||
script:
|
||||
security_camera_on:
|
||||
alias: Security camera · Turn on
|
||||
sequence:
|
||||
|
||||
Reference in New Issue
Block a user