![]() ![]() This is a heavy operation that can cause slowdowns and increased disk space usage while it runs. When using MySQL or MariaDB it will optimize or recreate the events and states tables. When using SQLite or PostgreSQL this will rewrite the entire database. The number of history days to keep in recorder database (defaults to the integration purge_keep_days configuration) Note that purging will not immediately decrease disk space usage but it will significantly slow down further growth. # Example configuration.yaml entry with include and exclude recorder : include : domains : - sensor - switch - media_player exclude : entities : - sensor.last_boot - sensor.date entity_globs : - sensor.weather_* Services Service purgeĬall the service recorder.purge to start a purge task which deletes events and states older than x days, according to keep_days service data. blocklist) is convenient when you are basically happy with the information recorded, but just want to remove some entities or domains. Common filtering examplesĭefining domains and entities to exclude (i.e. That way they aren’t even in your database, you can reduce storage and keep the database small by excluding certain often-logged events (like sensor.last_boot). But if you have privacy concerns about certain events or want them in neither the history or logbook, you should use the exclude/ include options of the recorder integration. If you only want to hide events from your history, take a look at the history integration. ? - The question mark represents a single character * - The asterisk represents zero, one, or multiple characters The following characters can be used in entity globs: No Domain and/or glob includes or excludes.Otherwise, entity listed in exclude: exclude. ![]() Domain and/or glob excludes (no domain and/or glob includes).Otherwise, entity listed in entities exclude: exclude.Domain and/or glob includes (may also have excludes).Otherwise, entity matches glob exclude: exclude.Otherwise, entity matches domain exclude: exclude.Otherwise, entity matches glob include: include.Otherwise, entity matches domain include: include.Entity listed in entities include: include.# Example filter to include specified domains and exclude specified entities recorder : include : domains : - alarm_control_panel - light entity_globs : - binary_sensor.*_occupancy exclude : entities : - light.kitchen_light The database is stored in your Home Assistant configuration directory (’/config/’) and is named home-assistant_v2.db. The default, and recommended, database engine is SQLite which does not require any configuration. This makes it possible to use a number of database solutions.Īlthough SQLAlchemy supports database solutions in addition to the ones supported by Home Assistant, it will behave differently on different databases, and features relied on by the recorder may work differently, or not at all, in different databases. Home Assistant uses SQLAlchemy, which is an Object Relational Mapper (ORM). 30s, limit the amount of stored data (e.g., by excluding devices) or store the data elsewhere (e.g., another system). It is therefore recommended to set the commit_interval to higher value, e.g. In case of Raspberry Pi with an SD card, it might affect your system’s reaction time and life expectancy of the storage medium (the SD card). If you use the default configuration, the data will be saved on the media Home Assistant is installed on. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |