fixup! adding ha addon support
This commit is contained in:
@@ -15,6 +15,8 @@ async function run() {
|
|||||||
}
|
}
|
||||||
HA_MIDDLEWARE = await HAMiddleware.getInstance({
|
HA_MIDDLEWARE = await HAMiddleware.getInstance({
|
||||||
host: 'supervisor',
|
host: 'supervisor',
|
||||||
|
port: 80,
|
||||||
|
path: '/core/websocket',
|
||||||
token,
|
token,
|
||||||
});
|
});
|
||||||
BRIDGE = getBridge();
|
BRIDGE = getBridge();
|
||||||
@@ -22,7 +24,11 @@ async function run() {
|
|||||||
BRIDGE.start();
|
BRIDGE.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
run().then().catch(LOGGER.error);
|
run()
|
||||||
|
.then()
|
||||||
|
.catch((error) => {
|
||||||
|
LOGGER.error(JSON.stringify(error));
|
||||||
|
});
|
||||||
|
|
||||||
process.on('SIGINT', () => {
|
process.on('SIGINT', () => {
|
||||||
HA_MIDDLEWARE.stop();
|
HA_MIDDLEWARE.stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user