mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2026-06-26 14:03:28 +00:00
Preserve tap action data for numeric picker actions
Pass tap_action.data into numeric menu items and merge it with the selected picker value before calling the Home Assistant service.
This commit is contained in:
@@ -163,6 +163,7 @@ class HomeAssistantMenuItemFactory {
|
||||
entity_id as Lang.String?,
|
||||
template as Lang.String?,
|
||||
action as Lang.String?,
|
||||
data as Lang.Dictionary?,
|
||||
picker as Lang.Dictionary,
|
||||
options as {
|
||||
:exit as Lang.Boolean,
|
||||
@@ -171,9 +172,12 @@ class HomeAssistantMenuItemFactory {
|
||||
:icon as WatchUi.Bitmap
|
||||
}
|
||||
) as WatchUi.MenuItem {
|
||||
var data = null;
|
||||
if (entity_id != null) {
|
||||
data = { "entity_id" => entity_id };
|
||||
if (data == null) {
|
||||
data = { "entity_id" => entity_id };
|
||||
} else {
|
||||
data["entity_id"] = entity_id;
|
||||
}
|
||||
}
|
||||
var keys = mMenuItemOptions.keys();
|
||||
for (var i = 0; i < keys.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user