Show entity page on main page

This commit is contained in:
Yegor Vialov
2019-10-28 17:59:47 +00:00
parent 327f623ef7
commit b34cc97080
24 changed files with 186 additions and 147 deletions

View File

@ -7,11 +7,11 @@ class LockStateWidget extends StatelessWidget {
const LockStateWidget({Key key, this.assumedState: false}) : super(key: key);
void _lock(Entity entity) {
eventBus.fire(new ServiceCallEvent("lock", "lock", entity.entityId, null));
ConnectionManager().callService("lock", "lock", entity.entityId, null);
}
void _unlock(Entity entity) {
eventBus.fire(new ServiceCallEvent("lock", "unlock", entity.entityId, null));
ConnectionManager().callService("lock", "unlock", entity.entityId, null);
}
@override