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:
@@ -173,12 +173,7 @@ router.get('/subscribe_events', middleware.wsRateLimiter, (req, res) => {
|
||||
|
||||
// SSE stats endpoint
|
||||
router.get('/get_sse_stats', middleware.authenticate, (_req, res) => {
|
||||
const stats = {
|
||||
clients: sseManager.getClientCount(),
|
||||
events: sseManager.getEventSubscriptions(),
|
||||
entities: sseManager.getEntitySubscriptions(),
|
||||
domains: sseManager.getDomainSubscriptions()
|
||||
};
|
||||
const stats = sseManager.getStatistics();
|
||||
res.json(stats);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user