Add reload scene button (#3476)

This commit is contained in:
Paulus Schoutsen 2019-08-11 20:52:58 -07:00 committed by GitHub
parent 52712f65c2
commit 204bd803bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -128,6 +128,13 @@ class HaConfigSectionServerControl extends LocalizeMixin(PolymerElement) {
hidden$="[[!scriptLoaded(hass)]]" hidden$="[[!scriptLoaded(hass)]]"
>[[localize('ui.panel.config.server_control.section.reloading.script')]] >[[localize('ui.panel.config.server_control.section.reloading.script')]]
</ha-call-service-button> </ha-call-service-button>
<ha-call-service-button
hass="[[hass]]"
domain="scene"
service="reload"
hidden$="[[!sceneLoaded(hass)]]"
>[[localize('ui.panel.config.server_control.section.reloading.scene')]]
</ha-call-service-button>
</div> </div>
</ha-card> </ha-card>
</template> </template>
@ -200,6 +207,10 @@ class HaConfigSectionServerControl extends LocalizeMixin(PolymerElement) {
return isComponentLoaded(hass, "script"); return isComponentLoaded(hass, "script");
} }
sceneLoaded(hass) {
return isComponentLoaded(hass, "scene");
}
validateConfig() { validateConfig() {
this.validating = true; this.validating = true;
this.validateLog = ""; this.validateLog = "";

View File

@ -620,7 +620,8 @@
"core": "Reload core", "core": "Reload core",
"group": "Reload groups", "group": "Reload groups",
"automation": "Reload automations", "automation": "Reload automations",
"script": "Reload scripts" "script": "Reload scripts",
"scene": "Reload scenes"
}, },
"server_management": { "server_management": {
"heading": "Server management", "heading": "Server management",