Use /core/ instead of /api/ when connecting to supervisor directly

This commit is contained in:
Matthias Kleine
2026-04-28 11:05:24 +02:00
parent 9a24c2be91
commit 7575b129c0
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -106,6 +106,9 @@ Please check it https://www.smarthomejetzt.de/mit-iobroker-auf-eine-home-assista
--> -->
## Changelog ## 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) ### 2.0.3 (2026-04-02)
* (@GermanBluefox) Adapter was updated and migrated to TypeScript * (@GermanBluefox) Adapter was updated and migrated to TypeScript
* (@Titanium177) Added roles for states and added debouncing for reading states from hass * (@Titanium177) Added roles for states and added debouncing for reading states from hass
+1 -1
View File
@@ -228,7 +228,7 @@ export default class HASS extends EventEmitter {
} }
this.socket = new WebSocket( 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 }, { perMessageDeflate: false },
); );