mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 07:24:24 +01:00
implemented #479
This commit is contained in:
@@ -326,6 +326,9 @@ class LuiPagesGen(object):
|
|||||||
elif entityType == "script":
|
elif entityType == "script":
|
||||||
entityTypePanel = "button"
|
entityTypePanel = "button"
|
||||||
value = get_translation(self._locale, "frontend.ui.card.script.run")
|
value = get_translation(self._locale, "frontend.ui.card.script.run")
|
||||||
|
override = item.entity_input_config.get("action_name")
|
||||||
|
if override is not None:
|
||||||
|
value = override
|
||||||
elif entityType == "lock":
|
elif entityType == "lock":
|
||||||
entityTypePanel = "button"
|
entityTypePanel = "button"
|
||||||
value = get_translation(self._locale, "frontend.ui.card.lock.lock") if entity.state == "unlocked" else get_translation(self._locale, "frontend.ui.card.lock.unlock")
|
value = get_translation(self._locale, "frontend.ui.card.lock.lock") if entity.state == "unlocked" else get_translation(self._locale, "frontend.ui.card.lock.unlock")
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ key | optional | type | default | description
|
|||||||
`state_not` | True | string | `None` | Only displayed if Entity state is unequal to this value
|
`state_not` | True | string | `None` | Only displayed if Entity state is unequal to this value
|
||||||
`status` | True | string | `None` | Only valid for navigate and service items, adds a entity to track state for the icon
|
`status` | True | string | `None` | Only valid for navigate and service items, adds a entity to track state for the icon
|
||||||
`assumed_state` | True | string | `None` | Only for cover items, up, down and stop buttons are always shown
|
`assumed_state` | True | string | `None` | Only for cover items, up, down and stop buttons are always shown
|
||||||
|
`action_name` | True | string | `None` | Only valid for script; Button label
|
||||||
|
|
||||||
## Override Icons or Names
|
## Override Icons or Names
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user