robmarkcole / HASS-data-detective

Explore and analyse your Home Assistant data
https://data.home-assistant.io/
MIT License
184 stars 36 forks source link

Updates to schema #153

Closed robmarkcole closed 1 year ago

robmarkcole commented 1 year ago

Changes: 1) states_meta contains entity_id

image

2) last_updated no longer used, now use last_updated_ts

image

Need to join in query:

SELECT state, last_updated_ts, states_meta.entity_id
FROM states
JOIN states_meta
ON states.metadata_id = states_meta.metadata_id;
image