diff --git a/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts b/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts index 5c8988441965..df47cd36904e 100644 --- a/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts @@ -1,14 +1,10 @@ -import type { CSSResultGroup, PropertyValues } from "lit"; -import { LitElement, css, html, nothing } from "lit"; +import type { PropertyValues } from "lit"; +import { LitElement, html, nothing } from "lit"; import { customElement, property, state } from "lit/decorators"; import { isUnavailableState } from "../../../data/entity"; -import type { ActionHandlerEvent } from "../../../data/lovelace/action_handler"; import { SENSOR_DEVICE_CLASS_TIMESTAMP } from "../../../data/sensor"; import type { HomeAssistant } from "../../../types"; import type { EntitiesCardEntityConfig } from "../cards/types"; -import { actionHandler } from "../common/directives/action-handler-directive"; -import { handleAction } from "../common/handle-action"; -import { hasAction } from "../common/has-action"; import { hasConfigOrEntityChanged } from "../common/has-changed"; import "../components/hui-generic-entity-row"; import "../components/hui-timestamp-display"; @@ -54,44 +50,20 @@ class HuiSensorEntityRow extends LitElement implements LovelaceRow { return html` -
- ${stateObj.attributes.device_class === - SENSOR_DEVICE_CLASS_TIMESTAMP && !isUnavailableState(stateObj.state) - ? html` - - ` - : this.hass.formatEntityState(stateObj)} -
+ ${stateObj.attributes.device_class === SENSOR_DEVICE_CLASS_TIMESTAMP && + !isUnavailableState(stateObj.state) + ? html` + + ` + : this.hass.formatEntityState(stateObj)}
`; } - - private _handleAction(ev: ActionHandlerEvent) { - handleAction(this, this.hass!, this._config!, ev.detail.action); - } - - static get styles(): CSSResultGroup { - return css` - div { - text-align: right; - } - .value { - direction: ltr; - } - `; - } } declare global {