Evaluate navigation_path in `navigation` action
What's Changed
- We're now evaluating the
navigation_path
key in thenavigation
action, allowing the user to use a reference likeelement.id
in the navigation_path, just like we evaluate post of all other ha-floorplan actions. We also added support for thenavigation_replace
boolean, which is part of the the standard lovelace actions. See more details about navigation_replace here. - Version Bump
Here's a quick summary on how to use the navigation
action.
tap_action:
action: navigate
navigation_path: |
> const target = "/default-overview/alarm#" + element.id;
console.log(element.id, "target", target);
return target;
And also the simple way of doing so:
tap_action:
action: navigate
navigation_path: '/default-overview/alarm#${element.id}'
I'm aware of the Cannot find '*' in Home Assistant entities
error, if you try and use the *
key for the entity, like described in our docs. I'll fix this in the future, but no-one has mentioned this - and it has been in the codebase for a while. See #385.
Full Changelog: 1.0.40...1.0.41