mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 10:26:35 +00:00
Add HomeAssistant object hass to LovelaceCard interface (#1843)
This commit is contained in:
parent
ef0d11c042
commit
fbbbe7d17d
@ -26,7 +26,7 @@ interface Config extends LovelaceConfig {
|
|||||||
|
|
||||||
class HuiEntityButtonCard extends HassLocalizeLitMixin(LitElement)
|
class HuiEntityButtonCard extends HassLocalizeLitMixin(LitElement)
|
||||||
implements LovelaceCard {
|
implements LovelaceCard {
|
||||||
protected hass?: HomeAssistant;
|
public hass?: HomeAssistant;
|
||||||
protected config?: Config;
|
protected config?: Config;
|
||||||
|
|
||||||
static get properties(): PropertyDeclarations {
|
static get properties(): PropertyDeclarations {
|
||||||
|
@ -37,7 +37,7 @@ interface Config extends LovelaceConfig {
|
|||||||
|
|
||||||
export class HuiGlanceCard extends HassLocalizeLitMixin(LitElement)
|
export class HuiGlanceCard extends HassLocalizeLitMixin(LitElement)
|
||||||
implements LovelaceCard {
|
implements LovelaceCard {
|
||||||
protected hass?: HomeAssistant;
|
public hass?: HomeAssistant;
|
||||||
protected config?: Config;
|
protected config?: Config;
|
||||||
protected configEntities?: EntityConfig[];
|
protected configEntities?: EntityConfig[];
|
||||||
|
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
|
import { HomeAssistant } from "../../types.js";
|
||||||
|
|
||||||
export interface LovelaceConfig {
|
export interface LovelaceConfig {
|
||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LovelaceCard {
|
export interface LovelaceCard extends HTMLElement {
|
||||||
|
hass?: HomeAssistant;
|
||||||
getCardSize(): number;
|
getCardSize(): number;
|
||||||
setConfig(config: LovelaceConfig): void;
|
setConfig(config: LovelaceConfig): void;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user