You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are one or two year-old closed issues for this, I just ran into the same problem which is still present in the latest docs, the information on the Database page is way out of date and the examples simply don't work. For example the very first one, "SELECT entity_id, COUNT(*) as count FROM states GROUP BY entity_id ORDER BY count DESC LIMIT 10" produces no results because entity_id is NULL, it would have to be:
SELECT states_meta.entity_id, COUNT(*) cnt
FROM states LEFT JOIN states_meta ON ( states.metadata_id = states_meta.metadata_id )
GROUP BY states_meta.entity_id
ORDER BY cnt DESC
I realise it's not possible to keep everything up to date all the time but the page should at least be marked as obsolete / check the forums for further information, to avoid misleading people who think it applies to the current HA config.
Feedback
There are one or two year-old closed issues for this, I just ran into the same problem which is still present in the latest docs, the information on the Database page is way out of date and the examples simply don't work. For example the very first one, "SELECT entity_id, COUNT(*) as count FROM states GROUP BY entity_id ORDER BY count DESC LIMIT 10" produces no results because entity_id is NULL, it would have to be:
I realise it's not possible to keep everything up to date all the time but the page should at least be marked as obsolete / check the forums for further information, to avoid misleading people who think it applies to the current HA config.
URL
https://www.home-assistant.io/docs/backend/database/
Version
2024.10.4
Additional information
No response
The text was updated successfully, but these errors were encountered: