380 lines
10 KiB
YAML
380 lines
10 KiB
YAML
homeassistant:
|
|
# Name of the location where Home Assistant is running
|
|
name: Hogar
|
|
# Location required to calculate the time the sun rises and sets
|
|
latitude: !secret hogar_latitud
|
|
longitude: !secret hogar_longitud
|
|
# Impacts weather/sunrise data (altitude above sea level in meters)
|
|
elevation: !secret hogar_elevacion
|
|
# metric for Metric, imperial for Imperial
|
|
unit_system: metric
|
|
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
time_zone: !secret hogar_zonahoraria
|
|
# Customization file
|
|
customize: !include customize.yaml
|
|
packages: !include_dir_named packages
|
|
|
|
# Show links to resources in log and frontend
|
|
#introduction:
|
|
|
|
# Enables the frontend
|
|
frontend:
|
|
|
|
# Enables configuration UI
|
|
config:
|
|
|
|
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
|
|
http:
|
|
base_url: alacenaha.duckdns.org:8123
|
|
|
|
# Checks for available updates
|
|
# Note: This component will send some information about your system to
|
|
# the developers to assist with development of Home Assistant.
|
|
# For more information, please see:
|
|
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
|
|
updater:
|
|
# Optional, allows Home Assistant developers to focus on popular components.
|
|
# include_used_components: true
|
|
|
|
# Discover some devices automatically
|
|
discovery:
|
|
ignore:
|
|
- yeelight
|
|
|
|
# Allows you to issue voice commands from the frontend in enabled browsers
|
|
conversation:
|
|
|
|
# Enables support for tracking state changes over time
|
|
history:
|
|
# Sustituye a history
|
|
recorder:
|
|
purge_keep_days: 90
|
|
db_url: !secret db_url
|
|
|
|
# View all events in a logbook
|
|
logbook:
|
|
|
|
logger:
|
|
default: warning
|
|
logs:
|
|
miflora: debug
|
|
btlewrap: debug
|
|
bluepy: debug
|
|
homeassistant.components.mqtt: error
|
|
homeassistant.components.zwave: error
|
|
homeassistant.components.yeelight: debug
|
|
|
|
weather:
|
|
|
|
# Enables a map showing the location of tracked devices
|
|
map:
|
|
system_health:
|
|
# Track the sun
|
|
sun:
|
|
|
|
# Sensors
|
|
#sensor:
|
|
# Weather prediction
|
|
# - platform: yr
|
|
|
|
#mqtt: !include mqtt.yaml
|
|
# Text to speech
|
|
tts:
|
|
- platform: google
|
|
|
|
# Cloud
|
|
cloud:
|
|
|
|
group: !include groups.yaml
|
|
automation: !include automations.yaml
|
|
script: !include scripts.yaml
|
|
|
|
switch:
|
|
- platform: rest
|
|
name: "General Luces"
|
|
scan_interval: 30
|
|
resource: http://10.10.1.153/relay/0
|
|
body_on: 'turn=on'
|
|
body_off: 'turn=off'
|
|
timeout: 60
|
|
is_on_template: '{{ value_json.ison == true}}'
|
|
headers:
|
|
content-type: application/x-www-form-urlencoded
|
|
|
|
- platform: rest
|
|
name: "General Persianas"
|
|
scan_interval: 30
|
|
resource: http://10.10.1.153/relay/1
|
|
body_on: 'turn=on'
|
|
body_off: 'turn=off'
|
|
timeout : 60
|
|
is_on_template: '{{ value_json.ison == true}}'
|
|
headers:
|
|
content-type: application/x-www-form-urlencoded
|
|
|
|
- platform: rest
|
|
name: "General Caldera"
|
|
scan_interval: 30
|
|
resource: http://10.10.1.153/relay/2
|
|
body_on: 'turn=on'
|
|
body_off: 'turn=off'
|
|
timeout : 60
|
|
is_on_template: '{{ value_json.ison == true}}'
|
|
headers:
|
|
content-type: application/x-www-form-urlencoded
|
|
|
|
- platform: rest
|
|
name: "Coche Eléctrico"
|
|
scan_interval: 30
|
|
resource: http://10.10.1.153/relay/3
|
|
body_on: 'turn=on'
|
|
body_off: 'turn=off'
|
|
timeout : 60
|
|
is_on_template: '{{ value_json.ison == true}}'
|
|
headers:
|
|
content-type: application/x-www-form-urlencoded
|
|
|
|
- platform: xiaomi_miio
|
|
name: Xiaomi Strip 1
|
|
host: 10.10.1.145
|
|
token: fe3b88c2fdf9d129e30c8cd945ed4461
|
|
|
|
- platform: xiaomi_miio
|
|
name: Xiaomi Strip 2
|
|
host: 10.10.1.146
|
|
token: 3e1fea7691567cf1d5241f02ebb989ee
|
|
|
|
|
|
zwave:
|
|
usb_path: /dev/ttyACM1
|
|
|
|
|
|
google_assistant:
|
|
project_id: homeassistant-8c53b
|
|
api_key: AIzaSyDhRdUJU0pHmxxVP0IYu-BKNKDrf1_ivlM
|
|
expose_by_default: true
|
|
exposed_domains:
|
|
- switch
|
|
- light
|
|
- media_player
|
|
entity_config:
|
|
light.yeelight_ceiling_7c49ebae71f9:
|
|
expose: true
|
|
name: Luz Habitación Estudio
|
|
|
|
binary_sensor:
|
|
- platform: mqtt
|
|
name: "Puerta Entrada" #Puerta de Entrada
|
|
payload_on: "A2670A"
|
|
payload_off: "A2670E"
|
|
device_class: opening
|
|
state_topic: "sonoffbridge/tele/RESULT"
|
|
value_template: "{{value_json.RfReceived.Data}}"
|
|
|
|
- platform: mqtt
|
|
name: "Puerta Tendedero"
|
|
payload_on: "0D7F0A"
|
|
payload_off: "0D7F0E"
|
|
device_class: opening
|
|
state_topic: "sonoffbridge/tele/RESULT"
|
|
value_template: "{{value_json.RfReceived.Data}}"
|
|
|
|
- platform: mqtt
|
|
name: "Movimiento Habitación Estudio"
|
|
payload_on: "2A00BC"
|
|
payload_off: "2A00BCoff"
|
|
device_class: motion
|
|
state_topic: "sonoffbridge/tele/RESULT"
|
|
value_template: "{{value_json.RfReceived.Data}}"
|
|
off_delay: 8
|
|
|
|
- platform: mqtt
|
|
name: "Movimiento Pasillo Habitaciones"
|
|
payload_on: "5D559C"
|
|
payload_off: "5D559Coff"
|
|
device_class: motion
|
|
state_topic: "sonoffbridge/tele/RESULT"
|
|
value_template: "{{value_json.RfReceived.Data}}"
|
|
off_delay: 8
|
|
|
|
- platform: workday
|
|
country: ES
|
|
province: MAD
|
|
workdays: [mon, tue, wed, thu, fri]
|
|
|
|
sensor:
|
|
- platform: sql
|
|
db_url: !secret db_url
|
|
queries:
|
|
- name: db_size
|
|
query: "SELECT (pg_database_size('homeassistant')/1024/1024) as db_size;"
|
|
column: db_size
|
|
unit_of_measurement: MB
|
|
scan_interval: 120
|
|
|
|
- platform: mqtt
|
|
name: "Consumo General Luces"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/0/power"
|
|
unit_of_measurement: "W"
|
|
- platform: mqtt
|
|
name: "Consumo General Persianas"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/1/power"
|
|
unit_of_measurement: "W"
|
|
- platform: mqtt
|
|
name: "Consumo General Calefacción"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/2/power"
|
|
unit_of_measurement: "W"
|
|
- platform: mqtt
|
|
name: "Consumo General Coche Eléctrico"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/3/power"
|
|
unit_of_measurement: "W"
|
|
- platform: mqtt
|
|
name: "Energia General Luces"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/0/energy"
|
|
unit_of_measurement: "KWh"
|
|
value_template: "{{ value | multiply(0.01) | float | round(2)}}"
|
|
- platform: mqtt
|
|
name: "Energia General Persianas"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/1/energy"
|
|
unit_of_measurement: "KWh"
|
|
value_template: "{{ value | multiply(0.01) | float | round(2)}}"
|
|
- platform: mqtt
|
|
name: "Energia General Calefacción"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/2/energy"
|
|
unit_of_measurement: "KWh"
|
|
value_template: "{{ value | multiply(0.01) | float | round(2)}}"
|
|
- platform: mqtt
|
|
name: "Energia General Coche Eléctrico"
|
|
state_topic: "shellies/shelly4pro-061E6E/relay/3/energy"
|
|
unit_of_measurement: "KWh"
|
|
value_template: "{{ value | multiply(0.01) | float | round(2)}}"
|
|
|
|
#Sensor del horno
|
|
# - platform: mqtt
|
|
# name: "Consumo Horno Actual"
|
|
# state_topic: "tele/SonoffHorno/SENSOR"
|
|
# value_template: "{{value_json['ENERGY'].Power }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "W"
|
|
|
|
# - platform: mqtt
|
|
# name: "Voltaje Horno"
|
|
# state_topic: "tele/SonoffHorno/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Voltage }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "V"
|
|
|
|
# - platform: mqtt
|
|
# name: "Amperios Horno"
|
|
# state_topic: "tele/SonoffHorno/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Current }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "A"
|
|
|
|
# - platform: mqtt
|
|
# name: "Consumo Horno Hoy"
|
|
# state_topic: "tele/SonoffHorno/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Today }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "kWh"
|
|
|
|
# - platform: mqtt
|
|
# name: "Consumo Horno Ayer"
|
|
# state_topic: "tele/SonoffHorno/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Yesterday }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "kWh"
|
|
|
|
# - platform: mqtt
|
|
# name: "Consumo Horno Total"
|
|
# state_topic: "tele/SonoffHorno/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Total }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "kWh"
|
|
|
|
#Sensor Usos Varios 2
|
|
# - platform: mqtt
|
|
# name: "Consumo Usos Varios 2 Actual"
|
|
# state_topic: "tele/Sonoffuv2/SENSOR"
|
|
# value_template: "{{value_json['ENERGY'].Power }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "W"
|
|
|
|
# - platform: mqtt
|
|
# name: "Voltaje Usos Varios 2"
|
|
# state_topic: "tele/Sonoffuv2/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Voltage }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "V"
|
|
|
|
# - platform: mqtt
|
|
# name: "Amperios Usos Varios 2"
|
|
# state_topic: "tele/Sonoffuv2/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Current }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "A"
|
|
|
|
# - platform: mqtt
|
|
# name: "Consumo Usos Varios 2 Hoy"
|
|
# state_topic: "tele/Sonoffuv2/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Today }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "kWh"
|
|
|
|
# - platform: mqtt
|
|
# name: "Consumo Usos Varios 2 Ayer"
|
|
# state_topic: "tele/Sonoffuv2/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Yesterday }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "kWh"
|
|
|
|
# - platform: mqtt
|
|
# name: "Consumo Usos Varios 2 Total"
|
|
# state_topic: "tele/Sonoffuv2/SENSOR"
|
|
# value_template: "{{ value_json['ENERGY'].Total }}"
|
|
# qos: 1
|
|
# unit_of_measurement : "kWh"
|
|
|
|
light:
|
|
- platform: xiaomi_miio
|
|
name: Luz Entrada Dormitorio
|
|
host: 10.10.1.191
|
|
token: f7a017cf2a7df0f64f3866d091ec24e1
|
|
model: philips.light.downlight
|
|
|
|
- platform: xiaomi_miio
|
|
name: Luz Habitaciones Pasillo
|
|
host: 10.10.1.192
|
|
token: f6743cf3e3639ac42870bed17dfc5fc0
|
|
model: philips.light.downlight
|
|
|
|
- platform: xiaomi_miio
|
|
name: Luz Estudio Pasillo
|
|
host: 10.10.1.193
|
|
token: 7026ea559226f23e1ed3bff25adac20d
|
|
model: philips.light.downlight
|
|
|
|
- platform: xiaomi_miio
|
|
name: Luz Entrada Pasillo
|
|
host: 10.10.1.194
|
|
token: 1f7148e6ecadea293937b34565f2035c
|
|
model: philips.light.downlight
|
|
|
|
- platform: xiaomi_miio
|
|
name: Luz Tendedero
|
|
host: 10.10.1.195
|
|
token: 7b7b7720161907220116d261372161fb
|
|
model: philips.light.downlight
|
|
|
|
- platform: yeelight
|
|
devices:
|
|
10.10.1.161:
|
|
name: Luz Habitacion Estudio
|
|
10.10.1.162:
|
|
name: Luz Habitacion Noha
|
|
10.10.1.163:
|
|
name: Luz Habitacion Mia
|
|
10.10.1.164:
|
|
name: Luz Habitacion Principal
|
|
|