sql
This commit is contained in:
parent
1b7621c865
commit
acdb5d21c7
@ -19,10 +19,6 @@ homeassistant:
|
|||||||
packages: !include_dir_named packages
|
packages: !include_dir_named packages
|
||||||
|
|
||||||
automation: !include automations.yaml
|
automation: !include automations.yaml
|
||||||
#template: !include template.yaml
|
|
||||||
sensor: !include sensors.yaml
|
|
||||||
# climate: !include GreeClimateComponent-climate.yaml
|
|
||||||
# var: !include var.yaml
|
|
||||||
|
|
||||||
http:
|
http:
|
||||||
use_x_forwarded_for: true
|
use_x_forwarded_for: true
|
||||||
@ -41,6 +37,14 @@ recorder:
|
|||||||
purge_keep_days: 7
|
purge_keep_days: 7
|
||||||
commit_interval: 20
|
commit_interval: 20
|
||||||
|
|
||||||
|
sql:
|
||||||
|
name: MariaDB size
|
||||||
|
db_url: !secret mariadb_url
|
||||||
|
query: >
|
||||||
|
SELECT table_schema AS "database", ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;
|
||||||
|
column: "value"
|
||||||
|
unit_of_measurement: MB
|
||||||
|
|
||||||
history:
|
history:
|
||||||
|
|
||||||
# InfluxDB - Long-term data
|
# InfluxDB - Long-term data
|
||||||
|
|||||||
@ -109,7 +109,7 @@ climate:
|
|||||||
min_temp: 16
|
min_temp: 16
|
||||||
max_temp: 24
|
max_temp: 24
|
||||||
ac_mode: false
|
ac_mode: false
|
||||||
target_temp: 22
|
target_temp: 21
|
||||||
cold_tolerance: 0.3
|
cold_tolerance: 0.3
|
||||||
hot_tolerance: 0
|
hot_tolerance: 0
|
||||||
min_cycle_duration:
|
min_cycle_duration:
|
||||||
@ -118,4 +118,4 @@ climate:
|
|||||||
minutes: 3
|
minutes: 3
|
||||||
initial_hvac_mode: "off"
|
initial_hvac_mode: "off"
|
||||||
away_temp: 16
|
away_temp: 16
|
||||||
precision: 1
|
precision: 1
|
||||||
|
|||||||
12
sensors.yaml
12
sensors.yaml
@ -1,12 +0,0 @@
|
|||||||
# MariaDB Database Size Sensor
|
|
||||||
- platform: sql
|
|
||||||
db_url: !secret mariadb_url
|
|
||||||
scan_interval: 3600
|
|
||||||
queries:
|
|
||||||
- name: MariaDB size
|
|
||||||
query: 'SELECT table_schema AS "database", ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;'
|
|
||||||
column: "value"
|
|
||||||
unit_of_measurement: MB
|
|
||||||
|
|
||||||
# InfluxDB 2.x Database Size Sensor
|
|
||||||
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
# - sensor:
|
|
||||||
# # Klimatizace - aktuální teplota
|
|
||||||
# - unique_id: ac_livingroom_current_temperature
|
|
||||||
# name: "AC Livingroom Current temperature"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer
|
|
||||||
# state: >
|
|
||||||
# {{ state_attr('climate.ac_livingroom', 'current_temperature') }}
|
|
||||||
# - unique_id: ac_bathroom_current_temperature
|
|
||||||
# name: "AC Bathroom Current temperature"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer
|
|
||||||
# state: >
|
|
||||||
# {{ state_attr('climate.ac_bathroom', 'current_temperature') }}
|
|
||||||
# - unique_id: ac_bedroom_current_temperature
|
|
||||||
# name: "AC Bedroom Current temperature"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer
|
|
||||||
# state: >
|
|
||||||
# {{ state_attr('climate.ac_bedroom', 'current_temperature') }}
|
|
||||||
# - unique_id: ac_childrensroom_current_temperature
|
|
||||||
# name: "AC Childrensroom Current temperature"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer
|
|
||||||
# state: >
|
|
||||||
# {{ state_attr('climate.ac_childrensroom', 'current_temperature') }}
|
|
||||||
# - unique_id: ac_guestroom_current_temperature
|
|
||||||
# name: "AC Guestroom Current temperature"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer
|
|
||||||
# state: >
|
|
||||||
# {{ state_attr('climate.ac_guestroom', 'current_temperature') }}
|
|
||||||
|
|
||||||
# # Korekce teploty: Teplota, kterou měří jednotka - skutečná v místnosti
|
|
||||||
# - unique_id: livingroom_temperature_correction
|
|
||||||
# name: "Livingroom Temperateure Correction"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer-check
|
|
||||||
# state: >
|
|
||||||
# {{ (states('sensor.ac_livingroom_current_temperature')|float - states('sensor.livingroom_thermometer_hygrometer_temperature')|float) | round(0) }}
|
|
||||||
# - unique_id: bathroom_temperature_correction
|
|
||||||
# name: "Bathroom Temperateure Correction"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer-check
|
|
||||||
# state: >
|
|
||||||
# {{ (states('sensor.ac_bathroom_current_temperature')|float - states('sensor.bathroom_thermometer_hygrometer_temperature')|float) | round(0) }}
|
|
||||||
# - unique_id: bedroom_temperature_correction
|
|
||||||
# name: "Bedroom Temperateure Correction"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer-check
|
|
||||||
# state: >
|
|
||||||
# {{ (states('sensor.ac_bedroom_current_temperature')|float - states('sensor.bedroom_thermometer_hygrometer_temperature')|float) | round(0) }}
|
|
||||||
# - unique_id: childrensroom_temperature_correction
|
|
||||||
# name: "Childrensroom Temperateure Correction"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer-check
|
|
||||||
# state: >
|
|
||||||
# {{ (states('sensor.ac_childrensroom_current_temperature')|float - states('sensor.childrensroom_thermometer_hygrometer_temperature')|float) | round(0) }}
|
|
||||||
# - unique_id: guestroom_temperature_correction
|
|
||||||
# name: "Guestroom Temperateure Correction"
|
|
||||||
# unit_of_measurement: "°C"
|
|
||||||
# icon: mdi:thermometer-check
|
|
||||||
# state: >
|
|
||||||
# {{ (states('sensor.ac_guestroom_current_temperature')|float - states('sensor.guestroom_thermometer_hygrometer_temperature')|float) | round(0) }}
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user