Add reload all service to quick bar and dev tools (#15512)

This commit is contained in:
Paul Bottein 2023-02-20 20:32:13 +01:00 committed by GitHub
parent 48dcd98634
commit dfbe32018a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View File

@ -552,6 +552,18 @@ export class QuickBar extends LitElement {
),
});
// Add "homeassistant.reload_all"
commands.push({
primaryText: this.hass.localize(
"ui.dialogs.quick-bar.commands.reload.all"
),
action: () => this.hass.callService("homeassistant", "reload_all"),
iconPath: mdiReload,
categoryText: this.hass.localize(
"ui.dialogs.quick-bar.commands.types.reload"
),
});
return commands.map((command) => ({
...command,
categoryKey: "reload",

View File

@ -121,6 +121,16 @@ export class DeveloperYamlConfig extends LitElement {
"ui.panel.developer-tools.tabs.yaml.section.reloading.introduction"
)}
</div>
<div class="card-actions">
<ha-call-service-button
.hass=${this.hass}
domain="homeassistant"
service="reload_all"
>${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.reloading.all"
)}
</ha-call-service-button>
</div>
<div class="card-actions">
<ha-call-service-button
.hass=${this.hass}

View File

@ -721,6 +721,7 @@
"quick-bar": {
"commands": {
"reload": {
"all": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::all%]",
"reload": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::reload%]",
"core": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::core%]",
"group": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::group%]",
@ -4899,6 +4900,7 @@
"invalid": "Configuration invalid!"
},
"reloading": {
"all": "All YAML configuration",
"heading": "YAML configuration reloading",
"introduction": "Some parts of Home Assistant can reload without requiring a restart. Clicking one of the options below will unload their current YAML configuration and load the new one.",
"reload": "{domain}",