From dcb3accdb86f534277c16fd6d1c063f0a79c52dd Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Fri, 19 Jan 2024 15:16:15 -0500 Subject: [PATCH] Fix incompatible object/array property types (1 of 3) (#19450) --- gallery/src/components/demo-card.ts | 2 +- .../device/ha-device-automation-picker.ts | 2 +- src/components/ha-file-upload.ts | 4 ++-- src/components/ha-selector/ha-selector-action.ts | 2 +- src/components/ha-selector/ha-selector-condition.ts | 2 +- src/components/ha-selector/ha-selector-location.ts | 2 +- src/components/ha-selector/ha-selector-target.ts | 2 +- src/components/ha-selector/ha-selector-trigger.ts | 2 +- src/components/ha-selector/ha-selector-ui-action.ts | 2 +- .../automation/action/ha-automation-action-row.ts | 4 ++-- .../automation/action/ha-automation-action.ts | 4 ++-- .../action/types/ha-automation-action-repeat.ts | 2 +- .../automation/blueprint-automation-editor.ts | 4 ++-- .../condition/ha-automation-condition-editor.ts | 2 +- .../condition/ha-automation-condition-row.ts | 4 ++-- .../automation/condition/ha-automation-condition.ts | 4 ++-- .../automation/trigger/ha-automation-trigger-row.ts | 2 +- .../automation/trigger/ha-automation-trigger.ts | 4 ++-- .../trigger/types/ha-automation-trigger-event.ts | 2 +- ...ha-automation-trigger-persistent_notification.ts | 3 ++- .../trigger/types/ha-automation-trigger-tag.ts | 2 +- .../trigger/types/ha-automation-trigger-webhook.ts | 2 +- .../trigger/types/ha-automation-trigger-zone.ts | 2 +- .../config/cloud/account/cloud-remote-pref.ts | 2 +- src/panels/config/cloud/account/cloud-tts-pref.ts | 2 +- src/panels/config/cloud/ha-config-cloud.ts | 2 +- src/panels/config/dashboard/ha-config-dashboard.ts | 2 +- .../devices/device-detail/ha-device-info-card.ts | 2 +- .../integration-elements/zha/ha-device-info-zha.ts | 2 +- .../zha/zha-cluster-attributes.ts | 4 ++-- .../integration-panels/zha/zha-cluster-commands.ts | 4 ++-- .../integration-panels/zha/zha-device-binding.ts | 2 +- .../integration-panels/zha/zha-device-card.ts | 2 +- .../integration-panels/zha/zha-device-neighbors.ts | 2 +- .../zha/zha-device-pairing-status-card.ts | 2 +- .../integration-panels/zha/zha-device-signature.ts | 2 +- .../integration-panels/zha/zha-group-binding.ts | 2 +- .../integration-panels/zha/zha-manage-clusters.ts | 2 +- src/panels/config/voice-assistants/assist-pref.ts | 13 ++++++------- .../config/voice-assistants/cloud-alexa-pref.ts | 2 +- src/panels/lovelace/components/hui-action-editor.ts | 6 +++--- src/panels/lovelace/components/hui-card-options.ts | 2 +- .../lovelace/components/hui-generic-entity-row.ts | 2 +- .../lovelace/editor/card-editor/hui-card-preview.ts | 2 +- .../editor/lovelace-editor/hui-lovelace-editor.ts | 2 +- 45 files changed, 62 insertions(+), 62 deletions(-) diff --git a/gallery/src/components/demo-card.ts b/gallery/src/components/demo-card.ts index 87ae240ac41c..3e24d1897e25 100644 --- a/gallery/src/components/demo-card.ts +++ b/gallery/src/components/demo-card.ts @@ -13,7 +13,7 @@ export interface DemoCardConfig { class DemoCard extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public config!: DemoCardConfig; + @property({ attribute: false }) public config!: DemoCardConfig; @property({ type: Boolean }) public showConfig = false; diff --git a/src/components/device/ha-device-automation-picker.ts b/src/components/device/ha-device-automation-picker.ts index 87257aba4fdd..c430e20134df 100644 --- a/src/components/device/ha-device-automation-picker.ts +++ b/src/components/device/ha-device-automation-picker.ts @@ -25,7 +25,7 @@ export abstract class HaDeviceAutomationPicker< @property() public deviceId?: string; - @property() public value?: T; + @property({ type: Object }) public value?: T; @state() private _automations: T[] = []; diff --git a/src/components/ha-file-upload.ts b/src/components/ha-file-upload.ts index 952c588ea241..f4077934ce32 100644 --- a/src/components/ha-file-upload.ts +++ b/src/components/ha-file-upload.ts @@ -31,11 +31,11 @@ export class HaFileUpload extends LitElement { @property() public supports?: string; - @property() public value?: File | File[] | FileList | string; + @property({ type: Object }) public value?: File | File[] | FileList | string; @property({ type: Boolean }) public multiple = false; - @property({ type: Boolean, reflect: true }) public disabled: boolean = false; + @property({ type: Boolean, reflect: true }) public disabled = false; @property({ type: Boolean }) public uploading = false; diff --git a/src/components/ha-selector/ha-selector-action.ts b/src/components/ha-selector/ha-selector-action.ts index c1edf4d2662d..2e203a62da4b 100644 --- a/src/components/ha-selector/ha-selector-action.ts +++ b/src/components/ha-selector/ha-selector-action.ts @@ -11,7 +11,7 @@ export class HaActionSelector extends LitElement { @property({ attribute: false }) public selector!: ActionSelector; - @property() public value?: Action; + @property({ attribute: false }) public value?: Action; @property() public label?: string; diff --git a/src/components/ha-selector/ha-selector-condition.ts b/src/components/ha-selector/ha-selector-condition.ts index 649986deef52..756d43b1e4e3 100644 --- a/src/components/ha-selector/ha-selector-condition.ts +++ b/src/components/ha-selector/ha-selector-condition.ts @@ -11,7 +11,7 @@ export class HaConditionSelector extends LitElement { @property({ attribute: false }) public selector!: ConditionSelector; - @property() public value?: Condition; + @property({ attribute: false }) public value?: Condition; @property() public label?: string; diff --git a/src/components/ha-selector/ha-selector-location.ts b/src/components/ha-selector/ha-selector-location.ts index bf08b181e4e0..a2ae29dd9880 100644 --- a/src/components/ha-selector/ha-selector-location.ts +++ b/src/components/ha-selector/ha-selector-location.ts @@ -16,7 +16,7 @@ export class HaLocationSelector extends LitElement { @property({ attribute: false }) public selector!: LocationSelector; - @property() public value?: LocationSelectorValue; + @property({ type: Object }) public value?: LocationSelectorValue; @property() public label?: string; diff --git a/src/components/ha-selector/ha-selector-target.ts b/src/components/ha-selector/ha-selector-target.ts index 3270f8b4db7e..fafc97b62beb 100644 --- a/src/components/ha-selector/ha-selector-target.ts +++ b/src/components/ha-selector/ha-selector-target.ts @@ -32,7 +32,7 @@ export class HaTargetSelector extends LitElement { @property({ attribute: false }) public selector!: TargetSelector; - @property() public value?: HassServiceTarget; + @property({ type: Object }) public value?: HassServiceTarget; @property() public label?: string; diff --git a/src/components/ha-selector/ha-selector-trigger.ts b/src/components/ha-selector/ha-selector-trigger.ts index 541aac3b4495..567a81c4d364 100644 --- a/src/components/ha-selector/ha-selector-trigger.ts +++ b/src/components/ha-selector/ha-selector-trigger.ts @@ -11,7 +11,7 @@ export class HaTriggerSelector extends LitElement { @property({ attribute: false }) public selector!: TriggerSelector; - @property() public value?: Trigger; + @property({ attribute: false }) public value?: Trigger; @property() public label?: string; diff --git a/src/components/ha-selector/ha-selector-ui-action.ts b/src/components/ha-selector/ha-selector-ui-action.ts index 63fe5d5bc689..b20cb6ed17d7 100644 --- a/src/components/ha-selector/ha-selector-ui-action.ts +++ b/src/components/ha-selector/ha-selector-ui-action.ts @@ -12,7 +12,7 @@ export class HaSelectorUiAction extends LitElement { @property({ attribute: false }) public selector!: UiActionSelector; - @property() public value?: ActionConfig; + @property({ attribute: false }) public value?: ActionConfig; @property() public label?: string; diff --git a/src/panels/config/automation/action/ha-automation-action-row.ts b/src/panels/config/automation/action/ha-automation-action-row.ts index a6c8fd61ddd3..64c469a0db4c 100644 --- a/src/panels/config/automation/action/ha-automation-action-row.ts +++ b/src/panels/config/automation/action/ha-automation-action-row.ts @@ -125,7 +125,7 @@ const preventDefault = (ev) => ev.preventDefault(); export default class HaAutomationActionRow extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public action!: Action; + @property({ attribute: false }) public action!: Action; @property({ type: Boolean }) public narrow = false; @@ -133,7 +133,7 @@ export default class HaAutomationActionRow extends LitElement { @property({ type: Boolean }) public hideMenu = false; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; @storage({ key: "automationClipboard", diff --git a/src/panels/config/automation/action/ha-automation-action.ts b/src/panels/config/automation/action/ha-automation-action.ts index 6a9dec5eccc1..04284e1b9179 100644 --- a/src/panels/config/automation/action/ha-automation-action.ts +++ b/src/panels/config/automation/action/ha-automation-action.ts @@ -33,9 +33,9 @@ export default class HaAutomationAction extends LitElement { @property({ type: Boolean }) public disabled = false; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; - @property() public actions!: Action[]; + @property({ attribute: false }) public actions!: Action[]; @state() @consume({ context: reorderModeContext, subscribe: true }) diff --git a/src/panels/config/automation/action/types/ha-automation-action-repeat.ts b/src/panels/config/automation/action/types/ha-automation-action-repeat.ts index 2d4bf8847060..2b1cf924a93b 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-repeat.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-repeat.ts @@ -29,7 +29,7 @@ export class HaRepeatAction extends LitElement implements ActionElement { @property({ attribute: false }) public action!: RepeatAction; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; public static get defaultConfig() { return { repeat: { count: 2, sequence: [] } }; diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index 635e5ada3ec2..3295b6422296 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -30,9 +30,9 @@ export class HaBlueprintAutomationEditor extends ReorderModeMixin(LitElement) { @property({ type: Boolean }) public disabled = false; - @property({ reflect: true, type: Boolean }) public narrow = false; + @property({ type: Boolean, reflect: true }) public narrow = false; - @property() public config!: BlueprintAutomationConfig; + @property({ attribute: false }) public config!: BlueprintAutomationConfig; @property({ attribute: false }) public stateObj?: HassEntity; diff --git a/src/panels/config/automation/condition/ha-automation-condition-editor.ts b/src/panels/config/automation/condition/ha-automation-condition-editor.ts index 3a838f03a046..f39092d9400b 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-editor.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-editor.ts @@ -30,7 +30,7 @@ export default class HaAutomationConditionEditor extends LitElement { @property({ type: Boolean }) public yamlMode = false; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; private _processedCondition = memoizeOne((condition) => expandConditionWithShorthand(condition) diff --git a/src/panels/config/automation/condition/ha-automation-condition-row.ts b/src/panels/config/automation/condition/ha-automation-condition-row.ts index da7782c813cf..72734de5663e 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-row.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-row.ts @@ -81,13 +81,13 @@ export const handleChangeEvent = ( export default class HaAutomationConditionRow extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public condition!: Condition; + @property({ attribute: false }) public condition!: Condition; @property({ type: Boolean }) public hideMenu = false; @property({ type: Boolean }) public disabled = false; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; @storage({ key: "automationClipboard", diff --git a/src/panels/config/automation/condition/ha-automation-condition.ts b/src/panels/config/automation/condition/ha-automation-condition.ts index e40906ceccfa..3b8571ff6973 100644 --- a/src/panels/config/automation/condition/ha-automation-condition.ts +++ b/src/panels/config/automation/condition/ha-automation-condition.ts @@ -38,11 +38,11 @@ import type HaAutomationConditionRow from "./ha-automation-condition-row"; export default class HaAutomationCondition extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public conditions!: Condition[]; + @property({ attribute: false }) public conditions!: Condition[]; @property({ type: Boolean }) public disabled = false; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; @state() @consume({ context: reorderModeContext, subscribe: true }) diff --git a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts index 164226c2a53d..aea9540dc0ce 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts @@ -112,7 +112,7 @@ export default class HaAutomationTriggerRow extends LitElement { @property({ type: Boolean }) public disabled = false; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; @state() private _warnings?: string[]; diff --git a/src/panels/config/automation/trigger/ha-automation-trigger.ts b/src/panels/config/automation/trigger/ha-automation-trigger.ts index b4a0119e212e..4aa7845f6dad 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger.ts @@ -28,11 +28,11 @@ import type HaAutomationTriggerRow from "./ha-automation-trigger-row"; export default class HaAutomationTrigger extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public triggers!: Trigger[]; + @property({ attribute: false }) public triggers!: Trigger[]; @property({ type: Boolean }) public disabled = false; - @property() public path?: ItemPath; + @property({ type: Array }) public path?: ItemPath; @state() @consume({ context: reorderModeContext, subscribe: true }) diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts index 3d997e81a456..5904efdba579 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts @@ -15,7 +15,7 @@ import { export class HaEventTrigger extends LitElement implements TriggerElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public trigger!: EventTrigger; + @property({ attribute: false }) public trigger!: EventTrigger; @property({ type: Boolean }) public disabled = false; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-persistent_notification.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-persistent_notification.ts index 0e942c18603e..ee3a1743d4eb 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-persistent_notification.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-persistent_notification.ts @@ -23,7 +23,8 @@ export class HaPersistentNotificationTrigger { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public trigger!: PersistentNotificationTrigger; + @property({ attribute: false }) + public trigger!: PersistentNotificationTrigger; @property({ type: Boolean }) public disabled = false; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts index be5a8c7fee9d..7857ea17b5fe 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts @@ -13,7 +13,7 @@ import { TriggerElement } from "../ha-automation-trigger-row"; export class HaTagTrigger extends LitElement implements TriggerElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public trigger!: TagTrigger; + @property({ attribute: false }) public trigger!: TagTrigger; @property({ type: Boolean }) public disabled = false; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts index 300b7215c8b5..e090209a222c 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts @@ -27,7 +27,7 @@ const DEFAULT_WEBHOOK_ID = ""; export class HaWebhookTrigger extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public trigger!: WebhookTrigger; + @property({ attribute: false }) public trigger!: WebhookTrigger; @property({ type: Boolean }) public disabled = false; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts index 3b9942efc564..7ddf87ccdff9 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts @@ -19,7 +19,7 @@ const includeDomains = ["zone"]; export class HaZoneTrigger extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public trigger!: ZoneTrigger; + @property({ attribute: false }) public trigger!: ZoneTrigger; @property({ type: Boolean }) public disabled = false; diff --git a/src/panels/config/cloud/account/cloud-remote-pref.ts b/src/panels/config/cloud/account/cloud-remote-pref.ts index b77159d8e6c7..54b093e949b9 100644 --- a/src/panels/config/cloud/account/cloud-remote-pref.ts +++ b/src/panels/config/cloud/account/cloud-remote-pref.ts @@ -22,7 +22,7 @@ import { showCloudCertificateDialog } from "../dialog-cloud-certificate/show-dia export class CloudRemotePref extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public cloudStatus?: CloudStatusLoggedIn; + @property({ attribute: false }) public cloudStatus?: CloudStatusLoggedIn; protected render() { if (!this.cloudStatus) { diff --git a/src/panels/config/cloud/account/cloud-tts-pref.ts b/src/panels/config/cloud/account/cloud-tts-pref.ts index ce9cc85dab34..3107ff622a01 100644 --- a/src/panels/config/cloud/account/cloud-tts-pref.ts +++ b/src/panels/config/cloud/account/cloud-tts-pref.ts @@ -24,7 +24,7 @@ import { showTryTtsDialog } from "./show-dialog-cloud-tts-try"; export class CloudTTSPref extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public cloudStatus?: CloudStatusLoggedIn; + @property({ attribute: false }) public cloudStatus?: CloudStatusLoggedIn; @state() private savingPreferences = false; diff --git a/src/panels/config/cloud/ha-config-cloud.ts b/src/panels/config/cloud/ha-config-cloud.ts index fd02981c9159..08b4c303c366 100644 --- a/src/panels/config/cloud/ha-config-cloud.ts +++ b/src/panels/config/cloud/ha-config-cloud.ts @@ -22,7 +22,7 @@ class HaConfigCloud extends HassRouterPage { @property({ attribute: false }) public route!: Route; - @property() public cloudStatus!: CloudStatus; + @property({ attribute: false }) public cloudStatus!: CloudStatus; protected routerOptions: RouterOptions = { defaultPage: "login", diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts index 8bcb950c9ced..918b8c888e2a 100644 --- a/src/panels/config/dashboard/ha-config-dashboard.ts +++ b/src/panels/config/dashboard/ha-config-dashboard.ts @@ -118,7 +118,7 @@ class HaConfigDashboard extends SubscribeMixin(LitElement) { @property({ type: Boolean }) public isWide = false; - @property() public cloudStatus?: CloudStatus; + @property({ attribute: false }) public cloudStatus?: CloudStatus; @property({ type: Boolean }) public showAdvanced = false; diff --git a/src/panels/config/devices/device-detail/ha-device-info-card.ts b/src/panels/config/devices/device-detail/ha-device-info-card.ts index 0ec966058607..0af9a8bdc607 100644 --- a/src/panels/config/devices/device-detail/ha-device-info-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-info-card.ts @@ -13,7 +13,7 @@ import { HomeAssistant } from "../../../../types"; export class HaDeviceCard extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public device!: DeviceRegistryEntry; + @property({ attribute: false }) public device!: DeviceRegistryEntry; @property({ type: Boolean }) public narrow = false; diff --git a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts index da52b4dd2467..07fe9643a850 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts @@ -18,7 +18,7 @@ import { formatAsPaddedHex } from "../../../../integrations/integration-panels/z export class HaDeviceInfoZha extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public device!: DeviceRegistryEntry; + @property({ attribute: false }) public device!: DeviceRegistryEntry; @state() private _zhaDevice?: ZHADevice; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts b/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts index b0575c42f9c7..cc052ac842f8 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts @@ -33,9 +33,9 @@ import { ItemSelectedEvent, SetAttributeServiceData } from "./types"; export class ZHAClusterAttributes extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; - @property() public device?: ZHADevice; + @property({ attribute: false }) public device?: ZHADevice; - @property() public selectedCluster?: Cluster; + @property({ type: Object }) public selectedCluster?: Cluster; @state() private _attributes: Attribute[] | undefined; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts b/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts index 66e59c382d1c..f699db763408 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts @@ -30,9 +30,9 @@ export class ZHAClusterCommands extends LitElement { @property({ type: Boolean }) public isWide = false; - @property() public device?: ZHADevice; + @property({ attribute: false }) public device?: ZHADevice; - @property() public selectedCluster?: Cluster; + @property({ type: Object }) public selectedCluster?: Cluster; @state() private _commands: Command[] | undefined; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts index 993aaad79e00..e21f6ec62504 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts @@ -21,7 +21,7 @@ import { ItemSelectedEvent } from "./types"; export class ZHADeviceBindingControl extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; - @property() public device?: ZHADevice; + @property({ attribute: false }) public device?: ZHADevice; @state() private _bindTargetIndex = -1; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts index 46657ffc63f8..695a9bd9dca9 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts @@ -29,7 +29,7 @@ import { getIeeeTail } from "./functions"; class ZHADeviceCard extends SubscribeMixin(LitElement) { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public device?: ZHADevice; + @property({ attribute: false }) public device?: ZHADevice; @property({ type: Boolean }) public narrow = false; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-neighbors.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-neighbors.ts index 28ab989c31b8..64bec7d1bcd2 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-neighbors.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-neighbors.ts @@ -26,7 +26,7 @@ class ZHADeviceNeighbors extends LitElement { @property({ type: Boolean }) public narrow = false; - @property() public device: ZHADevice | undefined; + @property({ attribute: false }) public device?: ZHADevice; @state() private _devices: Map | undefined; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts index e39ae9280855..1c249d950709 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts @@ -18,7 +18,7 @@ import "./zha-device-card"; class ZHADevicePairingStatusCard extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public device?: ZHADevice; + @property({ attribute: false }) public device?: ZHADevice; @property({ type: Boolean }) public narrow = false; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-signature.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-signature.ts index 5d83434184ca..cd1675bed929 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-signature.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-signature.ts @@ -8,7 +8,7 @@ import { HomeAssistant } from "../../../../../types"; class ZHADeviceZigbeeInfo extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public device: ZHADevice | undefined; + @property({ attribute: false }) public device?: ZHADevice; @state() private _signature: any; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts b/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts index d96b27c9ad99..641d43b240a4 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts @@ -31,7 +31,7 @@ import "@material/mwc-list/mwc-list-item"; export class ZHAGroupBindingControl extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; - @property() public device?: ZHADevice; + @property({ attribute: false }) public device?: ZHADevice; @state() private _bindTargetIndex = -1; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-manage-clusters.ts b/src/panels/config/integrations/integration-panels/zha/zha-manage-clusters.ts index cdc2deb0cd90..0efd3f83c19b 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-manage-clusters.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-manage-clusters.ts @@ -42,7 +42,7 @@ export class ZHAManageClusters extends LitElement { @property({ type: Boolean }) public isWide = false; - @property() public device?: ZHADevice; + @property({ attribute: false }) public device?: ZHADevice; @state() private _selectedClusterIndex = -1; diff --git a/src/panels/config/voice-assistants/assist-pref.ts b/src/panels/config/voice-assistants/assist-pref.ts index fa1350936fb8..6ed2899cc947 100644 --- a/src/panels/config/voice-assistants/assist-pref.ts +++ b/src/panels/config/voice-assistants/assist-pref.ts @@ -1,7 +1,7 @@ import "@material/mwc-list/mwc-list"; import { mdiHelpCircle, mdiPlus, mdiStar } from "@mdi/js"; -import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; -import { property, state } from "lit/decorators"; +import { CSSResultGroup, LitElement, PropertyValues, css, html } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { formatLanguageCode } from "../../../common/language/format_language"; import "../../../components/ha-alert"; @@ -26,9 +26,10 @@ import { ExposeEntitySettings } from "../../../data/expose"; import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; import type { HomeAssistant } from "../../../types"; import { brandsUrl } from "../../../util/brands-url"; -import { showVoiceAssistantPipelineDetailDialog } from "./show-dialog-voice-assistant-pipeline-detail"; import { documentationUrl } from "../../../util/documentation-url"; +import { showVoiceAssistantPipelineDetailDialog } from "./show-dialog-voice-assistant-pipeline-detail"; +@customElement("assist-pref") export class AssistPref extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; @@ -37,14 +38,14 @@ export class AssistPref extends LitElement { ExposeEntitySettings >; + @property({ attribute: false }) public cloudStatus?: CloudStatus; + @state() private _pipelines: AssistPipeline[] = []; @state() private _preferred: string | null = null; @state() private _devices: AssistDevice[] = []; - @property() public cloudStatus?: CloudStatus; - protected firstUpdated(changedProps: PropertyValues) { super.firstUpdated(changedProps); @@ -277,5 +278,3 @@ declare global { "assist-pref": AssistPref; } } - -customElements.define("assist-pref", AssistPref); diff --git a/src/panels/config/voice-assistants/cloud-alexa-pref.ts b/src/panels/config/voice-assistants/cloud-alexa-pref.ts index 4286f241f3e8..3418293be1a4 100644 --- a/src/panels/config/voice-assistants/cloud-alexa-pref.ts +++ b/src/panels/config/voice-assistants/cloud-alexa-pref.ts @@ -27,7 +27,7 @@ export class CloudAlexaPref extends LitElement { ExposeEntitySettings >; - @property() public cloudStatus?: CloudStatusLoggedIn; + @property({ attribute: false }) public cloudStatus?: CloudStatusLoggedIn; @state() private _exposeNew?: boolean; diff --git a/src/panels/lovelace/components/hui-action-editor.ts b/src/panels/lovelace/components/hui-action-editor.ts index a578e24853fe..92fa589987a4 100644 --- a/src/panels/lovelace/components/hui-action-editor.ts +++ b/src/panels/lovelace/components/hui-action-editor.ts @@ -72,13 +72,13 @@ const ASSIST_SCHEMA = [ @customElement("hui-action-editor") export class HuiActionEditor extends LitElement { - @property() public config?: ActionConfig; + @property({ attribute: false }) public config?: ActionConfig; @property() public label?: string; - @property() public actions?: UiAction[]; + @property({ attribute: false }) public actions?: UiAction[]; - @property() public defaultAction?: UiAction; + @property({ attribute: false }) public defaultAction?: UiAction; @property() public tooltipText?: string; diff --git a/src/panels/lovelace/components/hui-card-options.ts b/src/panels/lovelace/components/hui-card-options.ts index 8236d900e38b..7f59aaf3e921 100644 --- a/src/panels/lovelace/components/hui-card-options.ts +++ b/src/panels/lovelace/components/hui-card-options.ts @@ -54,7 +54,7 @@ export class HuiCardOptions extends LitElement { @property({ attribute: false }) public lovelace?: Lovelace; - @property() public path?: [number, number]; + @property({ type: Array }) public path?: [number, number]; @queryAssignedNodes() private _assignedNodes?: NodeListOf; diff --git a/src/panels/lovelace/components/hui-generic-entity-row.ts b/src/panels/lovelace/components/hui-generic-entity-row.ts index d426fde1fd35..eb745db37273 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.ts +++ b/src/panels/lovelace/components/hui-generic-entity-row.ts @@ -28,7 +28,7 @@ import { createEntityNotFoundWarning } from "./hui-warning"; export class HuiGenericEntityRow extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; - @property() public config?: EntitiesCardEntityConfig; + @property({ attribute: false }) public config?: EntitiesCardEntityConfig; @property() public secondaryText?: string; diff --git a/src/panels/lovelace/editor/card-editor/hui-card-preview.ts b/src/panels/lovelace/editor/card-editor/hui-card-preview.ts index 5512b1cfbcd7..a1c95829009f 100644 --- a/src/panels/lovelace/editor/card-editor/hui-card-preview.ts +++ b/src/panels/lovelace/editor/card-editor/hui-card-preview.ts @@ -10,7 +10,7 @@ import { LovelaceCard } from "../../types"; export class HuiCardPreview extends ReactiveElement { @property({ attribute: false }) public hass?: HomeAssistant; - @property() public config?: LovelaceCardConfig; + @property({ attribute: false }) public config?: LovelaceCardConfig; private _element?: LovelaceCard; diff --git a/src/panels/lovelace/editor/lovelace-editor/hui-lovelace-editor.ts b/src/panels/lovelace/editor/lovelace-editor/hui-lovelace-editor.ts index e3805d93f586..b735db367c9f 100644 --- a/src/panels/lovelace/editor/lovelace-editor/hui-lovelace-editor.ts +++ b/src/panels/lovelace/editor/lovelace-editor/hui-lovelace-editor.ts @@ -18,7 +18,7 @@ declare global { export class HuiLovelaceEditor extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property() public config?: LovelaceConfig; + @property({ attribute: false }) public config?: LovelaceConfig; get _title(): string { if (!this.config) {