Resolves #114 Error going back from settings

This commit is contained in:
estevez
2018-10-03 14:36:23 +03:00
parent ed3e4ba272
commit 285447a5b7
3 changed files with 118 additions and 56 deletions

View File

@ -37,15 +37,18 @@ class HomeAssistant {
EntityCollection get entities => _entities;
HomeAssistant(String url, String password, String authType) {
_hassioAPIEndpoint = url;
_hassioPassword = password;
_hassioAuthType = authType;
HomeAssistant() {
_entities = EntityCollection();
_uiBuilder = UIBuilder();
_messageQueue = SendMessageQueue(messageExpirationTime);
}
void updateConnectionSettings(String url, String password, String authType) {
_hassioAPIEndpoint = url;
_hassioPassword = password;
_hassioAuthType = authType;
}
Future fetch() {
if ((_fetchCompleter != null) && (!_fetchCompleter.isCompleted)) {
TheLogger.log("Warning","Previous fetch is not complited");