Remove services requesting

This commit is contained in:
Yegor Vialov 2020-03-15 12:34:16 +00:00
parent 5b3ceecb0e
commit c4c67747c5

View File

@ -11,7 +11,6 @@ class HomeAssistant {
EntityCollection entities; EntityCollection entities;
HomeAssistantUI ui; HomeAssistantUI ui;
Map _instanceConfig = {}; Map _instanceConfig = {};
Map services;
String _userName; String _userName;
bool childMode; bool childMode;
HSVColor savedColor; HSVColor savedColor;
@ -60,7 +59,6 @@ class HomeAssistant {
futures.add(_getLovelace()); futures.add(_getLovelace());
} }
futures.add(_getConfig()); futures.add(_getConfig());
futures.add(_getServices());
futures.add(_getUserInfo()); futures.add(_getUserInfo());
futures.add(_getPanels()); futures.add(_getPanels());
Future.wait(futures).then((_) { Future.wait(futures).then((_) {
@ -140,15 +138,6 @@ class HomeAssistant {
}); });
} }
Future _getServices() async {
await ConnectionManager().sendSocketMessage(type: "get_services").then((data) {
Logger.d("Got ${data.length} services");
services = data;
}).catchError((e) {
Logger.w("Can't get services: $e");
});
}
Future _getPanels() async { Future _getPanels() async {
panels.clear(); panels.clear();
await ConnectionManager().sendSocketMessage(type: "get_panels").then((data) { await ConnectionManager().sendSocketMessage(type: "get_panels").then((data) {