Fix incompatible number property types (#19349)

This commit is contained in:
Steve Repsher 2024-01-10 04:49:35 -05:00 committed by GitHub
parent a5630a4a7d
commit 6ab5116c34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 12 deletions

View File

@ -65,7 +65,7 @@ export class StateHistoryCharts extends LitElement {
@property({ type: Boolean, attribute: "up-to-now" }) public upToNow = false;
@property() public hoursToShow?: number;
@property({ type: Number }) public hoursToShow?: number;
@property({ type: Boolean }) public showNames = true;

View File

@ -7,15 +7,14 @@ import { HomeAssistant } from "../types";
@customElement("ha-big-number")
export class HaBigNumber extends LitElement {
@property() public value!: number;
@property({ type: Number }) public value!: number;
@property() public unit?: string;
@property({ attribute: "unit-position" })
public unitPosition: "top" | "bottom" = "top";
@property({ attribute: false })
public hass?: HomeAssistant;
@property({ attribute: false }) public hass?: HomeAssistant;
@property({ attribute: false })
public formatOptions: Intl.NumberFormatOptions = {};

View File

@ -14,11 +14,11 @@ class HaLabeledSlider extends LitElement {
@property({ type: Boolean }) public required = true;
@property() public min: number = 0;
@property({ type: Number }) public min = 0;
@property() public max: number = 100;
@property({ type: Number }) public max = 100;
@property() public step: number = 1;
@property({ type: Number }) public step = 1;
@property() public helper?: string;
@ -26,7 +26,7 @@ class HaLabeledSlider extends LitElement {
@property() public icon?: string;
@property() public value?: number;
@property({ type: Number }) public value?: number;
protected render() {
return html`

View File

@ -10,7 +10,7 @@ import "../ha-input-helper-text";
export class HaBooleanSelector extends LitElement {
@property() public hass!: HomeAssistant;
@property() public value?: number;
@property({ type: Boolean }) public value = false;
@property() public label?: string;

View File

@ -14,9 +14,9 @@ export class HaNumberSelector extends LitElement {
@property() public selector!: NumberSelector;
@property() public value?: number;
@property({ type: Number }) public value?: number;
@property() public placeholder?: number;
@property({ type: Number }) public placeholder?: number;
@property() public label?: string;

View File

@ -21,7 +21,7 @@ class StateCardTimer extends LitElement {
@property({ type: Boolean }) public inDialog = false;
@property() public timeRemaining?: number;
@property({ type: Number }) public timeRemaining?: number;
private _updateRemaining: any;