diff --git a/README.md b/README.md index 84e3514..7b21cc8 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,9 @@ Please check it https://www.smarthomejetzt.de/mit-iobroker-auf-eine-home-assista --> ## Changelog +### **WORK IN PROGRESS** +* (@klein0r) Use /core/ instead of /api/ when connecting to supervisor directly (e.g. in ha app) + ### 2.0.3 (2026-04-02) * (@GermanBluefox) Adapter was updated and migrated to TypeScript * (@Titanium177) Added roles for states and added debouncing for reading states from hass diff --git a/src/lib/hass.ts b/src/lib/hass.ts index 21ed9f5..b2231e8 100644 --- a/src/lib/hass.ts +++ b/src/lib/hass.ts @@ -228,7 +228,7 @@ export default class HASS extends EventEmitter { } this.socket = new WebSocket( - `ws${this.options.secure ? 's' : ''}://${this.options.host}:${this.options.port}/api/websocket`, + `ws${this.options.secure ? 's' : ''}://${this.options.host}:${this.options.port}/${this.options.host === 'supervisor' ? 'core' : 'api'}/websocket`, { perMessageDeflate: false }, );