feat: integrate light control functionality with Home Assistant
- Added LightHA class to manage light services. - Implemented searchLight method for device discovery. - Created app.ts and index.ts for application setup and routing. - Developed callText function to parse and execute light commands. - Established routes for handling Home Assistant control commands. - Configured Bun for building the application with TypeScript support.
This commit is contained in:
9
agent/app.ts
Normal file
9
agent/app.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { App } from '@kevisual/router'
|
||||
import { useContextKey } from '@kevisual/context';
|
||||
import { useConfig } from "@kevisual/use-config";
|
||||
|
||||
export const config = useConfig<{ HAAS_TOKEN: string, HAAS_URL: string, HAAS_MI_ENTITY_ID: string }>();
|
||||
|
||||
export const app = useContextKey<App>('app', () => {
|
||||
return new App();
|
||||
});
|
||||
Reference in New Issue
Block a user