Releases: ExperienceLovelace/ha-floorplan
Evaluate `navigation_path` and `url_path` in the `navigate` and `url` action
What's Changed
- We're now evaluating the
navigation_path
key in thenavigate
action, and theurl_path
in theurl
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
- Fixed README-render in HACS
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.
Please note that 1.0.42 was a hot-fix release, and navigation_path
evaluation was added in 1.0.41. Therefore, the compare link are between 1.0.40 and 1.0.43.
Full Changelog: 1.0.40...1.0.43
Hotfix: Bring back description in HACS
What's Changed
- Kindly see release notes for version 1.0.41. This is a hotfix release, to make a few changes on how our repo acts with HACS.
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.41...1.0.42
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
Bug-fixes for clipPath SVG Element
What's Changed
- Bugfix so clipPaths doesn't trigger errors once we try and call the
getBBox
on each SVG element - Version Bump
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.
New Contributors
Full Changelog: 1.0.39...1.0.40
Improve text_set multi-line and single-line logics
Release notes
Our floorplan.text_set
service will now work as it did before version 1.0.37, if there's no new-lines provided. If the user provides a \n
or a escaped ones, we'll handle it as a multi-line, and replace the tspan element, and only preserve the style attribute. A dataset-key called ha_floorplan_notice
on the text element will inform the user about the impact of new-line characters in the text-value. Escaped ones are included, cause that's how we receive a value like servicedata: 'Two\n'
, if it's added though the Home Assistant GUI editor, as mentioned in #356.
What's Changed
Full Changelog: 1.0.38...1.0.39
Bug-fixes for `text_set`
Release notes
This release only contains bug-fixes related to 1.0.36 and 1.0.37. For those of you who has faced problems with text and tspan elements, we're sorry. In the test-phase with 1.0.36, no one raised a flag related to the the implemented bug. Now tspan should render as expected. If you're using line-breakes with \n
, please note that the style
attribute on the original tspan
element, will be copied to every new tspan
element. In other words, you can expect the style to impact all generated tspans, which can result in some odd scenarios.
We also saved a few problems with auto-generated dashboards conflicting with ha-floorplan, cause we added a sensor titled *
. That's now fixed, too.
Please use the Discussion section if you're unsure on where to get started, or how you should continue the ha-floorplan journey. If you're facing a problem after the 1.0.38 release, kindly raise an issue. Remember to include both SVG, YAML and CSS, and please strip down the example files to the bare-minimum.
Have a great one, everybody. Thank you for your continues usage of ha-floorplan, and helping other people out in our Discussions area on GitHub. That's much appreciated!
What's Changed
- Bug/text set use existing tspan - fixes #358 by @exetico in #364
- Better entity name to prv. cfl. in ha - Fixes #335 by @exetico in #365
- Bug/fix statis newline linebreak support by @exetico in #366
- Move style from old to new tspan el(s) by @exetico in #367
Other changes
- Bump nokogiri from 1.13.9 to 1.13.10 in /docs by @dependabot in #299
- Bump word-wrap from 1.2.3 to 1.2.5 by @dependabot in #352
- Bump nokogiri from 1.13.10 to 1.15.4 in /docs by @dependabot in #353
- Bump webpack from 5.75.0 to 5.76.0 by @dependabot in #354
Full Changelog: 1.0.37...1.0.38
Multi-line text, class_set and fix for duplicated SVG elements on config update
Attension
Release 1.0.36 was a pre-release. Please check it out for more details about the improvement of hover_action
, where you can add a class, while the cursor hovers over a element. And the text_set
where it's possible to generate multi-line elements. See Release 1.0.36 details here.
What's Changed
New Contributors
Full Changelog: 1.0.36...1.0.37
Handling multi-line text and class_set on hover
Description
This release contains two improvements related to our hover_action
and text_set
.
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
- Improvement: If class_set is used with
hover_action
it now supports settings a class like so:
hover_action:
- service: floorplan.class_set
service_data: '${element.matches(":hover") ? "hover" : ""}'
- Improvement:
text_set
will now try and handle multi-line text:
- service: floorplan.text_set
service_data:
element: sample.multilinegroup_text
shift_y_axis: 1.5em
text: |
> /* Split text to two tspans*/
return 'Multiline\nTSPAN-Print';
You can control each tspan offset with the shift_y_axis: 1.5em
key. If you have a x+y attribute on your tspan-element, but none on your text-element, we'll also move that to your text-element.
Improved `image_set` logics will now retain classes
Description
This release contains a single improvements. The image_set
service will now retain classes from the original image 💾. This could be a breaking change for the few of you, which maybe had used this as a "feature", rather than a "bug".
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
- Improvements: Our
image_set
service will now retain classes from the original image. In other words, if you're wrapping one image with another, the classes from the original will be retained. This has been changed, after inputs in our discussion-area.
New `execute` service to run JavaScripts functions
Description
This release contains one new feature, and a minor change. It's now possible to use the new execute
-service 🥳, to execute JavaScript, without having to use a service like class_set
. handleError is now changed, so the error-message is prioritized before error-stack.
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
- Feature: New
execute
service. Add your JavaScript, and execute it - instead of having to wrap your functions inclass_set
or using a custom component likenone:none
. See #260 for "how to use it".execute
will execute all JavaScript defined withinservice_data
(the string, or easy key with a string). See more things related to this in this discussion, and how to use browser_mod in combination withexecute
in our docs. - Change: handleError will now echo the message to our log, instead of the error stack. Check the browser console, for the error-stack.