mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Fix activate scene button + allow removing icon (#8916)
This commit is contained in:
parent
f6e223c18d
commit
8e11aa9130
@ -228,7 +228,7 @@ class HaSceneDashboard extends LitElement {
|
|||||||
|
|
||||||
private async _activateScene(ev) {
|
private async _activateScene(ev) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
const scene = ev.target.scene as SceneEntity;
|
const scene = ev.currentTarget.scene as SceneEntity;
|
||||||
await activateScene(this.hass, scene.entity_id);
|
await activateScene(this.hass, scene.entity_id);
|
||||||
showToast(this, {
|
showToast(this, {
|
||||||
message: this.hass.localize(
|
message: this.hass.localize(
|
||||||
|
@ -629,7 +629,12 @@ export class HaSceneEditor extends SubscribeMixin(
|
|||||||
if ((this._config![name] || "") === newVal) {
|
if ((this._config![name] || "") === newVal) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._config = { ...this._config!, [name]: newVal };
|
if (!newVal) {
|
||||||
|
delete this._config![name];
|
||||||
|
this._config = { ...this._config! };
|
||||||
|
} else {
|
||||||
|
this._config = { ...this._config!, [name]: newVal };
|
||||||
|
}
|
||||||
this._dirty = true;
|
this._dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user