Migrate recorder services to support translations (#96409)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Franck Nijhof 2023-07-12 17:28:05 +02:00 committed by GitHub
parent d6771e6f8a
commit d3eda12af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 21 deletions

View File

@ -1,12 +1,8 @@
# Describes the format for available recorder services
purge:
name: Purge
description: Start purge task - to clean up old data from your database.
fields:
keep_days:
name: Days to keep
description: Number of history days to keep in database after purge.
selector:
number:
min: 0
@ -14,28 +10,20 @@ purge:
unit_of_measurement: days
repack:
name: Repack
description: Attempt to save disk space by rewriting the entire database file.
default: false
selector:
boolean:
apply_filter:
name: Apply filter
description: Apply entity_id and event_type filter in addition to time based purge.
default: false
selector:
boolean:
purge_entities:
name: Purge Entities
description: Start purge task to remove specific entities from your database.
target:
entity: {}
fields:
domains:
name: Domains to remove
description: List the domains that need to be removed from the recorder database.
example: "sun"
required: false
default: []
@ -43,8 +31,6 @@ purge_entities:
object:
entity_globs:
name: Entity Globs to remove
description: List the glob patterns to select entities for removal from the recorder database.
example: "domain*.object_id*"
required: false
default: []
@ -52,8 +38,6 @@ purge_entities:
object:
keep_days:
name: Days to keep
description: Number of history days to keep in database of matching rows. The default of 0 days will remove all matching rows.
default: 0
selector:
number:
@ -62,9 +46,4 @@ purge_entities:
unit_of_measurement: days
disable:
name: Disable
description: Stop the recording of events and state changes
enable:
name: Enable
description: Start the recording of events and state changes

View File

@ -13,5 +13,51 @@
"title": "Update MariaDB to {min_version} or later resolve a significant performance issue",
"description": "Older versions of MariaDB suffer from a significant performance regression when retrieving history data or purging the database. Update to MariaDB version {min_version} or later and restart Home Assistant. If you are using the MariaDB core add-on, make sure to update it to the latest version."
}
},
"services": {
"purge": {
"name": "Purge",
"description": "Starts purge task - to clean up old data from your database.",
"fields": {
"keep_days": {
"name": "Days to keep",
"description": "Number of days to keep the data in the database. Starting today, counting backward. A value of `7` means that everything older than a week will be purged."
},
"repack": {
"name": "Repack",
"description": "Attempt to save disk space by rewriting the entire database file."
},
"apply_filter": {
"name": "Apply filter",
"description": "Applys `entity_id` and `event_type` filters in addition to time-based purge."
}
}
},
"purge_entities": {
"name": "Purge entities",
"description": "Starts a purge task to remove the data related to specific entities from your database.",
"fields": {
"domains": {
"name": "Domains to remove",
"description": "List of domains for which the data needs to be removed from the recorder database."
},
"entity_globs": {
"name": "Entity globs to remove",
"description": "List of glob patterns used to select the entities for which the data is to be removed from the recorder database."
},
"keep_days": {
"name": "Days to keep",
"description": "Number of days to keep the data for rows matching the filter. Starting today, counting backward. A value of `7` means that everything older than a week will be purged. The default of 0 days will remove all matching rows immediately."
}
}
},
"disable": {
"name": "Disable",
"description": "Stops the recording of events and state changes."
},
"enable": {
"name": "Enable",
"description": "Starts the recording of events and state changes."
}
}
}