Skip to content

Evaluate navigation_path in `navigation` action

Compare
Choose a tag to compare
@exetico exetico released this 02 Jan 10:25
· 33 commits to master since this release

What's Changed

  • We're now evaluating the navigation_path key in the navigation action, allowing the user to use a reference like element.id in the navigation_path, just like we evaluate post of all other ha-floorplan actions. We also added support for the navigation_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