Fix incompatible boolean property types (#19337)

This commit is contained in:
Steve Repsher 2024-01-09 09:02:15 -05:00 committed by GitHub
parent 8583c879f2
commit 96a41704ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 124 additions and 124 deletions

View File

@ -11,7 +11,7 @@ class DemoBlackWhiteRow extends LitElement {
@property() value!: any;
@property() disabled = false;
@property({ type: Boolean }) public disabled = false;
protected render(): TemplateResult {
return html`

View File

@ -15,7 +15,7 @@ class DemoCard extends LitElement {
@property() public config!: DemoCardConfig;
@property() public showConfig = false;
@property({ type: Boolean }) public showConfig = false;
@state() private _size?: number;

View File

@ -12,7 +12,7 @@ class DemoMoreInfo extends LitElement {
@property() public entityId!: string;
@property() public showConfig!: boolean;
@property({ type: Boolean }) public showConfig = false;
render() {
const state = this._getState(this.entityId, this.hass.states);

View File

@ -23,7 +23,7 @@ export class StateHistoryChartTimeline extends LitElement {
@property({ attribute: false }) public data: TimelineEntity[] = [];
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public names?: Record<string, string>;

View File

@ -52,7 +52,7 @@ export class StateHistoryCharts extends LitElement {
@property({ attribute: false }) public historyData!: HistoryResult;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public names?: Record<string, string>;

View File

@ -61,7 +61,7 @@ export class HaStateLabelBadge extends LitElement {
@property() public image?: string;
@property() public showName?: boolean;
@property({ type: Boolean }) public showName = false;
@state() private _timerTimeRemaining?: number;

View File

@ -31,7 +31,7 @@ export class HaAssistPipelinePicker extends LitElement {
@property({ type: Boolean }) public required = false;
@property() public includeLastUsed = false;
@property({ type: Boolean }) public includeLastUsed = false;
@state() _pipelines?: AssistPipeline[];

View File

@ -54,9 +54,9 @@ export class HaDateRangePicker extends LitElement {
@state() private _ranges?: DateRangePickerRanges;
@property() public autoApply = false;
@property({ type: Boolean }) public autoApply = false;
@property() public timePicker = true;
@property({ type: Boolean }) public timePicker = true;
@property({ type: Boolean }) public disabled = false;

View File

@ -6,7 +6,7 @@ import { fireEvent } from "../common/dom/fire_event";
@customElement("ha-labeled-slider")
class HaLabeledSlider extends LitElement {
@property() public labeled? = false;
@property({ type: Boolean }) public labeled = false;
@property() public caption?: string;
@ -22,7 +22,7 @@ class HaLabeledSlider extends LitElement {
@property() public helper?: string;
@property() public extra = false;
@property({ type: Boolean }) public extra = false;
@property() public icon?: string;
@ -38,7 +38,7 @@ class HaLabeledSlider extends LitElement {
.min=${this.min}
.max=${this.max}
.step=${this.step}
labeled=${this.labeled}
.labeled=${this.labeled}
.disabled=${this.disabled}
.value=${this.value}
@change=${this._inputChanged}

View File

@ -11,7 +11,7 @@ import "./ha-icon-button";
class HaMenuButton extends LitElement {
@property({ type: Boolean }) public hassio = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property({ attribute: false }) public hass!: HomeAssistant;

View File

@ -21,7 +21,7 @@ export class HaThemePicker extends LitElement {
@property() public label?: string;
@property() includeDefault?: boolean = false;
@property({ type: Boolean }) includeDefault = false;
@property({ attribute: false }) public hass?: HomeAssistant;

View File

@ -35,13 +35,13 @@ import {
export class RecurrenceRuleEditor extends LitElement {
@property() public hass!: HomeAssistant;
@property() public disabled = false;
@property({ type: Boolean }) public disabled = false;
@property() public value = "";
@property() public dtstart?: Date;
@property() public allDay?: boolean;
@property({ type: Boolean }) public allDay = false;
@property({ attribute: false }) public locale!: HomeAssistant["locale"];

View File

@ -41,9 +41,9 @@ export class HaConfigApplicationCredentials extends LitElement {
@state() public _applicationCredentials: ApplicationCredential[] = [];
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -36,9 +36,9 @@ import {
export class HaConfigAreasDashboard extends SubscribeMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide?: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -11,11 +11,11 @@ import "./ha-config-areas-dashboard";
class HaConfigAreas extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
protected routerOptions: RouterOptions = {
defaultPage: "dashboard",

View File

@ -24,7 +24,7 @@ import "../ha-config-section";
export class HaBlueprintAutomationEditor extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property({ type: Boolean }) public disabled = false;

View File

@ -89,9 +89,9 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
@property() public automations!: AutomationEntity[];
@property() public isWide?: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -24,11 +24,11 @@ const equal = (a: AutomationEntity[], b: AutomationEntity[]): boolean => {
class HaConfigAutomation extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
@property() public automations: AutomationEntity[] = [];

View File

@ -19,11 +19,11 @@ declare global {
class HaConfigBlueprint extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
@property() public blueprints: Record<string, Blueprints> = {};

View File

@ -16,9 +16,9 @@ const NOT_LOGGED_IN_URLS = ["login", "register", "forgot-password"];
class HaConfigCloud extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -117,11 +117,11 @@ class HaConfigDashboard extends SubscribeMixin(LitElement) {
@property({ type: Boolean, reflect: true })
public narrow!: boolean;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public cloudStatus?: CloudStatus;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
@state() private _tip?: string;

View File

@ -40,7 +40,7 @@ export class HaDeviceEntitiesCard extends LitElement {
@property() public entities!: EntityRegistryStateEntry[];
@property() public showHidden = false;
@property({ type: Boolean }) public showHidden = false;
@state() private _extDisabledEntityEntries?: Record<
string,

View File

@ -15,7 +15,7 @@ export class HaDeviceCard extends LitElement {
@property() public device!: DeviceRegistryEntry;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`

View File

@ -7,7 +7,7 @@ import { classMap } from "lit/directives/class-map";
class MQTTDiscoveryPayload extends LitElement {
@property() public payload!: Record<string, unknown>;
@property() public showAsYaml = false;
@property({ type: Boolean }) public showAsYaml = false;
@property() public summary!: string;

View File

@ -14,9 +14,9 @@ class MQTTMessages extends LitElement {
@property() public direction!: string;
@property() public showAsYaml = false;
@property({ type: Boolean }) public showAsYaml = false;
@property() public showDeserialized = false;
@property({ type: Boolean }) public showDeserialized = false;
@property() public subscribedTopic!: string;

View File

@ -62,9 +62,9 @@ interface DeviceRowData extends DeviceRegistryEntry {
export class HaConfigDeviceDashboard extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow = false;
@property({ type: Boolean }) public narrow = false;
@property() public isWide = false;
@property({ type: Boolean }) public isWide = false;
@property() public entries!: ConfigEntry[];

View File

@ -16,11 +16,11 @@ import "./ha-config-devices-dashboard";
class HaConfigDevices extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
protected routerOptions: RouterOptions = {
defaultPage: "dashboard",

View File

@ -4,7 +4,7 @@ import { classMap } from "lit/directives/class-map";
@customElement("ha-config-section")
export class HaConfigSection extends LitElement {
@property() public isWide = false;
@property({ type: Boolean }) public isWide = false;
@property({ type: Boolean }) public vertical = false;

View File

@ -360,7 +360,7 @@ export const configSections: { [name: string]: PageNavigation[] } = {
class HaPanelConfig extends SubscribeMixin(HassRouterPage) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -13,7 +13,7 @@ import { HomeAssistant } from "../../../../types";
class HaCounterForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
private _item?: Partial<Counter>;

View File

@ -11,7 +11,7 @@ import { HomeAssistant } from "../../../../types";
class HaInputBooleanForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
private _item?: InputBoolean;

View File

@ -11,7 +11,7 @@ import { HomeAssistant } from "../../../../types";
class HaInputButtonForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
@state() private _name!: string;

View File

@ -14,7 +14,7 @@ import { HomeAssistant } from "../../../../types";
class HaInputDateTimeForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
private _item?: InputDateTime;

View File

@ -14,7 +14,7 @@ import { HomeAssistant } from "../../../../types";
class HaInputNumberForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
private _item?: Partial<InputNumber>;

View File

@ -20,7 +20,7 @@ import type { HomeAssistant } from "../../../../types";
class HaInputSelectForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
private _item?: InputSelect;

View File

@ -15,7 +15,7 @@ import { HomeAssistant } from "../../../../types";
class HaInputTextForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
private _item?: InputText;

View File

@ -44,7 +44,7 @@ const defaultFullCalendarConfig: CalendarOptions = {
class HaScheduleForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
@state() private _name!: string;

View File

@ -11,7 +11,7 @@ import { HomeAssistant } from "../../../../types";
class HaTimerForm extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public new?: boolean;
@property({ type: Boolean }) public new = false;
private _item?: Timer;

View File

@ -81,9 +81,9 @@ const getConfigEntry = (
export class HaConfigHelpers extends SubscribeMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -94,9 +94,9 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
@property({ type: Boolean, reflect: true }) public narrow!: boolean;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
@property() public route!: Route;

View File

@ -53,9 +53,9 @@ class HaConfigIntegrations extends SubscribeMixin(HassRouterPage) {
@property({ type: Boolean, reflect: true }) public narrow!: boolean;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
protected routerOptions: RouterOptions = {
defaultPage: "dashboard",

View File

@ -24,9 +24,9 @@ export const configTabs: PageNavigation[] = [
class MatterConfigRouter extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected routerOptions: RouterOptions = {
defaultPage: "dashboard",

View File

@ -28,7 +28,7 @@ import { IssueCommandServiceData } from "./types";
export class ZHAClusterCommands extends LitElement {
@property({ attribute: false }) public hass?: HomeAssistant;
@property() public isWide?: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public device?: ZHADevice;

View File

@ -20,7 +20,7 @@ export interface ClusterRowData extends Cluster {
export class ZHAClustersDataTable extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow = false;
@property({ type: Boolean }) public narrow = false;
@property() public clusters: Cluster[] = [];

View File

@ -10,9 +10,9 @@ import { HomeAssistant } from "../../../../../types";
class ZHAConfigDashboardRouter extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
private _configEntry = new URLSearchParams(window.location.search).get(
"config_entry"

View File

@ -40,7 +40,7 @@ const tabs = ["attributes", "commands"] as const;
export class ZHAManageClusters extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide?: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public device?: ZHADevice;

View File

@ -26,9 +26,9 @@ export const configTabs: PageNavigation[] = [
class ZWaveJSConfigRouter extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
private _configEntry = new URLSearchParams(window.location.search).get(
"config_entry"

View File

@ -56,9 +56,9 @@ type DataTableItem = Pick<
export class HaConfigLovelaceDashboards extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -19,9 +19,9 @@ export const lovelaceTabs = [
class HaConfigLovelace extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
protected routerOptions: RouterOptions = {
defaultPage: "dashboards",

View File

@ -41,9 +41,9 @@ import { showResourceDetailDialog } from "./show-dialog-lovelace-resource-detail
export class HaConfigLovelaceRescources extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -35,9 +35,9 @@ import {
export class HaConfigPerson extends LitElement {
@property({ attribute: false }) public hass?: HomeAssistant;
@property() public isWide?: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow?: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -24,11 +24,11 @@ const equal = (a: SceneEntity[], b: SceneEntity[]): boolean => {
class HaConfigScene extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
@property() public scenes: SceneEntity[] = [];

View File

@ -64,9 +64,9 @@ type SceneItem = SceneEntity & {
class HaSceneDashboard extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public route!: Route;

View File

@ -87,9 +87,9 @@ export class HaSceneEditor extends SubscribeMixin(
) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public route!: Route;
@ -97,7 +97,7 @@ export class HaSceneEditor extends SubscribeMixin(
@property() public scenes!: SceneEntity[];
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
@state() private _dirty = false;

View File

@ -27,11 +27,11 @@ const equal = (a: ScriptEntity[], b: ScriptEntity[]): boolean => {
class HaConfigScript extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public showAdvanced!: boolean;
@property({ type: Boolean }) public showAdvanced = false;
@property() public scripts: ScriptEntity[] = [];

View File

@ -70,9 +70,9 @@ class HaScriptPicker extends LitElement {
@property() public scripts!: ScriptEntity[];
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -44,9 +44,9 @@ export interface TagRowData extends Tag {
export class HaConfigTags extends SubscribeMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -27,9 +27,9 @@ export class HaConfigVoiceAssistantsAssistants extends LitElement {
ExposeEntitySettings
>;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -33,9 +33,9 @@ class HaConfigVoiceAssistants extends HassRouterPage {
@property({ attribute: false }) public cloudStatus!: CloudStatus;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public isWide!: boolean;
@property({ type: Boolean }) public isWide = false;
@state()
@consume({ context: entitiesContext, subscribe: true })

View File

@ -52,9 +52,9 @@ import { showZoneDetailDialog } from "./show-dialog-zone-detail";
export class HaConfigZone extends SubscribeMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public isWide?: boolean;
@property({ type: Boolean }) public isWide = false;
@property() public narrow?: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -23,7 +23,7 @@ declare global {
export class HaPanelCustom extends ReactiveElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route!: Route;

View File

@ -10,7 +10,7 @@ import { storeState } from "../../../util/ha-pref-storage";
class HaDebugConnectionRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`

View File

@ -6,7 +6,7 @@ import { HomeAssistant } from "../../types";
class DeveloperToolsRouter extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected routerOptions: RouterOptions = {
// defaultPage: "info",

View File

@ -19,7 +19,7 @@ class PanelDeveloperTools extends LitElement {
@property() public route!: Route;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected firstUpdated(changedProps) {
super.firstUpdated(changedProps);

View File

@ -41,7 +41,7 @@ For loop example getting entity values in the weather domain:
class HaPanelDevTemplate extends LitElement {
@property() public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@state() private _error?: string;

View File

@ -42,9 +42,9 @@ export class HuiEntityFilterCard
@property({ attribute: false }) public hass?: HomeAssistant;
@property() public isPanel = false;
@property({ type: Boolean }) public isPanel = false;
@property() public editMode = false;
@property({ type: Boolean }) public editMode = false;
@state() private _config?: EntityFilterCardConfig;

View File

@ -28,7 +28,7 @@ export abstract class HuiStackCard<T extends StackCardConfig = StackCardConfig>
@property({ attribute: false }) public hass?: HomeAssistant;
@property() public editMode?: boolean;
@property({ type: Boolean }) public editMode = false;
@property() protected _cards?: LovelaceCard[];

View File

@ -31,7 +31,7 @@ function extractMediaQueries(
export class HuiConditionalBase extends ReactiveElement {
@property({ attribute: false }) public hass?: HomeAssistant;
@property() public editMode?: boolean;
@property({ type: Boolean }) public editMode = false;
@property() protected _config?: ConditionalCardConfig | ConditionalRowConfig;

View File

@ -56,7 +56,7 @@ export class LovelacePanel extends LitElement {
@property({ attribute: false }) public hass?: HomeAssistant;
@property() public narrow?: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public route?: Route;

View File

@ -13,7 +13,7 @@ import { HomeAssistant } from "../../types";
class AdvancedModeRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@property() public coreUserData?: CoreFrontendUserData;

View File

@ -10,7 +10,7 @@ import type { HomeAssistant } from "../../types";
class HaEnableShortcutsRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`

View File

@ -10,7 +10,7 @@ import type { HomeAssistant } from "../../types";
class HaForcedNarrowRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`

View File

@ -14,7 +14,7 @@ import { HomeAssistant } from "../../types";
class HaPickDashboardRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
@state() private _dashboards?: LovelaceDashboard[];

View File

@ -13,7 +13,7 @@ import { HomeAssistant } from "../../types";
class DateFormatRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
const date = new Date();

View File

@ -12,7 +12,7 @@ import { HomeAssistant } from "../../types";
class FirstWeekdayRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`

View File

@ -9,7 +9,7 @@ import { HomeAssistant } from "../../types";
export class HaPickLanguageRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render() {
return html`

View File

@ -13,7 +13,7 @@ import { HomeAssistant } from "../../types";
class NumberFormatRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`

View File

@ -13,7 +13,7 @@ import { HomeAssistant } from "../../types";
class TimeFormatRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
const date = new Date();

View File

@ -13,7 +13,7 @@ import { HomeAssistant } from "../../types";
class TimeZoneRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
const date = new Date();

View File

@ -10,7 +10,7 @@ import { HomeAssistant } from "../../types";
class HaPushNotificationsRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
const platformLoaded = isComponentLoaded(this.hass, "notify.html5");

View File

@ -23,7 +23,7 @@ declare global {
class HaSetSuspendRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`

View File

@ -11,7 +11,7 @@ import type { HomeAssistant } from "../../types";
class HaSetVibrateRow extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public narrow!: boolean;
@property({ type: Boolean }) public narrow = false;
protected render(): TemplateResult {
return html`