|
|
|
|
@ -5,44 +5,6 @@
|
|
|
|
|
# https://www.vcloudinfo.com/2019/03/revisiting-the-pi-on-pi-day-with-home-assistant.html
|
|
|
|
|
# YouTube Video - https://youtu.be/woA88DFlH5c
|
|
|
|
|
#-------------------------------------------
|
|
|
|
|
pi_hole:
|
|
|
|
|
host: 192.168.10.11:80
|
|
|
|
|
location: admin
|
|
|
|
|
ssl: false
|
|
|
|
|
verify_ssl: false
|
|
|
|
|
|
|
|
|
|
sensor:
|
|
|
|
|
# - platform: pi_hole
|
|
|
|
|
# host: 192.168.10.11:80
|
|
|
|
|
# location: admin
|
|
|
|
|
# ssl: false
|
|
|
|
|
# verify_ssl: false
|
|
|
|
|
# monitored_conditions:
|
|
|
|
|
# - ads_blocked_today
|
|
|
|
|
# - ads_percentage_today
|
|
|
|
|
# - dns_queries_today
|
|
|
|
|
# - domains_being_blocked
|
|
|
|
|
# - queries_cached
|
|
|
|
|
# - queries_forwarded
|
|
|
|
|
# - unique_clients
|
|
|
|
|
# - unique_domains
|
|
|
|
|
|
|
|
|
|
- platform: template
|
|
|
|
|
sensors:
|
|
|
|
|
carlopihole:
|
|
|
|
|
friendly_name: 'Carlo-PiHole'
|
|
|
|
|
entity_id: []
|
|
|
|
|
value_template: "{{ 'Online' if is_state('device_tracker.carlopihole', 'home') else 'Offline' }}"
|
|
|
|
|
|
|
|
|
|
# Pi-Hole switch
|
|
|
|
|
switch:
|
|
|
|
|
- platform: command_line
|
|
|
|
|
switches:
|
|
|
|
|
pihole_temp_disable:
|
|
|
|
|
command_on: "curl -X GET 'http://192.168.10.11/admin/api.php?enable&auth='"
|
|
|
|
|
command_off: "curl -X GET 'http://192.168.10.11/admin/api.php?disable=3600&auth='"
|
|
|
|
|
# command_state: "curl -X GET 'http://192.168.10.11/admin/api.php?status'| grep enabled"
|
|
|
|
|
# value_template: "{{ value_json.status == 'enabled' }}
|
|
|
|
|
|
|
|
|
|
automation:
|
|
|
|
|
- alias: PiHole Daily stats Tweet!
|
|
|
|
|
|