Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions homeassistant/components/homeassistant/services.yaml
Original file line number Diff line number Diff line change
@@ -1,88 +1,47 @@
check_config:
name: Check configuration
description:
Check the Home Assistant configuration files for errors. Errors will be
displayed in the Home Assistant log.

reload_core_config:
name: Reload core configuration
description: Reload the core configuration.

restart:
name: Restart
description: Restart the Home Assistant service.

set_location:
name: Set location
description: Update the Home Assistant location.
fields:
latitude:
name: Latitude
description: Latitude of your location.
required: true
example: 32.87336
selector:
text:
longitude:
name: Longitude
description: Longitude of your location.
required: true
example: 117.22743
selector:
text:

stop:
name: Stop
description: Stop the Home Assistant service.

toggle:
name: Generic toggle
description: Generic service to toggle devices on/off under any domain
target:
entity: {}

turn_on:
name: Generic turn on
description: Generic service to turn devices on under any domain.
target:
entity: {}

turn_off:
name: Generic turn off
description: Generic service to turn devices off under any domain.
target:
entity: {}

update_entity:
name: Update entity
description: Force one or more entities to update its data
target:
entity: {}

reload_custom_templates:
name: Reload custom Jinja2 templates
description: >-
Reload Jinja2 templates found in the custom_templates folder in your config.
New values will be applied on the next render of the template.

reload_config_entry:
name: Reload config entry
description: Reload a config entry that matches a target.
target:
entity: {}
device: {}
fields:
entry_id:
advanced: true
name: Config entry id
description: A configuration entry id
required: false
example: 8955375327824e14ba89e4b29cc3ec9a
selector:
text:

save_persistent_states:
name: Save Persistent States
description:
Save the persistent states (for entities derived from RestoreEntity) immediately.
Maintain the normal periodic saving interval.
66 changes: 66 additions & 0 deletions homeassistant/components/homeassistant/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,71 @@
"version": "Version",
"virtualenv": "Virtual Environment"
}
},
"services": {
"check_config": {
"name": "Check configuration",
"description": "Checks the Home Assistant YAML-configuration files for errors. Errors will be shown in the Home Assistant logs."
},
"reload_core_config": {
"name": "Reload core configuration",
"description": "Reloads the core configuration from the YAML-configuration."
},
"restart": {
"name": "Restart",
"description": "Restarts Home Assistant."
},
"set_location": {
"name": "Set location",
"description": "Updates the Home Assistant location.",
"fields": {
"latitude": {
"name": "Latitude",
"description": "Latitude of your location."
},
"longitude": {
"name": "Longitude",
"description": "Longitude of your location."
}
}
},
"stop": {
"name": "Stop",
"description": "Stops Home Assistant."
},
"toggle": {
"name": "Generic toggle",
"description": "Generic service to toggle devices on/off under any domain."
},
"turn_on": {
"name": "Generic turn on",
"description": "Generic service to turn devices on under any domain."
},
"turn_off": {
"name": "Generic turn off",
"description": "Generic service to turn devices off under any domain."
},
"update_entity": {
"name": "Update entity",
"description": "Forces one or more entities to update its data."
},
"reload_custom_templates": {
"name": "Reload custom Jinja2 templates",
"description": "Reloads Jinja2 templates found in the `custom_templates` folder in your config. New values will be applied on the next render of the template."
},
"reload_config_entry": {
"name": "Reload config entry",
"description": "Reloads the specified config entry.",
"fields": {
"entry_id": {
"name": "Config entry ID",
"description": "The configuration entry ID of the entry to be reloaded."
}
}
},
"save_persistent_states": {
"name": "Save persistent states",
"description": "Saves the persistent states immediately. Maintains the normal periodic saving interval."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Saves the persistent states immediately. Maintains the normal periodic saving interval."
"description": "Saves the persistent states immediately. Maintains the normal periodic saving interval."

What is this used for? Why would I enable this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't enabling anything, it trigger a save to disk of the states immediately. Normally, this runs on a schedule / interval. This service allows you to request one now, instead awaiting the next interval to hit.

The interval isn't interrupted or changed, it will continue. So this is an extra way to force a save of states right now.

This is not something regular users use, but because HA saves every X seconds, it means that if HA crashes, it could loose X seconds of data that wasn't saved yet. This allows an user to force a save right now, in case they have received state data they want to secure to disk as soon as possible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, it's like a save button. Thank you for explaining.

}
}
}