Remove confusing line from History docs (#17032)

This commit is contained in:
Franck Nijhof 2021-03-16 21:35:45 +01:00 committed by GitHub
parent f464e9f188
commit 172011f827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,15 +164,15 @@ The following characters can be used in entity globs:
The history is stored in a SQLite database `home-assistant_v2.db` within your The history is stored in a SQLite database `home-assistant_v2.db` within your
configuration directory unless the `recorder` integration is set up differently. configuration directory unless the `recorder` integration is set up differently.
- events table is all events except `time_changed` that happened while recorder integration was running. - events table is all events except `time_changed` that happened while recorder integration was running.
- states table contains all the `new_state` values of `state_changed` events. - states table contains all the `new_state` values of `state_changed` events.
- Inside the states table you have: - Inside the states table you have:
- `entity_id`: the entity_id of the entity - `entity_id`: the entity_id of the entity
- `state`: the state of the entity - `state`: the state of the entity
- `attributes`: JSON of the state attributes - `attributes`: JSON of the state attributes
- `last_changed`: timestamp last time the state has changed. A state_changed event can happen when just attributes change. - `last_changed`: timestamp last time the state has changed.
- `last_updated`: timestamp anything has changed (state, attributes) - `last_updated`: timestamp anything has changed (state, attributes)
- `created`: timestamp this entry was inserted into the database - `created`: timestamp this entry was inserted into the database
When the `history` integration queries the states table it only selects states When the `history` integration queries the states table it only selects states
where the state has changed: `WHERE last_changed=last_updated` where the state has changed: `WHERE last_changed=last_updated`