Disable attributes for hass, stateObj, selector, and route properties (#19362)
* Disable attribute for hass properties * Disable attribute for stateObj properties * Disable attribute for selector properties * Disable attribute for route properties * Switch from Object type to no attribute for same properties
This commit is contained in:
parent
9f26bedf51
commit
70fcea0c2b
|
@ -11,7 +11,7 @@ export interface DemoCardConfig {
|
|||
|
||||
@customElement("demo-card")
|
||||
class DemoCard extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public config!: DemoCardConfig;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import "../ha-demo-options";
|
|||
class DemoCards extends LitElement {
|
||||
@property() public configs!: DemoCardConfig[];
|
||||
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@state() private _showConfig = false;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import { HomeAssistant } from "../../../src/types";
|
|||
|
||||
@customElement("demo-more-info")
|
||||
class DemoMoreInfo extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public entityId!: string;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { HomeAssistant } from "../../../src/types";
|
|||
|
||||
@customElement("demo-more-infos")
|
||||
class DemoMoreInfos extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public entities!: [];
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-climate")
|
||||
class DemoMoreInfoClimate extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-cover")
|
||||
class DemoMoreInfoCover extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-humidifier")
|
||||
class DemoMoreInfoHumidifier extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-input-number")
|
||||
class DemoMoreInfoInputNumber extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-input-text")
|
||||
class DemoMoreInfoInputText extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-light")
|
||||
class DemoMoreInfoLight extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-lock")
|
||||
class DemoMoreInfoLock extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ const ENTITIES = createMediaPlayerEntities();
|
|||
|
||||
@customElement("demo-more-info-media-player")
|
||||
class DemoMoreInfoMediaPlayer extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-number")
|
||||
class DemoMoreInfoNumber extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-scene")
|
||||
class DemoMoreInfoScene extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-timer")
|
||||
class DemoMoreInfoTimer extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-update")
|
||||
class DemoMoreInfoUpdate extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-vacuum")
|
||||
class DemoMoreInfoVacuum extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ const ENTITIES = [
|
|||
|
||||
@customElement("demo-more-info-water-heater")
|
||||
class DemoMoreInfoWaterHeater extends LitElement {
|
||||
@property() public hass!: MockHomeAssistant;
|
||||
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||
|
||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ export class HassioBackups extends LitElement {
|
|||
|
||||
@property({ attribute: false }) public supervisor!: Supervisor;
|
||||
|
||||
@property({ type: Object }) public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ export class HaEntityToggle extends LitElement {
|
|||
// hass is not a property so that we only re-render on stateObj changes
|
||||
public hass?: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
@property() public label?: string;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import "../ha-state-icon";
|
|||
export class StateBadge extends LitElement {
|
||||
public hass?: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
@property() public overrideIcon?: string;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { HomeAssistant } from "../types";
|
|||
class HaAttributeValue extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
@property() public attribute!: string;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import "./ha-expansion-panel";
|
|||
class HaAttributes extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
@property({ attribute: "extra-filters" }) public extraFilters?: string;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ interface FilterValue {
|
|||
|
||||
@customElement("ha-button-related-filter-menu")
|
||||
export class HaRelatedFilterButtonMenu extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public corner: Corner = "BOTTOM_START";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import "./ha-dialog";
|
|||
|
||||
@customElement("ha-dialog-date-picker")
|
||||
export class HaDialogDatePicker extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ const MASKED_FIELDS = ["password", "secret", "token"];
|
|||
|
||||
@customElement("ha-form-string")
|
||||
export class HaFormString extends LitElement implements HaFormElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||
|
||||
@property() public schema!: HaFormStringSchema;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ const rowRenderer: ComboBoxLitRenderer<IconItem | RankedIcon> = (item) =>
|
|||
|
||||
@customElement("ha-icon-picker")
|
||||
export class HaIconPicker extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ const createPanelNavigationItem = (hass: HomeAssistant, panel: PanelInfo) => ({
|
|||
|
||||
@customElement("ha-navigation-picker")
|
||||
export class HaNavigationPicker extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||
|
||||
@property() public label?: string;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import { HomeAssistant } from "../../types";
|
|||
|
||||
@customElement("ha-selector-action")
|
||||
export class HaActionSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: ActionSelector;
|
||||
@property({ attribute: false }) public selector!: ActionSelector;
|
||||
|
||||
@property() public value?: Action;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-addon-picker";
|
|||
|
||||
@customElement("ha-selector-addon")
|
||||
export class HaAddonSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: AddonSelector;
|
||||
@property({ attribute: false }) public selector!: AddonSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-area-filter";
|
|||
|
||||
@customElement("ha-selector-area_filter")
|
||||
export class HaAreaFilterSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: AreaFilterSelector;
|
||||
@property({ attribute: false }) public selector!: AreaFilterSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ import "../ha-areas-picker";
|
|||
|
||||
@customElement("ha-selector-area")
|
||||
export class HaAreaSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: AreaSelector;
|
||||
@property({ attribute: false }) public selector!: AreaSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-assist-pipeline-picker";
|
|||
|
||||
@customElement("ha-selector-assist_pipeline")
|
||||
export class HaAssistPipelineSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: AssistPipelineSelector;
|
||||
@property({ attribute: false }) public selector!: AssistPipelineSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-mount-picker";
|
|||
|
||||
@customElement("ha-selector-backup_location")
|
||||
export class HaBackupLocationSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: BackupLocationSelector;
|
||||
@property({ attribute: false }) public selector!: BackupLocationSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import "../ha-input-helper-text";
|
|||
|
||||
@customElement("ha-selector-boolean")
|
||||
export class HaBooleanSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Boolean }) public value = false;
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ import {
|
|||
|
||||
@customElement("ha-selector-color_temp")
|
||||
export class HaColorTempSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: ColorTempSelector;
|
||||
@property({ attribute: false }) public selector!: ColorTempSelector;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import { HomeAssistant } from "../../types";
|
|||
|
||||
@customElement("ha-selector-condition")
|
||||
export class HaConditionSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: ConditionSelector;
|
||||
@property({ attribute: false }) public selector!: ConditionSelector;
|
||||
|
||||
@property() public value?: Condition;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { ConstantSelector } from "../../data/selector";
|
|||
|
||||
@customElement("ha-selector-constant")
|
||||
export class HaSelectorConstant extends LitElement {
|
||||
@property() public selector!: ConstantSelector;
|
||||
@property({ attribute: false }) public selector!: ConstantSelector;
|
||||
|
||||
@property({ type: Boolean }) public disabled = false;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-conversation-agent-picker";
|
|||
|
||||
@customElement("ha-selector-conversation_agent")
|
||||
export class HaConversationAgentSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: ConversationAgentSelector;
|
||||
@property({ attribute: false }) public selector!: ConversationAgentSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-country-picker";
|
|||
|
||||
@customElement("ha-selector-country")
|
||||
export class HaCountrySelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: CountrySelector;
|
||||
@property({ attribute: false }) public selector!: CountrySelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-date-input";
|
|||
|
||||
@customElement("ha-selector-date")
|
||||
export class HaDateSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: DateSelector;
|
||||
@property({ attribute: false }) public selector!: DateSelector;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ import "../device/ha-devices-picker";
|
|||
|
||||
@customElement("ha-selector-device")
|
||||
export class HaDeviceSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: DeviceSelector;
|
||||
@property({ attribute: false }) public selector!: DeviceSelector;
|
||||
|
||||
@state() private _entitySources?: EntitySources;
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ import "../entity/ha-entity-picker";
|
|||
|
||||
@customElement("ha-selector-entity")
|
||||
export class HaEntitySelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: EntitySelector;
|
||||
@property({ attribute: false }) public selector!: EntitySelector;
|
||||
|
||||
@state() private _entitySources?: EntitySources;
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import "../ha-file-upload";
|
|||
|
||||
@customElement("ha-selector-file")
|
||||
export class HaFileSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: FileSelector;
|
||||
@property({ attribute: false }) public selector!: FileSelector;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ import "../ha-icon-picker";
|
|||
|
||||
@customElement("ha-selector-icon")
|
||||
export class HaIconSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: IconSelector;
|
||||
@property({ attribute: false }) public selector!: IconSelector;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-language-picker";
|
|||
|
||||
@customElement("ha-selector-language")
|
||||
export class HaLanguageSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: LanguageSelector;
|
||||
@property({ attribute: false }) public selector!: LanguageSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import "../ha-navigation-picker";
|
|||
|
||||
@customElement("ha-selector-navigation")
|
||||
export class HaNavigationSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: NavigationSelector;
|
||||
@property({ attribute: false }) public selector!: NavigationSelector;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import "../ha-textfield";
|
|||
|
||||
@customElement("ha-selector-number")
|
||||
export class HaNumberSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: NumberSelector;
|
||||
@property({ attribute: false }) public selector!: NumberSelector;
|
||||
|
||||
@property({ type: Number }) public value?: number;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import type { HaYamlEditor } from "../ha-yaml-editor";
|
|||
|
||||
@customElement("ha-selector-object")
|
||||
export class HaObjectSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import "../entity/ha-entity-state-picker";
|
|||
|
||||
@customElement("ha-selector-state")
|
||||
export class HaSelectorState extends SubscribeMixin(LitElement) {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: StateSelector;
|
||||
@property({ attribute: false }) public selector!: StateSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../entity/ha-statistics-picker";
|
|||
|
||||
@customElement("ha-selector-statistic")
|
||||
export class HaStatisticSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: StatisticSelector;
|
||||
@property({ attribute: false }) public selector!: StatisticSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-stt-picker";
|
|||
|
||||
@customElement("ha-selector-stt")
|
||||
export class HaSTTSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: STTSelector;
|
||||
@property({ attribute: false }) public selector!: STTSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import "../ha-target-picker";
|
|||
|
||||
@customElement("ha-selector-target")
|
||||
export class HaTargetSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: TargetSelector;
|
||||
@property({ attribute: false }) public selector!: TargetSelector;
|
||||
|
||||
@property() public value?: HassServiceTarget;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import "../ha-input-helper-text";
|
|||
|
||||
@customElement("ha-selector-template")
|
||||
export class HaTemplateSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import "../ha-textfield";
|
|||
|
||||
@customElement("ha-selector-text")
|
||||
export class HaTextSelector extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
@ -24,7 +24,7 @@ export class HaTextSelector extends LitElement {
|
|||
|
||||
@property() public helper?: string;
|
||||
|
||||
@property() public selector!: StringSelector;
|
||||
@property({ attribute: false }) public selector!: StringSelector;
|
||||
|
||||
@property({ type: Boolean }) public disabled = false;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import { HomeAssistant } from "../../types";
|
|||
|
||||
@customElement("ha-selector-trigger")
|
||||
export class HaTriggerSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: TriggerSelector;
|
||||
@property({ attribute: false }) public selector!: TriggerSelector;
|
||||
|
||||
@property() public value?: Trigger;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-tts-voice-picker";
|
|||
|
||||
@customElement("ha-selector-tts_voice")
|
||||
export class HaTTSVoiceSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: TTSVoiceSelector;
|
||||
@property({ attribute: false }) public selector!: TTSVoiceSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import "../ha-tts-picker";
|
|||
|
||||
@customElement("ha-selector-tts")
|
||||
export class HaTTSSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: TTSSelector;
|
||||
@property({ attribute: false }) public selector!: TTSSelector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ import { HomeAssistant } from "../../types";
|
|||
|
||||
@customElement("ha-selector-ui_action")
|
||||
export class HaSelectorUiAction extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: UiActionSelector;
|
||||
@property({ attribute: false }) public selector!: UiActionSelector;
|
||||
|
||||
@property() public value?: ActionConfig;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import { HomeAssistant } from "../../types";
|
|||
|
||||
@customElement("ha-selector-ui_color")
|
||||
export class HaSelectorUiColor extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public selector!: UiColorSelector;
|
||||
@property({ attribute: false }) public selector!: UiColorSelector;
|
||||
|
||||
@property() public value?: string;
|
||||
|
||||
|
|
|
@ -59,11 +59,11 @@ const LEGACY_UI_SELECTORS = new Set(["ui-action", "ui-color"]);
|
|||
|
||||
@customElement("ha-selector")
|
||||
export class HaSelector extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public name?: string;
|
||||
|
||||
@property() public selector!: Selector;
|
||||
@property({ attribute: false }) public selector!: Selector;
|
||||
|
||||
@property() public value?: any;
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||
|
||||
@property({ type: Boolean, reflect: true }) public narrow!: boolean;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ type: Boolean }) public alwaysExpand = false;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ declare global {
|
|||
|
||||
@customElement("ha-browse-media-tts")
|
||||
class BrowseMediaTTS extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public item!: MediaPlayerItem;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class MoreInfoViewLightColorPicker extends LitElement {
|
|||
|
||||
@property({ type: Boolean, reflect: true }) disabled = false;
|
||||
|
||||
@property() stateObj?: LightEntity;
|
||||
@property({ attribute: false }) public stateObj?: LightEntity;
|
||||
|
||||
@property() color!: LightColor;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ type MainControl = "temperature" | "humidity";
|
|||
class MoreInfoClimate extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: ClimateEntity;
|
||||
@property({ attribute: false }) public stateObj?: ClimateEntity;
|
||||
|
||||
@state() private _mainControl: MainControl = "temperature";
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { HomeAssistant } from "../../../types";
|
|||
class MoreInfoCounter extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import { HomeAssistant } from "../../../types";
|
|||
class MoreInfoDefault extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import {
|
|||
class MoreInfoGroup extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: GroupEntity;
|
||||
@property({ attribute: false }) public stateObj?: GroupEntity;
|
||||
|
||||
@state() private _groupDomainStateObj?: HassEntity;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import { moreInfoControlStyle } from "../components/more-info-control-style";
|
|||
class MoreInfoHumidifier extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HumidifierEntity;
|
||||
@property({ attribute: false }) public stateObj?: HumidifierEntity;
|
||||
|
||||
@state() public _mode?: string;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ const LAWN_MOWER_COMMANDS: LawnMowerCommand[] = [
|
|||
class MoreInfoLawnMower extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: LawnMowerEntity;
|
||||
@property({ attribute: false }) public stateObj?: LawnMowerEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -13,7 +13,7 @@ import { HomeAssistant } from "../../../types";
|
|||
class MoreInfoPerson extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
private _entityArray = memoizeOne((entityId: string) => [entityId]);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ const filterExtraAttributes = "activity_list,current_activity";
|
|||
class MoreInfoRemote extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: RemoteEntity;
|
||||
@property({ attribute: false }) public stateObj?: RemoteEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import { HomeAssistant } from "../../../types";
|
|||
class MoreInfoScript extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { HomeAssistant } from "../../../types";
|
|||
class MoreInfoSun extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { HomeAssistant } from "../../../types";
|
|||
class MoreInfoTimer extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: TimerEntity;
|
||||
@property({ attribute: false }) public stateObj?: TimerEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -100,7 +100,7 @@ const VACUUM_COMMANDS: VacuumCommand[] = [
|
|||
class MoreInfoVacuum extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: VacuumEntity;
|
||||
@property({ attribute: false }) public stateObj?: VacuumEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import { moreInfoControlStyle } from "../components/more-info-control-style";
|
|||
class MoreInfoWaterHeater extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: WaterHeaterEntity;
|
||||
@property({ attribute: false }) public stateObj?: WaterHeaterEntity;
|
||||
|
||||
protected render() {
|
||||
if (!this.stateObj) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import { HomeAssistant } from "../../../types";
|
|||
class MoreInfoWeather extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public stateObj?: WeatherEntity;
|
||||
@property({ attribute: false }) public stateObj?: WeatherEntity;
|
||||
|
||||
@state() private _forecastEvent?: ForecastEvent;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ export interface RouterOptions {
|
|||
const LOADING_SCREEN_THRESHOLD = 400; // ms
|
||||
|
||||
export class HassRouterPage extends ReactiveElement {
|
||||
@property() public route?: Route;
|
||||
@property({ attribute: false }) public route?: Route;
|
||||
|
||||
protected routerOptions!: RouterOptions;
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ export class HaTabsSubpageDataTable extends LitElement {
|
|||
*/
|
||||
@property({ type: Boolean }) public empty = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
/**
|
||||
* Array of tabs to show on the page.
|
||||
|
|
|
@ -38,7 +38,7 @@ interface EditSideBarEvent {
|
|||
export class HomeAssistantMain extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public route?: Route;
|
||||
@property({ attribute: false }) public route?: Route;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import {
|
|||
|
||||
@customElement("ha-recurrence-rule-editor")
|
||||
export class RecurrenceRuleEditor extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Boolean }) public disabled = false;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ export class HaConfigApplicationCredentials extends LitElement {
|
|||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@state() private _selected: string[] = [];
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ export class HaConfigAreasDashboard extends SubscribeMixin(LitElement) {
|
|||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@state() private _areas!: AreaRegistryEntry[];
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ export class HaBlueprintAutomationEditor extends LitElement {
|
|||
|
||||
@property() public config!: BlueprintAutomationConfig;
|
||||
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property({ attribute: false }) public stateObj?: HassEntity;
|
||||
|
||||
@state() private _blueprints?: Blueprints;
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
|
|||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@state() private _config?: AutomationConfig;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class HaAutomationPicker extends LitElement {
|
|||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property() public automations!: AutomationEntity[];
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class HaConfigCloud extends HassRouterPage {
|
|||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property() public cloudStatus!: CloudStatus;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ export class HaConfigDeviceDashboard extends LitElement {
|
|||
|
||||
@property() public manifests!: IntegrationManifest[];
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@state() private _searchParms = new URLSearchParams(window.location.search);
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ class HaPanelConfig extends SubscribeMixin(HassRouterPage) {
|
|||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
private _entitiesContext = new ContextProvider(this, {
|
||||
context: fullEntitiesContext,
|
||||
|
|
|
@ -85,7 +85,7 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
|
|||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@state() private _stateItems: HassEntity[] = [];
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
|||
|
||||
@property({ type: Boolean }) public showAdvanced = false;
|
||||
|
||||
@property() public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ attribute: false }) public configEntries?: ConfigEntryExtended[];
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import type { ZHADeviceEndpointDataTable } from "./zha-device-endpoint-data-tabl
|
|||
|
||||
@customElement("zha-add-group-page")
|
||||
export class ZHAAddGroupPage extends LitElement {
|
||||
@property({ type: Object }) public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
|
@ -68,9 +68,9 @@ export const zhaTabs: PageNavigation[] = [
|
|||
|
||||
@customElement("zha-config-dashboard")
|
||||
class ZHAConfigDashboard extends LitElement {
|
||||
@property({ type: Object }) public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Object }) public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ export interface DeviceEndpointRowData extends DataTableRowData {
|
|||
|
||||
@customElement("zha-device-endpoint-data-table")
|
||||
export class ZHADeviceEndpointDataTable extends LitElement {
|
||||
@property({ type: Object }) public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import type { ZHADeviceEndpointDataTable } from "./zha-device-endpoint-data-tabl
|
|||
|
||||
@customElement("zha-group-page")
|
||||
export class ZHAGroupPage extends LitElement {
|
||||
@property({ type: Object }) public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Object }) public group?: ZHAGroup;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ export interface GroupRowData extends ZHAGroup {
|
|||
export class ZHAGroupsDashboard extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Object }) public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
|
@ -57,9 +57,9 @@ import { configTabs } from "./zwave_js-config-router";
|
|||
|
||||
@customElement("zwave_js-config-dashboard")
|
||||
class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
|
||||
@property({ type: Object }) public hass!: HomeAssistant;
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Object }) public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import { configTabs } from "./zwave_js-config-router";
|
|||
class ZWaveJSLogs extends SubscribeMixin(LitElement) {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Object }) public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import { configTabs } from "./zwave_js-config-router";
|
|||
class ZWaveJSProvisioned extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ type: Object }) public route!: Route;
|
||||
@property({ attribute: false }) public route!: Route;
|
||||
|
||||
@property({ type: Boolean }) public narrow!: boolean;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue