diff --git a/src/data/media-player.ts b/src/data/media-player.ts new file mode 100644 index 0000000000..7d89d4d544 --- /dev/null +++ b/src/data/media-player.ts @@ -0,0 +1,4 @@ +export const SUPPORT_PAUSE = 1; +export const SUPPORT_NEXT_TRACK = 32; +export const SUPPORTS_PLAY = 16384; +export const OFF_STATES = ["off", "idle"]; diff --git a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts index 10c3860b67..907255ed3b 100644 --- a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts @@ -8,11 +8,12 @@ import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin"; import { EntityRow, EntityConfig } from "./types"; import { HomeAssistant } from "../../../types"; import { HassEntity } from "home-assistant-js-websocket"; - -const SUPPORT_PAUSE = 1; -const SUPPORT_NEXT_TRACK = 32; -const SUPPORTS_PLAY = 16384; -const OFF_STATES = ["off", "idle"]; +import { + SUPPORTS_PLAY, + SUPPORT_NEXT_TRACK, + OFF_STATES, + SUPPORT_PAUSE, +} from "../../../data/media-player"; class HuiMediaPlayerEntityRow extends hassLocalizeLitMixin(LitElement) implements EntityRow {