mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix incompatible number property types (#19349)
This commit is contained in:
parent
a5630a4a7d
commit
6ab5116c34
@ -65,7 +65,7 @@ export class StateHistoryCharts extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean, attribute: "up-to-now" }) public upToNow = false;
|
@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;
|
@property({ type: Boolean }) public showNames = true;
|
||||||
|
|
||||||
|
@ -7,15 +7,14 @@ import { HomeAssistant } from "../types";
|
|||||||
|
|
||||||
@customElement("ha-big-number")
|
@customElement("ha-big-number")
|
||||||
export class HaBigNumber extends LitElement {
|
export class HaBigNumber extends LitElement {
|
||||||
@property() public value!: number;
|
@property({ type: Number }) public value!: number;
|
||||||
|
|
||||||
@property() public unit?: string;
|
@property() public unit?: string;
|
||||||
|
|
||||||
@property({ attribute: "unit-position" })
|
@property({ attribute: "unit-position" })
|
||||||
public unitPosition: "top" | "bottom" = "top";
|
public unitPosition: "top" | "bottom" = "top";
|
||||||
|
|
||||||
@property({ attribute: false })
|
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||||
public hass?: HomeAssistant;
|
|
||||||
|
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
public formatOptions: Intl.NumberFormatOptions = {};
|
public formatOptions: Intl.NumberFormatOptions = {};
|
||||||
|
@ -14,11 +14,11 @@ class HaLabeledSlider extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public required = true;
|
@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;
|
@property() public helper?: string;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class HaLabeledSlider extends LitElement {
|
|||||||
|
|
||||||
@property() public icon?: string;
|
@property() public icon?: string;
|
||||||
|
|
||||||
@property() public value?: number;
|
@property({ type: Number }) public value?: number;
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
return html`
|
return html`
|
||||||
|
@ -10,7 +10,7 @@ import "../ha-input-helper-text";
|
|||||||
export class HaBooleanSelector extends LitElement {
|
export class HaBooleanSelector extends LitElement {
|
||||||
@property() public hass!: HomeAssistant;
|
@property() public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() public value?: number;
|
@property({ type: Boolean }) public value = false;
|
||||||
|
|
||||||
@property() public label?: string;
|
@property() public label?: string;
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@ export class HaNumberSelector extends LitElement {
|
|||||||
|
|
||||||
@property() public selector!: NumberSelector;
|
@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;
|
@property() public label?: string;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class StateCardTimer extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public inDialog = false;
|
@property({ type: Boolean }) public inDialog = false;
|
||||||
|
|
||||||
@property() public timeRemaining?: number;
|
@property({ type: Number }) public timeRemaining?: number;
|
||||||
|
|
||||||
private _updateRemaining: any;
|
private _updateRemaining: any;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user