initial
This commit is contained in:
25
src/homeassistant.ts
Normal file
25
src/homeassistant.ts
Normal 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
2
src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./homeassistant";
|
||||
export * from "./tidal";
|
||||
14
src/tidal.ts
Normal file
14
src/tidal.ts
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user