Added DB size sensor
This commit is contained in:
parent
4678a7c7de
commit
e5fe06641e
@ -1,2 +1,4 @@
|
|||||||
media_player.wohnzimmer_main:
|
media_player.wohnzimmer_main:
|
||||||
icon: mdi:audio-video
|
icon: mdi:audio-video
|
||||||
|
sensor.home_assistant_datenbankgrosse:
|
||||||
|
icon: mdi:database
|
||||||
|
@ -10,3 +10,11 @@
|
|||||||
- platform: dwd_weather_warnings
|
- platform: dwd_weather_warnings
|
||||||
name: "DWD Unwetterwarnungen"
|
name: "DWD Unwetterwarnungen"
|
||||||
region_name: "Münster-Süd"
|
region_name: "Münster-Süd"
|
||||||
|
# Database size sensor
|
||||||
|
- platform: sql
|
||||||
|
db_url: !secret ha_recorder_dburl
|
||||||
|
queries:
|
||||||
|
- name: "Home Assistant Datenbankgröße"
|
||||||
|
query: 'SELECT table_schema "database", Round(Sum(data_length + index_length) / 1048576, 2) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;'
|
||||||
|
column: 'value'
|
||||||
|
unit_of_measurement: MB
|
||||||
|
Loading…
Reference in New Issue
Block a user