Fix: Dashboard queries use correct HA PG schema (states + states_meta)

This commit is contained in:
hermes
2026-09-08 15:27:14 +00:00
parent fd42d47a11
commit 18fa97a4b4
@@ -70,7 +70,7 @@
} }
] ]
}, },
"unit": "°C" "unit": "\u00b0C"
}, },
"overrides": [] "overrides": []
}, },
@@ -83,7 +83,11 @@
"id": 2, "id": 2,
"options": { "options": {
"legend": { "legend": {
"calcs": ["lastNotNull", "max", "min"], "calcs": [
"lastNotNull",
"max",
"min"
],
"displayMode": "table", "displayMode": "table",
"placement": "bottom", "placement": "bottom",
"showLegend": true "showLegend": true
@@ -101,11 +105,11 @@
}, },
"format": "time_series", "format": "time_series",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n last_changed AS time,\n state::float AS value,\n entity_id AS metric\nFROM recorder_states\nWHERE entity_id IN ('sensor.thzctl_vorlaufisttemp', 'sensor.thzctl_ruecklaufisttemp')\n AND $__timeFilter(last_changed)\nORDER BY last_changed", "rawSql": "SELECT\n s.last_changed AS time,\n s.state::float AS value,\n sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id IN ('sensor.thzctl_vorlaufisttemp', 'sensor.thzctl_ruecklaufisttemp')\n AND $__timeFilter(last_changed)\nORDER BY s.last_changed",
"refId": "A" "refId": "A"
} }
], ],
"title": "Vorlauf & Rücklauf Temperatur", "title": "Vorlauf & R\u00fccklauf Temperatur",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@@ -143,7 +147,7 @@
} }
] ]
}, },
"unit": "°C" "unit": "\u00b0C"
}, },
"overrides": [] "overrides": []
}, },
@@ -156,7 +160,11 @@
"id": 3, "id": 3,
"options": { "options": {
"legend": { "legend": {
"calcs": ["lastNotNull", "max", "min"], "calcs": [
"lastNotNull",
"max",
"min"
],
"displayMode": "table", "displayMode": "table",
"placement": "bottom", "placement": "bottom",
"showLegend": true "showLegend": true
@@ -174,11 +182,11 @@
}, },
"format": "time_series", "format": "time_series",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n last_changed AS time,\n state::float AS value,\n entity_id AS metric\nFROM recorder_states\nWHERE entity_id IN ('sensor.tecalor_thz5_5_eco_heissgas_temp', 'sensor.tecalor_thz5_5_eco_olsumpftemperatur', 'sensor.tecalor_thz5_5_eco_invertertemperatur')\n AND $__timeFilter(last_changed)\nORDER BY last_changed", "rawSql": "SELECT\n s.last_changed AS time,\n s.state::float AS value,\n sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id IN ('sensor.tecalor_thz5_5_eco_heissgas_temp', 'sensor.tecalor_thz5_5_eco_olsumpftemperatur', 'sensor.tecalor_thz5_5_eco_invertertemperatur')\n AND $__timeFilter(last_changed)\nORDER BY s.last_changed",
"refId": "A" "refId": "A"
} }
], ],
"title": "Kesseltemperatur (Heissgas, Ölsumpftemp, Inverter)", "title": "Kesseltemperatur (Heissgas, \u00d6lsumpftemp, Inverter)",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@@ -245,7 +253,11 @@
"id": 4, "id": 4,
"options": { "options": {
"legend": { "legend": {
"calcs": ["lastNotNull", "max", "min"], "calcs": [
"lastNotNull",
"max",
"min"
],
"displayMode": "table", "displayMode": "table",
"placement": "bottom", "placement": "bottom",
"showLegend": true "showLegend": true
@@ -263,7 +275,7 @@
}, },
"format": "time_series", "format": "time_series",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n last_changed AS time,\n state::float AS value,\n entity_id AS metric\nFROM recorder_states\nWHERE entity_id IN ('sensor.tecalor_thz5_5_eco_druck_hochdruck', 'sensor.tecalor_thz5_5_eco_druck_niederdruck', 'sensor.tecalor_thz5_5_eco_druck_heizkreis')\n AND $__timeFilter(last_changed)\nORDER BY last_changed", "rawSql": "SELECT\n s.last_changed AS time,\n s.state::float AS value,\n sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id IN ('sensor.tecalor_thz5_5_eco_druck_hochdruck', 'sensor.tecalor_thz5_5_eco_druck_niederdruck', 'sensor.tecalor_thz5_5_eco_druck_heizkreis')\n AND $__timeFilter(last_changed)\nORDER BY s.last_changed",
"refId": "A" "refId": "A"
} }
], ],
@@ -305,7 +317,7 @@
} }
] ]
}, },
"unit": "°C" "unit": "\u00b0C"
}, },
"overrides": [] "overrides": []
}, },
@@ -318,7 +330,11 @@
"id": 5, "id": 5,
"options": { "options": {
"legend": { "legend": {
"calcs": ["lastNotNull", "max", "min"], "calcs": [
"lastNotNull",
"max",
"min"
],
"displayMode": "table", "displayMode": "table",
"placement": "bottom", "placement": "bottom",
"showLegend": true "showLegend": true
@@ -336,11 +352,11 @@
}, },
"format": "time_series", "format": "time_series",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n last_changed AS time,\n state::float AS value,\n entity_id AS metric\nFROM recorder_states\nWHERE entity_id IN ('sensor.tecalor_thz5_5_eco_verfluessiger_temp', 'sensor.tecalor_thz5_5_eco_speichersolltemp_tag')\n AND $__timeFilter(last_changed)\nORDER BY last_changed", "rawSql": "SELECT\n s.last_changed AS time,\n s.state::float AS value,\n sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id IN ('sensor.tecalor_thz5_5_eco_verfluessiger_temp', 'sensor.tecalor_thz5_5_eco_speichersolltemp_tag')\n AND $__timeFilter(last_changed)\nORDER BY s.last_changed",
"refId": "A" "refId": "A"
} }
], ],
"title": "Verflüssiger & Speichersoll", "title": "Verfl\u00fcssiger & Speichersoll",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@@ -391,7 +407,11 @@
"id": 6, "id": 6,
"options": { "options": {
"legend": { "legend": {
"calcs": ["lastNotNull", "max", "min"], "calcs": [
"lastNotNull",
"max",
"min"
],
"displayMode": "table", "displayMode": "table",
"placement": "bottom", "placement": "bottom",
"showLegend": true "showLegend": true
@@ -409,7 +429,7 @@
}, },
"format": "time_series", "format": "time_series",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n last_changed AS time,\n state::float AS value,\n entity_id AS metric\nFROM recorder_states\nWHERE entity_id IN ('sensor.tecalor_thz5_5_eco_laufzeit_verdichter_heizen', 'sensor.tecalor_thz5_5_eco_laufzeit_verdichter_ww')\n AND $__timeFilter(last_changed)\nORDER BY last_changed", "rawSql": "SELECT\n s.last_changed AS time,\n s.state::float AS value,\n sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id IN ('sensor.tecalor_thz5_5_eco_laufzeit_verdichter_heizen', 'sensor.tecalor_thz5_5_eco_laufzeit_verdichter_ww')\n AND $__timeFilter(last_changed)\nORDER BY s.last_changed",
"refId": "A" "refId": "A"
} }
], ],
@@ -476,7 +496,11 @@
"id": 7, "id": 7,
"options": { "options": {
"legend": { "legend": {
"calcs": ["lastNotNull", "max", "min"], "calcs": [
"lastNotNull",
"max",
"min"
],
"displayMode": "table", "displayMode": "table",
"placement": "bottom", "placement": "bottom",
"showLegend": true "showLegend": true
@@ -494,7 +518,7 @@
}, },
"format": "time_series", "format": "time_series",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n last_changed AS time,\n state::float AS value,\n entity_id AS metric\nFROM recorder_states\nWHERE entity_id IN ('sensor.tecalor_thz5_5_eco_el_energieaufnahme_ww_summe_mwh', 'sensor.tecalor_thz5_5_eco_el_energieaufnahme_heiz_summe_mwh')\n AND $__timeFilter(last_changed)\nORDER BY last_changed", "rawSql": "SELECT\n s.last_changed AS time,\n s.state::float AS value,\n sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id IN ('sensor.tecalor_thz5_5_eco_el_energieaufnahme_ww_summe_mwh', 'sensor.tecalor_thz5_5_eco_el_energieaufnahme_heiz_summe_mwh')\n AND $__timeFilter(last_changed)\nORDER BY s.last_changed",
"refId": "A" "refId": "A"
} }
], ],
@@ -538,7 +562,9 @@
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "horizontal", "orientation": "horizontal",
"reduceOptions": { "reduceOptions": {
"calcs": ["lastNotNull"], "calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"values": false "values": false
}, },
@@ -552,7 +578,7 @@
}, },
"format": "table", "format": "table",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT state::float AS value, entity_id AS metric\nFROM recorder_states\nWHERE entity_id = 'sensor.tecalor_thz5_5_eco_el_energieaufnahme_ww_summe_mwh'\nORDER BY last_changed DESC LIMIT 1", "rawSql": "SELECT s.state::float AS value, sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id = 'sensor.tecalor_thz5_5_eco_el_energieaufnahme_ww_summe_mwh'\nORDER BY s.last_changed DESC LIMIT 1",
"refId": "A" "refId": "A"
} }
], ],
@@ -596,7 +622,9 @@
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "horizontal", "orientation": "horizontal",
"reduceOptions": { "reduceOptions": {
"calcs": ["lastNotNull"], "calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"values": false "values": false
}, },
@@ -610,7 +638,7 @@
}, },
"format": "table", "format": "table",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT state::float AS value, entity_id AS metric\nFROM recorder_states\nWHERE entity_id = 'sensor.tecalor_thz5_5_eco_el_energieaufnahme_heiz_summe_mwh'\nORDER BY last_changed DESC LIMIT 1", "rawSql": "SELECT s.state::float AS value, sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id = 'sensor.tecalor_thz5_5_eco_el_energieaufnahme_heiz_summe_mwh'\nORDER BY s.last_changed DESC LIMIT 1",
"refId": "A" "refId": "A"
} }
], ],
@@ -666,7 +694,9 @@
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "horizontal", "orientation": "horizontal",
"reduceOptions": { "reduceOptions": {
"calcs": ["lastNotNull"], "calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"values": false "values": false
}, },
@@ -680,7 +710,7 @@
}, },
"format": "table", "format": "table",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT state::float AS value, entity_id AS metric\nFROM recorder_states\nWHERE entity_id = 'sensor.tecalor_thz5_5_eco_firmware_version'\nORDER BY last_changed DESC LIMIT 1", "rawSql": "SELECT s.state::float AS value, sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id = 'sensor.tecalor_thz5_5_eco_firmware_version'\nORDER BY s.last_changed DESC LIMIT 1",
"refId": "A" "refId": "A"
} }
], ],
@@ -724,7 +754,9 @@
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "horizontal", "orientation": "horizontal",
"reduceOptions": { "reduceOptions": {
"calcs": ["lastNotNull"], "calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"values": false "values": false
}, },
@@ -738,7 +770,7 @@
}, },
"format": "table", "format": "table",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT state::float AS value, entity_id AS metric\nFROM recorder_states\nWHERE entity_id = 'sensor.tecalor_thz5_5_eco_laufzeit_verdichter_heizen'\nORDER BY last_changed DESC LIMIT 1", "rawSql": "SELECT s.state::float AS value, sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id = 'sensor.tecalor_thz5_5_eco_laufzeit_verdichter_heizen'\nORDER BY s.last_changed DESC LIMIT 1",
"refId": "A" "refId": "A"
} }
], ],
@@ -782,7 +814,9 @@
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "horizontal", "orientation": "horizontal",
"reduceOptions": { "reduceOptions": {
"calcs": ["lastNotNull"], "calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"values": false "values": false
}, },
@@ -796,7 +830,7 @@
}, },
"format": "table", "format": "table",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT state::float AS value, entity_id AS metric\nFROM recorder_states\nWHERE entity_id = 'sensor.tecalor_thz5_5_eco_laufzeit_verdichter_ww'\nORDER BY last_changed DESC LIMIT 1", "rawSql": "SELECT s.state::float AS value, sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id = 'sensor.tecalor_thz5_5_eco_laufzeit_verdichter_ww'\nORDER BY s.last_changed DESC LIMIT 1",
"refId": "A" "refId": "A"
} }
], ],
@@ -840,7 +874,9 @@
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "horizontal", "orientation": "horizontal",
"reduceOptions": { "reduceOptions": {
"calcs": ["lastNotNull"], "calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"values": false "values": false
}, },
@@ -854,7 +890,7 @@
}, },
"format": "table", "format": "table",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT state::float AS value, entity_id AS metric\nFROM recorder_states\nWHERE entity_id = 'sensor.tecalor_thz5_5_eco_raumsolltemp_tag'\nORDER BY last_changed DESC LIMIT 1", "rawSql": "SELECT s.state::float AS value, sm.entity_id AS metric\nFROM states s JOIN states_meta sm ON s.metadata_id = sm.metadata_id\nWHERE sm.entity_id = 'sensor.tecalor_thz5_5_eco_raumsolltemp_tag'\nORDER BY s.last_changed DESC LIMIT 1",
"refId": "A" "refId": "A"
} }
], ],
@@ -864,7 +900,11 @@
], ],
"refresh": "30s", "refresh": "30s",
"schemaVersion": 40, "schemaVersion": 40,
"tags": ["homeassistant", "tec", "heat-pump"], "tags": [
"homeassistant",
"tec",
"heat-pump"
],
"templating": { "templating": {
"list": [] "list": []
}, },
@@ -874,7 +914,7 @@
}, },
"timepicker": {}, "timepicker": {},
"timezone": "browser", "timezone": "browser",
"title": "Tecalor Wärmepumpe", "title": "Tecalor W\u00e4rmepumpe",
"uid": "tec-waermepumpe", "uid": "tec-waermepumpe",
"version": 1 "version": 1
} }