Separación Configuración

This commit is contained in:
dfcarvajal
2019-04-17 15:01:18 +00:00
parent 2d46ec2369
commit 4d21cb7c10
38 changed files with 276 additions and 360 deletions

View File

@@ -14,366 +14,6 @@ homeassistant:
customize: !include customize.yaml customize: !include customize.yaml
packages: !include_dir_named packages 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 group: !include groups.yaml
automation: !include automations.yaml automation: !include automations.yaml
script: !include scripts.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

View File

@@ -0,0 +1,9 @@
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}}"

View File

@@ -0,0 +1,8 @@
binary_sensor:
- 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}}"

View File

@@ -0,0 +1,9 @@
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

View File

@@ -0,0 +1,5 @@
binary_sensor:
- platform: workday
country: ES
province: MAD
workdays: [mon, tue, wed, thu, fri]

2
packages/cloud.yaml Normal file
View File

@@ -0,0 +1,2 @@
cloud:

View File

@@ -0,0 +1,25 @@
switch:
- 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
sensor:
- platform: mqtt
name: "Consumo General Coche Eléctrico"
state_topic: "shellies/shelly4pro-061E6E/relay/3/power"
unit_of_measurement: "W"
sensor:
- 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)}}"

2
packages/config.yaml Normal file
View File

@@ -0,0 +1,2 @@
# Enables configuration UI
config:

View File

@@ -0,0 +1,2 @@
# Allows you to issue voice commands from the frontend in enabled browsers
#conversation:

4
packages/discover.yaml Normal file
View File

@@ -0,0 +1,4 @@
# Discover some devices automatically
discovery:
ignore:
- yeelight

2
packages/frontend.yaml Normal file
View File

@@ -0,0 +1,2 @@
# Enables the frontend
frontend:

View File

@@ -0,0 +1,25 @@
switch:
- 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
sensor:
- platform: mqtt
name: "Consumo General Calefacción"
state_topic: "shellies/shelly4pro-061E6E/relay/2/power"
unit_of_measurement: "W"
sensor:
- 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)}}"

View File

@@ -0,0 +1,25 @@
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
sensor:
- platform: mqtt
name: "Consumo General Luces"
state_topic: "shellies/shelly4pro-061E6E/relay/0/power"
unit_of_measurement: "W"
sensor:
- 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)}}"

View File

@@ -0,0 +1,25 @@
switch:
- 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
sensor:
- platform: mqtt
name: "Consumo General Persianas"
state_topic: "shellies/shelly4pro-061E6E/relay/1/power"
unit_of_measurement: "W"
sensor:
- 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)}}"

View File

@@ -0,0 +1,14 @@
google_assistant:
project_id: homeassistant-8c53b
api_key: AIzaSyDhRdUJU0pHmxxVP0IYu-BKNKDrf1_ivlM
expose_by_default: true
exposed_domains:
- switch
- light
- media_player
- cover
entity_config:
light.yeelight_ceiling_7c49ebae71f9:
expose: true
name: Luz Habitación Estudio

3
packages/history.yaml Normal file
View File

@@ -0,0 +1,3 @@
# Enables support for tracking state changes over time
history:

3
packages/http.yaml Normal file
View File

@@ -0,0 +1,3 @@
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
base_url: alacenaha.duckdns.org:8123

View File

@@ -0,0 +1,2 @@
# Show links to resources in log and frontend
#introduction:

2
packages/logbook.yaml Normal file
View File

@@ -0,0 +1,2 @@
# View all events in a logbook
logbook:

9
packages/logger.yaml Normal file
View File

@@ -0,0 +1,9 @@
logger:
default: warning
logs:
miflora: debug
btlewrap: debug
bluepy: debug
homeassistant.components.mqtt: error
homeassistant.components.zwave: error
homeassistant.components.yeelight: debug

View File

@@ -0,0 +1,7 @@
light:
- platform: xiaomi_miio
name: Luz Entrada Dormitorio
host: 10.10.1.191
token: f7a017cf2a7df0f64f3866d091ec24e1
model: philips.light.downlight

View File

@@ -0,0 +1,6 @@
light:
- platform: xiaomi_miio
name: Luz Entrada Pasillo
host: 10.10.1.194
token: 1f7148e6ecadea293937b34565f2035c
model: philips.light.downlight

View File

@@ -0,0 +1,6 @@
light:
- platform: xiaomi_miio
name: Luz Estudio Pasillo
host: 10.10.1.193
token: 7026ea559226f23e1ed3bff25adac20d
model: philips.light.downlight

View File

@@ -0,0 +1,6 @@
light:
- platform: xiaomi_miio
name: Luz Habitaciones Pasillo
host: 10.10.1.192
token: f6743cf3e3639ac42870bed17dfc5fc0
model: philips.light.downlight

View File

@@ -0,0 +1,6 @@
light:
- platform: xiaomi_miio
name: Luz Tendedero
host: 10.10.1.195
token: 7b7b7720161907220116d261372161fb
model: philips.light.downlight

View File

@@ -0,0 +1,11 @@
light:
- 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

2
packages/map.yaml Normal file
View File

@@ -0,0 +1,2 @@
# Enables a map showing the location of tracked devices
map:

View File

@@ -0,0 +1,9 @@
binary_sensor:
- 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

View File

@@ -0,0 +1,10 @@
binary_sensor:
- platform: mqtt
name: "Movimiento Habitación Principal"
payload_on: "FDE2BC"
payload_off: "FDE2BCoff"
device_class: motion
state_topic: "sonoffbridge/tele/RESULT"
value_template: "{{value_json.RfReceived.Data}}"
off_delay: 8

View File

@@ -0,0 +1,10 @@
binary_sensor:
- 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

3
packages/recorder.yaml Normal file
View File

@@ -0,0 +1,3 @@
recorder:
purge_keep_days: 90
db_url: !secret db_url

View File

@@ -0,0 +1,5 @@
switch:
- platform: xiaomi_miio
name: Releta Mia
host: 10.10.1.146
token: 3e1fea7691567cf1d5241f02ebb989ee

View File

@@ -0,0 +1,5 @@
switch:
- platform: xiaomi_miio
name: Regleta Noha
host: 10.10.1.145
token: fe3b88c2fdf9d129e30c8cd945ed4461

1
packages/sun.yaml Normal file
View File

@@ -0,0 +1 @@
sun:

View File

@@ -0,0 +1 @@
system_health:

2
packages/tts.yaml Normal file
View File

@@ -0,0 +1,2 @@
tts:
- platform: google

9
packages/updater.yaml Normal file
View File

@@ -0,0 +1,9 @@
# 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

1
packages/weather.yaml Normal file
View File

@@ -0,0 +1 @@
weather: