From 6fb165d6e70785610f86a814243ce449ffcc7c32 Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 4 Jan 2021 19:14:58 +0100 Subject: [PATCH] add query home assistant --- IT/domotique/homeassistant.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IT/domotique/homeassistant.md b/IT/domotique/homeassistant.md index 35ee017..24227e1 100644 --- a/IT/domotique/homeassistant.md +++ b/IT/domotique/homeassistant.md @@ -13,4 +13,9 @@ ## event -- cube xiaomi xiaomi_aqara.cube_action \ No newline at end of file +- cube xiaomi xiaomi_aqara.cube_action + +## SQL request + +- get most use entity: + ```SELECT entity_id, COUNT(*) as count FROM hass.states GROUP BY entity_id ORDER BY count DESC LIMIT 20``` \ No newline at end of file