mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Fix entity selector slicing value on load (#25854)
This commit is contained in:
parent
884341656f
commit
5c1a8029bf
@ -54,7 +54,7 @@ export class HaAreaSelector extends LitElement {
|
||||
}
|
||||
|
||||
protected willUpdate(changedProperties: PropertyValues): void {
|
||||
if (changedProperties.has("selector") && this.value !== undefined) {
|
||||
if (changedProperties.get("selector") && this.value !== undefined) {
|
||||
if (this.selector.area?.multiple && !Array.isArray(this.value)) {
|
||||
this.value = [this.value];
|
||||
fireEvent(this, "value-changed", { value: this.value });
|
||||
|
@ -56,7 +56,7 @@ export class HaDeviceSelector extends LitElement {
|
||||
}
|
||||
|
||||
protected willUpdate(changedProperties: PropertyValues): void {
|
||||
if (changedProperties.has("selector") && this.value !== undefined) {
|
||||
if (changedProperties.get("selector") && this.value !== undefined) {
|
||||
if (this.selector.device?.multiple && !Array.isArray(this.value)) {
|
||||
this.value = [this.value];
|
||||
fireEvent(this, "value-changed", { value: this.value });
|
||||
|
@ -43,7 +43,7 @@ export class HaEntitySelector extends LitElement {
|
||||
}
|
||||
|
||||
protected willUpdate(changedProperties: PropertyValues): void {
|
||||
if (changedProperties.has("selector") && this.value !== undefined) {
|
||||
if (changedProperties.get("selector") && this.value !== undefined) {
|
||||
if (this.selector.entity?.multiple && !Array.isArray(this.value)) {
|
||||
this.value = [this.value];
|
||||
fireEvent(this, "value-changed", { value: this.value });
|
||||
|
@ -54,7 +54,7 @@ export class HaFloorSelector extends LitElement {
|
||||
}
|
||||
|
||||
protected willUpdate(changedProperties: PropertyValues): void {
|
||||
if (changedProperties.has("selector") && this.value !== undefined) {
|
||||
if (changedProperties.get("selector") && this.value !== undefined) {
|
||||
if (this.selector.floor?.multiple && !Array.isArray(this.value)) {
|
||||
this.value = [this.value];
|
||||
fireEvent(this, "value-changed", { value: this.value });
|
||||
|
Loading…
x
Reference in New Issue
Block a user