import { html } from "@polymer/polymer/lib/utils/html-tag.js"; /* eslint-plugin-disable lit */ import { PolymerElement } from "@polymer/polymer/polymer-element.js"; import { computeStateName } from "../../common/entity/compute_state_name"; import { computeRTL } from "../../common/util/compute_rtl"; import "../ha-relative-time"; import "./state-badge"; class StateInfo extends PolymerElement { static get template() { return html` ${this.styleTemplate} ${this.stateBadgeTemplate} ${this.infoTemplate} `; } static get styleTemplate() { return html` `; } static get stateBadgeTemplate() { return html` `; } static get infoTemplate() { return html`
[[computeStateName(stateObj)]]
`; } static get properties() { return { hass: Object, stateObj: Object, inDialog: { type: Boolean, value: () => false, }, rtl: { type: Boolean, reflectToAttribute: true, computed: "computeRTL(hass)", }, }; } computeStateName(stateObj) { return computeStateName(stateObj); } computeRTL(hass) { return computeRTL(hass); } } customElements.define("state-info", StateInfo);