Refactor Home Assistant WebSocket Integration with Enhanced Type Safety

- Implemented a new HomeAssistantInstance class with comprehensive WebSocket handling
- Added robust authentication and message management for Home Assistant connections
- Created type-safe interfaces for states, services, and event subscriptions
- Updated import paths and simplified configuration loading
- Improved error handling and connection management for Home Assistant interactions
This commit is contained in:
jango-blockchained
2025-02-03 00:52:35 +01:00
parent 2da617c2d9
commit f049f439b9
3 changed files with 225 additions and 42 deletions

View File

@@ -54,6 +54,7 @@ export interface HassState {
};
}
// Add-on interfaces
export interface HassAddon {
name: string;
slug: string;
@@ -178,4 +179,7 @@ export interface AutomationConfigParams {
condition?: any[];
action: any[];
};
}
}
// Re-export Home Assistant types
export * from './hass.js';