mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 08:46:51 +00:00
Add more details
This commit is contained in:
parent
09c0b1c231
commit
74a3e8342e
@ -9,11 +9,16 @@ sharing: true
|
|||||||
footer: true
|
footer: true
|
||||||
logo: home-assistant.png
|
logo: home-assistant.png
|
||||||
ha_category: "History"
|
ha_category: "History"
|
||||||
featured: false
|
ha_release: pre 0.7
|
||||||
ha_release: "0.20"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
The `recorder` component is storing details in the local database which then are handled by the [`history` component](/components/history/).
|
The `recorder` component is storing details in a database which then are handled by the [`history` component](/components/history/).
|
||||||
|
|
||||||
|
Home Assistant uses [SQLAlchemy](http://www.sqlalchemy.org/) as Object Relational Mapper (ORM). This means that you can now use **any** SQL backend for the recorder that is supported by SQLAlchemy, like [MySQL](https://www.mysql.com/), [MariaDB](https://mariadb.org/), or [PostgreSQL](https://www.postgresql.org/).
|
||||||
|
|
||||||
|
The default database engine is [SQLite](https://www.sqlite.org/) which doesn't require any configuration. The database is stored in your Home Assistant configuration directory (`.homeassistant`) and called `home-assistant.db`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
|
||||||
To setup the `recorder` component in your installation, add the following to your `configuration.yaml` file:
|
To setup the `recorder` component in your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
@ -26,4 +31,4 @@ recorder:
|
|||||||
Configuration variables:
|
Configuration variables:
|
||||||
|
|
||||||
- **purge_days** (*Optional*): Delete events and states older than x days.
|
- **purge_days** (*Optional*): Delete events and states older than x days.
|
||||||
|
- **db_url** (*Optional*): The URL which point to your database. Eg. `mysql://localhost/homeassistant`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user