Resolves #370 Camera stream support

This commit is contained in:
Yegor Vialov
2020-02-20 14:33:03 +00:00
parent 2f4c06e9b5
commit 35d8607484
5 changed files with 113 additions and 26 deletions

View File

@ -119,6 +119,17 @@ class HomeAssistant {
return completer.future;
}
Future getCameraStream(String entityId) {
Completer completer = Completer();
ConnectionManager().sendSocketMessage(type: "camera/stream", additionalData: {"entity_id": entityId}).then((data) {
completer.complete(data);
}).catchError((e) {
completer.completeError(e);
});
return completer.future;
}
Future _getUserInfo() async {
_userName = null;
await ConnectionManager().sendSocketMessage(type: "auth/current_user").then((data) {