Refactor SSE and Home Assistant Integration with Enhanced Configuration
- Simplified SSE statistics retrieval in routes - Extended Home Assistant configuration with additional connection parameters - Implemented comprehensive Home Assistant instance methods for services, states, and events - Cleaned up and type-refined Home Assistant interfaces - Improved WebSocket event handling and type conversion
This commit is contained in:
@@ -15,7 +15,9 @@ config({ path: resolve(process.cwd(), envFile) });
|
||||
export const HASS_CONFIG = {
|
||||
HOST: process.env.HASS_HOST || 'http://homeassistant.local:8123',
|
||||
TOKEN: process.env.HASS_TOKEN,
|
||||
SOCKET_URL: process.env.HASS_SOCKET_URL || 'ws://homeassistant.local:8123/api/websocket'
|
||||
SOCKET_URL: process.env.HASS_SOCKET_URL || 'ws://homeassistant.local:8123/api/websocket',
|
||||
BASE_URL: process.env.HASS_HOST || 'http://homeassistant.local:8123',
|
||||
SOCKET_TOKEN: process.env.HASS_TOKEN
|
||||
};
|
||||
|
||||
// Server Configuration
|
||||
|
||||
Reference in New Issue
Block a user