fixup! adding ha addon support

This commit is contained in:
Gianmarco Pettinato 2024-01-29 14:00:47 +01:00
parent 96b91f85a2
commit e69e10de27

View File

@ -15,6 +15,8 @@ async function run() {
}
HA_MIDDLEWARE = await HAMiddleware.getInstance({
host: 'supervisor',
port: 80,
path: '/core/websocket',
token,
});
BRIDGE = getBridge();
@ -22,7 +24,11 @@ async function run() {
BRIDGE.start();
}
run().then().catch(LOGGER.error);
run()
.then()
.catch((error) => {
LOGGER.error(JSON.stringify(error));
});
process.on('SIGINT', () => {
HA_MIDDLEWARE.stop();