Handle entity taps and holds in one place

This commit is contained in:
Yegor Vialov
2018-11-23 15:06:42 +02:00
parent 67fbdb13c6
commit a0235ee385
7 changed files with 72 additions and 111 deletions

View File

@ -453,9 +453,9 @@ class HomeAssistant {
displayName: rawEntity["name"],
icon: rawEntity["icon"],
tapAction: rawEntity["tap_action"] ?? EntityTapAction.moreInfo,
holdAction: rawEntity["hold_action"] ?? EntityTapAction.moreInfo,
actionService: rawEntity["service"],
actionServiceData: rawEntity["service_data"] ?? {"entity_id": e.entityId}
holdAction: rawEntity["hold_action"] ?? EntityTapAction.none,
tapActionService: rawEntity["service"],
tapActionServiceData: rawEntity["service_data"] ?? {"entity_id": e.entityId}
)
);
}