Files
sarah/config/packages/modules/network.yaml
T
2020-11-18 23:06:28 +02:00

157 lines
4.9 KiB
YAML

#
# ─── INTEGRATIONS ───────────────────────────────────────────────────────────────
#
# Depends on integrations (config flow):
# - https://www.home-assistant.io/integrations/mikrotik
# - https://www.home-assistant.io/integrations/synologydsm
# - https://www.home-assistant.io/integrations/zha
# https://www.home-assistant.io/integrations/fastdotcom
fastdotcom:
scan_interval:
minutes: 90
# https://www.home-assistant.io/integrations/speedtestdotnet
speedtestdotnet:
scan_interval:
minutes: 60
# https://www.home-assistant.io/integrations/wake_on_lan
wake_on_lan:
# https://www.home-assistant.io/docs/mqtt
mqtt:
broker: !secret mqtt_ip
client_id: homeassistant
username: !secret mqtt_username
password: !secret mqtt_password
# https://www.home-assistant.io/integrations/pi_hole
pi_hole:
- host: !secret pihole_host
api_key: !secret pihole_api_key
homekit:
safe_mode: true
filter:
include_entities:
- light.living_room_main
- light.light_avatar_small_2
- light.living_room_ambient
- light.master_bedroom_main
- light.bedside
- light.bed_led
- light.hallway_entrance
- light.hallway_main
- light.tuya_kitchen
- binary_sensor.kitchen_motion_occupancy
- binary_sensor.hallway_motion_occupany
- binary_sensor.trisensor_motion
- binary_sensor.multisensor_motion
- sensor.bedroom_weather_temperature
- sensor.living_room_radiator_temperature
- sensor.trisensor_temperature
- sensor.multisensor_6_temperature
- sensor.hallway_motion_illuminance
- sensor.kitchen_motion_illuminance
- sensor.purifier_humidity
- sensor.bedroom_weather_humidity
- climate.living_room_radiator_mode
- climate.toshiba_ac
- media_player.master_bedroom
- switch.desk_outlet
- switch.titanium
- fan.philips_airpurifier
entity_config:
light.light_avatar_small_2:
name: PC
binary_sensor.kitchen_motion_occupancy:
linked_battery_sensor: sensor.kitchen_motion_battery
low_battery_threshold: 20
name: Kitchen Motion
binary_sensor.hallway_motion_occupany:
linked_battery_sensor: sensor.hallway_motion_battery
name: Hallway Motion
binary_sensor.trisensor_motion:
linked_battery_sensor: sensor.trisensor_battery_level
name: Desk Motion
binary_sensor.multisensor_motion:
linked_battery_sensor: sensor.multisensor_6_battery_level
name: Living room Motion
media_player.master_bedroom:
feature_list:
- feature: play_pause
- feature: play_stop
- feature: toggle_mute
switch.desk_outlet:
type: outlet
#
# ─── ENTITIES ───────────────────────────────────────────────────────────────────
#
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" }}'
binary_sensor:
- platform: command_line
name: "Pi-Hole enabled"
command: !secret pihole_status
payload_on: "enabled"
payload_off: "disabled"
value_template: '{{ value_json.status }}'
sensor:
- platform: mqtt
name: "Zigbee2MQTT Networkmap"
# if you change base_topic of Zigbee2mqtt, change state_topic accordingly
state_topic: "z2m_deconz/bridge/networkmap/raw"
value_template: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
# again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly
json_attributes_topic: z2m_deconz/bridge/networkmap/raw
- platform: mqtt
name: "Zigbee2MQTT Devices count"
availability_topic: "z2m_deconz/bridge/state"
state_topic: "z2m_deconz/bridge/config/devices"
value_template: "{{ value_json | count }}"
icon: "mdi:counter"
- platform: mqtt
name: "Router 1 LQI"
state_topic: "z2m_deconz/router_1"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:signal"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
script:
zigbee2mqtt_get_device_count:
alias: "Network · Zigbee2MQTT · Get device count"
icon: "mdi:reload"
sequence:
service: mqtt.publish
data:
topic: "z2m_deconz/bridge/config/devices/get"
homeassistant:
customize:
switch.pihole_temp_disable:
icon: mdi:pause-circle-outline
sensor.pi_hole_seen_clients:
icon: mdi:devices
sensor.pi_hole_ads_percentage_blocked_today:
icon: mdi:percent
sensor.pi_hole_ads_blocked_today:
icon: mdi:close-box-outline
sensor.pi_hole_dns_queries_today:
icon: mdi:radio-tower