Skip to content

Commit 16d55fa

Browse files
author
dvogt23
committed
Notes/tech/smarthome/homeassistent.md
1 parent edbd5b1 commit 16d55fa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Notes/tech/smarthome/homeassistent.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@ tags: []
1313
- Community store [hacs](https://hacs.xyz/)
1414
- Dashboard [mushroom](https://github.com/piitaya/lovelace-mushroom)
1515

16+
## Database correction
17+
18+
Sometimes getting wrong data from my smart meter, that one have to fix in database with the SQlite Web add-on on my home-assistant instance, with following commands:
19+
20+
```sql
21+
SELECT *
22+
FROM "statistics" WHERE CAST(mean AS DECIMAL(12,6)) LIKE '3976%'
23+
24+
UPDATE "statistics"
25+
SET mean = OtherTable.Col1,
26+
Col2 = OtherTable.Col2
27+
FROM (
28+
SELECT *
29+
FROM "statistics" WHERE CAST(mean AS DECIMAL(12,6))
30+
LIKE '3976%')
31+
```
32+
```
33+
1634
## Audio output on audio-jack
1735
1836
Install following plugin: [MPD](https://github.com/Poeschl/Hassio-Addons/tree/main/mpd)

0 commit comments

Comments
 (0)