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

@ -38,8 +38,8 @@ class _SwitchStateWidgetState extends State<SwitchStateWidget> {
} else {
domain = entity.domain;
}
eventBus.fire(new ServiceCallEvent(
domain, (newValue as bool) ? "turn_on" : "turn_off", entity.entityId, null));
ConnectionManager().callService(
domain, (newValue as bool) ? "turn_on" : "turn_off", entity.entityId, null);
}
@override