Refactoring: Entity classes by action type. Wntity widget building in

entity
This commit is contained in:
estevez
2018-09-29 13:49:25 +03:00
parent 4b4fc338f6
commit 067ccfde02
5 changed files with 180 additions and 148 deletions

View File

@ -44,12 +44,23 @@ class haUtils {
class StateChangedEvent {
String entityId;
String newState;
bool setToCollection;
StateChangedEvent(this.entityId);
StateChangedEvent(this.entityId, this.newState, this.setToCollection);
}
class SettingsChangedEvent {
bool reconnect;
SettingsChangedEvent(this.reconnect);
}
class ServiceCallEvent {
String domain;
String service;
String entityId;
Map<String, String> additionalParams;
ServiceCallEvent(this.domain, this.service, this.entityId, this.additionalParams);
}