This commit is contained in:
Darius
2025-11-17 21:22:16 +01:00
commit 17313da7f9
8 changed files with 286 additions and 0 deletions

25
src/homeassistant.ts Normal file
View File

@@ -0,0 +1,25 @@
export type HomeAssistantEntity = {
entity_id: string;
state: string;
attributes: {
state_class?: string;
unit_of_measurement?: string;
icon?: string;
friendly_name?: string;
[key: string]: unknown;
};
last_changed: string; // datetime string
last_reported: string; // datetime string
last_updated: string; // datetime string
context: {
id: string;
parent_id: string | null;
user_id: string | null;
};
};
export interface HomeAssistantDeskPositionResult {
raw: HomeAssistantEntity;
asBoolean: boolean;
asText: () => string;
}

2
src/index.ts Normal file
View File

@@ -0,0 +1,2 @@
export * from "./homeassistant";
export * from "./tidal";

14
src/tidal.ts Normal file
View File

@@ -0,0 +1,14 @@
export type TidalSong = {
title: string;
artists: string;
album: string;
playingFrom: string;
status: "playing" | "paused";
url: string;
current: string;
duration: string;
};
export type TidalVolume = {
volume: number;
};