483 lines
11 KiB
YAML
483 lines
11 KiB
YAML
# Configure a default setup of Home Assistant (frontend, api, etc)
|
|
alert: !include alert.yaml
|
|
automation: !include automations.yaml
|
|
#cloud:
|
|
config:
|
|
counter:
|
|
dhcp:
|
|
energy:
|
|
frontend:
|
|
themes: !include_dir_merge_named themes
|
|
homeassistant:
|
|
customize: !include customize.yaml
|
|
history:
|
|
http:
|
|
use_x_forwarded_for: true
|
|
trusted_proxies:
|
|
- 192.168.50.100
|
|
- 192.168.50.101
|
|
- 192.168.50.102
|
|
- 192.168.50.103
|
|
- 192.168.50.104
|
|
ip_ban_enabled: false
|
|
login_attempts_threshold: 5
|
|
input_boolean:
|
|
3d_printer_timelapse:
|
|
name: "3D printer timelapse"
|
|
icon: "mdi:camera-burst"
|
|
intercom_button:
|
|
name: "Intercom button helper"
|
|
icon: "mdi:door-closed-lock"
|
|
pc_caffeine:
|
|
name: "PC Caffeine"
|
|
icon: "mdi:desktop-tower-monitor"
|
|
pc_sleeping:
|
|
name: "PC sleeping"
|
|
icon: "mdi:desktop-tower-monitor"
|
|
sleep_mode:
|
|
name: "Sleep mode"
|
|
icon: "mdi:weather-night"
|
|
vacation_mode:
|
|
name: "Vacation mode"
|
|
icon: "mdi:beach"
|
|
vacuum_office:
|
|
name: "Vacuum Office"
|
|
icon: "mdi:chair-rolling"
|
|
vacuum_living_room:
|
|
name: "Vacuum Living room"
|
|
icon: "mdi:sofa"
|
|
vacuum_table_area:
|
|
name: "Vacuum Table area"
|
|
icon: "mdi:table-furniture"
|
|
vacuum_kitchen:
|
|
name: "Vacuum Kitchen"
|
|
icon: "mdi:pot-mix"
|
|
vacuum_hallway:
|
|
name: "Vacuum Hallway"
|
|
icon: "mdi:foot-print"
|
|
vacuum_bedroom:
|
|
name: "Vacuum Bedroom"
|
|
icon: "mdi:bed-empty"
|
|
vacuum_bathroom:
|
|
name: "Vacuum Bathroom"
|
|
icon: "mdi:shower"
|
|
vacuum_vacuumed_today:
|
|
name: "Vacuumed today"
|
|
icon: "mdi:robot-vacuum"
|
|
washing_machine_done:
|
|
name: "Washing machine done"
|
|
icon: "mdi:washing-machine"
|
|
input_datetime:
|
|
alarm:
|
|
name: "Alarm time"
|
|
icon: "mdi:bell-sleep"
|
|
has_date: true
|
|
has_time: true
|
|
day_mode:
|
|
name: "Day mode time"
|
|
icon: "mdi:weather-sunset"
|
|
has_date: false
|
|
has_time: true
|
|
sleep_mode:
|
|
name: "Sleep mode time"
|
|
icon: "mdi:weather-night"
|
|
has_date: false
|
|
has_time: true
|
|
input_number:
|
|
power_price:
|
|
name: "Power Price"
|
|
icon: "mdi:transmission-tower"
|
|
min: 0
|
|
max: 2
|
|
step: 0.01
|
|
unit_of_measurement: zł/kWh
|
|
|
|
input_select:
|
|
home_mode:
|
|
name: Home mode
|
|
options:
|
|
- Day
|
|
- Night
|
|
- Party
|
|
- Away
|
|
icon: "mdi:home"
|
|
music_service:
|
|
name: Music service
|
|
options:
|
|
- Spotify
|
|
- Apple Music
|
|
input_text:
|
|
bathroom_playlist:
|
|
name: Bathroom playlist
|
|
icon: "mdi:folder-music-outline"
|
|
logbook:
|
|
network:
|
|
map:
|
|
media_source:
|
|
mobile_app:
|
|
my:
|
|
person:
|
|
python_script:
|
|
recorder:
|
|
db_url: !secret mysql_url
|
|
scene: !include scenes.yaml
|
|
script: !include scripts.yaml
|
|
ssdp:
|
|
stream:
|
|
sun:
|
|
system_health:
|
|
#tag:
|
|
timer:
|
|
webhook:
|
|
zeroconf:
|
|
zone:
|
|
|
|
#powercalc:
|
|
|
|
# Text to speech
|
|
tts:
|
|
- platform: google_translate
|
|
cache: true
|
|
base_url: http://192.168.60.100:8123
|
|
|
|
group: !include groups.yaml
|
|
|
|
zha:
|
|
custom_quirks_path: /config/zha_custom_quirks
|
|
zigpy_config:
|
|
network:
|
|
channel: 15
|
|
ota:
|
|
ikea_provider: true
|
|
ledvance_provider: true
|
|
otau_directory: /config/ota
|
|
|
|
ios:
|
|
actions:
|
|
- name: "Intercom button"
|
|
background_color: "#000000"
|
|
label:
|
|
text: "Intercom button"
|
|
color: "#ffffff"
|
|
icon:
|
|
icon: door-closed-lock
|
|
color: "#ffffff"
|
|
- name: "Door Lock Toggle"
|
|
background_color: "#000000"
|
|
label:
|
|
text: "Door Lock"
|
|
color: "#ffffff"
|
|
icon:
|
|
icon: lock-open
|
|
color: "#ffffff"
|
|
- name: "Good Night"
|
|
background_color: "#000000"
|
|
label:
|
|
text: "Good Night"
|
|
color: "#9e9e9e"
|
|
icon:
|
|
icon: weather-night
|
|
color: "#9e9e9e"
|
|
- name: "Good Morning"
|
|
background_color: "#000000"
|
|
label:
|
|
text: "Good Morning"
|
|
color: "#ff9800"
|
|
icon:
|
|
icon: weather-sunny
|
|
color: "#ff9800"
|
|
- name: "Leave Home"
|
|
background_color: "#000000"
|
|
label:
|
|
text: "Leave Home"
|
|
color: "#ffffff"
|
|
icon:
|
|
icon: home-export-outline
|
|
color: "#ffffff"
|
|
- name: "Arrive Home"
|
|
background_color: "#000000"
|
|
label:
|
|
text: "Arrive Home"
|
|
color: "#ffffff"
|
|
icon:
|
|
icon: home-import-outline
|
|
color: "#ffffff"
|
|
|
|
alarm_control_panel:
|
|
- platform: manual
|
|
name: Home Alarm
|
|
delay_time: 30
|
|
arming_time: 30
|
|
trigger_time: 120
|
|
|
|
notify:
|
|
- platform: nfandroidtv
|
|
name: Shield
|
|
host: 192.168.60.18
|
|
color: black
|
|
- platform: sms
|
|
name: sms_notification
|
|
recipient: !secret phone_number
|
|
|
|
media_player:
|
|
- platform: androidtv
|
|
name: Bedroom ATV
|
|
device_class: androidtv
|
|
host: 192.168.60.17
|
|
adbkey: "/config/android/adbkey"
|
|
- platform: androidtv
|
|
name: nVidia Shield
|
|
device_class: androidtv
|
|
host: 192.168.60.18
|
|
adbkey: "/config/android/adbkey"
|
|
# exclude_unnamed_apps: true
|
|
apps:
|
|
com.google.android.leanbacklauncher: AndroidTV Launcher
|
|
com.netflix.ninja: Netflix
|
|
com.liskovsoft.smarttubetv.beta: SmartTube
|
|
tv.twitch.android.app: Twitch
|
|
org.mozilla.firefox: Firefox
|
|
com.tvp.vodtv.tv: TVP VOD
|
|
pl.redefine.ipla: IPLA
|
|
com.amazon.amazonvideo.livingroom: Prime Video
|
|
eu.hbogo.androidtv.production: HBO GO
|
|
com.formulaone.production: F1TV
|
|
state_detection_rules:
|
|
'com.netflix.ninja':
|
|
- 'media_session_state'
|
|
'com.amazon.amazonvideo.livingroom':
|
|
- 'media_session_state'
|
|
'eu.hbogo.androidtv.production':
|
|
- 'media_session_state'
|
|
|
|
shell_command:
|
|
pc_poweroff: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@192.168.50.21 sudo /sbin/poweroff'
|
|
pc_suspend: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@192.168.50.21 sudo /usr/sbin/pm-suspend'
|
|
|
|
rest_command:
|
|
octoprint_connect:
|
|
url: 'http://192.168.50.6:5000/api/connection'
|
|
method: post
|
|
content_type: 'application/json'
|
|
headers:
|
|
X-Api-Key: !secret octoprint_api_key
|
|
payload: |
|
|
{
|
|
"command": "connect"
|
|
}
|
|
|
|
waste_collection_schedule:
|
|
sources:
|
|
- name: warszawa19115_pl
|
|
args:
|
|
geolocation_id: 76748040
|
|
|
|
rest:
|
|
calendar:
|
|
- platform: caldav
|
|
url: https://cloud.grondek.pl/remote.php/dav
|
|
username: pgrondek
|
|
password: !secret nextcloud_token
|
|
custom_calendars:
|
|
- name: "Wakeup"
|
|
calendar: "Automations"
|
|
search: "Wakeup"
|
|
- platform: caldav
|
|
url: https://cloud.grondek.pl/remote.php/dav
|
|
username: pgrondek
|
|
password: !secret nextcloud_token
|
|
calendars:
|
|
- "Formula 1"
|
|
|
|
sensor:
|
|
- platform: systemmonitor
|
|
resources:
|
|
- type: memory_use
|
|
- type: memory_free
|
|
- type: swap_use
|
|
- type: swap_free
|
|
- type: load_1m
|
|
- type: load_5m
|
|
- type: load_15m
|
|
- type: processor_use
|
|
- type: processor_temperature
|
|
- type: ipv4_address
|
|
arg: "eth0"
|
|
- type: ipv6_address
|
|
arg: "eth0"
|
|
- type: network_in
|
|
arg: "eth0"
|
|
- type: network_out
|
|
arg: "eth0"
|
|
- type: throughput_network_in
|
|
arg: "eth0"
|
|
- type: throughput_network_out
|
|
arg: "eth0"
|
|
- type: packets_in
|
|
arg: "eth0"
|
|
- type: packets_out
|
|
arg: "eth0"
|
|
# SNMP
|
|
- platform: snmp
|
|
name: "Router eth0 link speed"
|
|
host: 192.168.60.1
|
|
community: home
|
|
baseoid: 1.3.6.1.2.1.2.2.1.5.4
|
|
accept_errors: true
|
|
unit_of_measurement: "Mbits"
|
|
value_template: "{{((value | int) / 1000000) | int}}"
|
|
- platform: snmp
|
|
name: "Router eth1 link speed"
|
|
host: 192.168.60.1
|
|
community: home
|
|
baseoid: 1.3.6.1.2.1.2.2.1.5.5
|
|
accept_errors: true
|
|
unit_of_measurement: "Mbits"
|
|
value_template: "{{((value | int) / 1000000) | int}}"
|
|
- platform: snmp
|
|
name: "Router eth2 link speed"
|
|
host: 192.168.60.1
|
|
community: home
|
|
baseoid: 1.3.6.1.2.1.2.2.1.5.6
|
|
accept_errors: true
|
|
unit_of_measurement: "Mbits"
|
|
value_template: "{{((value | int) / 1000000) | int}}"
|
|
- platform: snmp
|
|
name: "Router eth3 link speed"
|
|
host: 192.168.60.1
|
|
community: home
|
|
baseoid: 1.3.6.1.2.1.2.2.1.5.7
|
|
accept_errors: true
|
|
unit_of_measurement: "Mbits"
|
|
value_template: "{{((value | int) / 1000000) | int}}"
|
|
- platform: snmp
|
|
name: "Router eth4 link speed"
|
|
host: 192.168.60.1
|
|
community: home
|
|
baseoid: 1.3.6.1.2.1.2.2.1.5.8
|
|
accept_errors: true
|
|
unit_of_measurement: "Mbits"
|
|
value_template: "{{((value | int) / 1000000) | int}}"
|
|
- platform: snmp
|
|
version: 2c
|
|
name: "Router uptime"
|
|
host: 192.168.60.1
|
|
community: home
|
|
baseoid: 1.3.6.1.2.1.25.1.1.0
|
|
accept_errors: true
|
|
value_template: >-
|
|
{% set timetick = value | int %}
|
|
{% set minutes = ((timetick % 360000) / 6000) | int%}
|
|
{% set hours = ((timetick % 8640000) / 360000) | int %}
|
|
{% set days = (timetick / 8640000) | int %}
|
|
{%- if timetick < 6000 -%}
|
|
Less than a minute
|
|
{%- else -%}
|
|
{%- if days > 0 -%}
|
|
{%- if days == 1 -%}
|
|
1 day
|
|
{%- else -%}
|
|
{{ days }} days
|
|
{%- endif -%}
|
|
{%- endif -%}
|
|
{%- if hours > 0 -%}
|
|
{%- if days > 0 -%}
|
|
{{ ', ' }}
|
|
{%- endif -%}
|
|
{%- if hours == 1 -%}
|
|
1 hr
|
|
{%- else -%}
|
|
{{ hours }} hrs
|
|
{%- endif -%}
|
|
{%- endif -%}
|
|
{%- if minutes > 0 -%}
|
|
{%- if days > 0 or hours > 0 -%}
|
|
{{ ', ' }}
|
|
{%- endif -%}
|
|
{%- if minutes == 1 -%}
|
|
1 min
|
|
{%- else -%}
|
|
{{ minutes }} min
|
|
{%- endif -%}
|
|
{%- endif -%}
|
|
{%- endif -%}
|
|
# Power
|
|
- platform: integration
|
|
name: "3D printer energy Total"
|
|
unit_prefix: k
|
|
unit_time: h
|
|
source: sensor.3d_printer_electric_consumption_w
|
|
- platform: integration
|
|
source: sensor.rack_outlet_electrical_measurement
|
|
name: "Rack outlet energy Total"
|
|
unit_prefix: k
|
|
unit_time: h
|
|
- platform: integration
|
|
name: "Printer energy Total"
|
|
unit_prefix: k
|
|
unit_time: h
|
|
source: sensor.printer_power
|
|
- platform: integration
|
|
name: "Washing machine energy Total"
|
|
unit_prefix: k
|
|
unit_time: h
|
|
source: sensor.washing_machine_electrical_measurement
|
|
- platform: integration
|
|
name: "Computer energy Total"
|
|
unit_prefix: k
|
|
unit_time: h
|
|
source: sensor.computer_outlet_electrical_measurement
|
|
# # Powercalc
|
|
# - platform: powercalc
|
|
# create_group: Kitchen lights
|
|
# include:
|
|
# area: Kitchen
|
|
# - platform: powercalc
|
|
# create_group: Bedroom lights
|
|
# entities:
|
|
# - entity_id: light.bedroom_1
|
|
# - entity_id: light.bedroom_2
|
|
# - entity_id: light.bed_lamp_left
|
|
# - entity_id: light.bed_lamp_right
|
|
# - entity_id: light.bed_lightstrip
|
|
|
|
binary_sensor:
|
|
- name: Hulk Ping
|
|
platform: ping
|
|
host: 192.168.50.21
|
|
- name: Banner Ping
|
|
platform: ping
|
|
host: 192.168.50.22
|
|
- name: Hawkeye Ping
|
|
platform: ping
|
|
host: 192.168.50.23
|
|
|
|
switch:
|
|
# - platform: zoneminder
|
|
# command_on: Modect
|
|
# command_off: Monitor
|
|
# Wake On LAN
|
|
- platform: wake_on_lan
|
|
name: 'Hulk WoL'
|
|
mac: '24:4b:fe:05:e2:8b'
|
|
broadcast_address: 192.168.50.254
|
|
|
|
cover:
|
|
- platform: group
|
|
name: Bedroom Blinds
|
|
entities:
|
|
- cover.bedroom_blind_left
|
|
- cover.bedroom_blind_right
|
|
- platform: group
|
|
name: Dining Blinds
|
|
entities:
|
|
- cover.dining_blind_left
|
|
- cover.dining_blind_middle
|
|
- cover.dining_blind_right
|
|
- cover.dining_blind_back
|
|
- platform: group
|
|
name: Office Blinds
|
|
entities:
|
|
- cover.office_blind_left
|
|
- cover.office_blind_right
|