Add networking tab. Add IFTTT for alexa. Add Mikrotik integration

This commit is contained in:
2020-03-27 22:27:06 +02:00
parent e42b91487c
commit fba7077168
9 changed files with 94 additions and 65 deletions
+2 -2
View File
@@ -93,9 +93,9 @@ updater:
logger:
default: warning
logs:
homeassistant.components.shell_command: debug
homeassistant.components.shell_command: error
homeassistant.components.amcrest: error
homeassistant.components.switch.pihole_temp_disable: critical
homeassistant.components.switch.pihole_temp_disable: error
zigpy.util: error
#
+55
View File
@@ -0,0 +1,55 @@
title: Network
path: network
icon: "mdi:server-network"
badges: []
cards:
- type: entities
entities:
- sensor.fast_com_download
- type: vertical-stack
cards:
- type: entities
title: Pi-Hole
entities:
- switch.pihole_temp_disable
- type: horizontal-stack
cards:
- type: custom:mini-graph-card
name: Total queries
font_size: 75
icon: mdi:radio-towe
line_color: var(--accent-color)
line_width: 8
entities:
- sensor.pi_hole_dns_queries_today
- type: custom:mini-graph-card
name: Queries blocked
font_size: 75
icon: mdi:stop-circle
line_color: var(--accent-color)
line_width: 8
entities:
- entity: sensor.pi_hole_ads_blocked_today
icon: mdi:pi-hole
- type: horizontal-stack
cards:
- type: custom:mini-graph-card
name: Percent blocked
font_size: 75
icon: mdi:percent
line_color: var(--accent-color)
line_width: 8
entities:
- sensor.pi_hole_ads_percentage_blocked_today
- type: custom:mini-graph-card
name: Seen clients
font_size: 75
icon: mdi:devices
line_color: var(--accent-color)
line_width: 8
entities:
- sensor.pi_hole_seen_clients
@@ -8,6 +8,7 @@ cards:
show_header_toggle: false
entities:
- automation.youtube_download_latest_pds
- automation.ifttt_call_service
- type: custom:fold-entity-row
head:
@@ -140,50 +141,3 @@ cards:
entity: sensor.motion_1_power
- type: custom:battery-entity
entity: sensor.motion_2_power
- type: vertical-stack
cards:
- type: entities
title: Pi-Hole
entities:
- switch.pihole_temp_disable
- type: horizontal-stack
cards:
- type: custom:mini-graph-card
name: Total queries
font_size: 75
icon: mdi:radio-towe
line_color: var(--accent-color)
line_width: 8
entities:
- sensor.pi_hole_dns_queries_today
- type: custom:mini-graph-card
name: Queries blocked
font_size: 75
icon: mdi:stop-circle
line_color: var(--accent-color)
line_width: 8
entities:
- entity: sensor.pi_hole_ads_blocked_today
icon: mdi:pi-hole
- type: horizontal-stack
cards:
- type: custom:mini-graph-card
name: Percent blocked
font_size: 75
icon: mdi:percent
line_color: var(--accent-color)
line_width: 8
entities:
- sensor.pi_hole_ads_percentage_blocked_today
- type: custom:mini-graph-card
name: Seen clients
font_size: 75
icon: mdi:devices
line_color: var(--accent-color)
line_width: 8
entities:
- sensor.pi_hole_seen_clients
+11
View File
@@ -0,0 +1,11 @@
automation:
- alias: IFTTT · Call service
trigger:
platform: event
event_type: ifttt_webhook_received
event_data:
action: "call-service"
action:
- service_template: "{{ trigger.event.data.service }}"
data_template:
entity_id: "{{ trigger.event.data.entity_id }}"
+21
View File
@@ -0,0 +1,21 @@
fastdotcom:
mikrotik:
- name: Mikrotik
host: !secret mikrotik_host
username: !secret mikrotik_username
password: !secret mikrotik_password
pi_hole:
- host: !secret pihole_host
api_key: !secret pihole_api_key
switch:
- 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" }}'
-13
View File
@@ -8,10 +8,6 @@ amcrest:
- motion_detected
- online
pi_hole:
- host: !secret pihole_host
api_key: !secret pihole_api_key
binary_sensor:
- platform: template
sensors:
@@ -36,15 +32,6 @@ switch:
turn_off:
service: script.security_camera_off
- 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
+4 -3
View File
@@ -16,6 +16,7 @@ views:
- !include lovelace/04_bathroom.yaml
- !include lovelace/05_hallway.yaml
- !include lovelace/06_media.yaml
- !include lovelace/07_system.yaml
- !include lovelace/08_covid_19.yaml
- !include lovelace/09_test.yaml
- !include lovelace/07_network.yaml
- !include lovelace/08_system.yaml
- !include lovelace/09_covid_19.yaml
- !include lovelace/10_test.yaml