cleaned for new home

This commit is contained in:
2025-06-23 12:40:35 +02:00
parent e426efb80f
commit 1f4970c17c
173 changed files with 16228 additions and 24225 deletions

View File

@@ -0,0 +1,23 @@
import { HomeAssistant } from 'custom-card-helpers';
export interface ImageUploadResponse {
path: string;
file_id: string;
success: boolean;
error?: string;
warning?: string;
}
/**
* Uploads a file to the Home Assistant media source OR older image API.
* @param hass The Home Assistant object.
* @param file The file to upload.
* @returns The path of the uploaded file (/api/image/serve/<id> format).
* @throws An error if the upload fails or the response is invalid.
*/
export declare function uploadImage(hass: HomeAssistant, file: File): Promise<string>;
/**
* Gets the full URL for an uploaded image
* @param hass - Home Assistant instance
* @param path - Image path returned from upload
* @returns Full URL to the image
*/
export declare function getImageUrl(hass: HomeAssistant, path: string): string;