Releases: ExperienceLovelace/ha-floorplan
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.
Expose states as datasets, fix for multipages and allow template-strings
Description
This release contains a three minor things, pushed through #232, #235 and #236. Thanks for the PR's! Now you can use dataset_set
to set a dataset on elements, there's a fix for multipages, and enabling the usage of template strings like element: floor.${entity.entity_id}
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
Bug-fix for ha-floorplan entity
Description
This release contains a single bug-fix 🐛.
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
- As mentioned in a discussion, we added a element named
*
which caused a few problems with the overall Home Assistant experience. That's now fixed with 68db68f.
hover_info_filter option added
Description
This release contains a single feature-implementation.
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
hover_info_filter
is now added. Use it within thedefaults
option. See more details in the docs. You'll also find a graphical example in #218.
Bug-fix for url and same_tab option added
Description
This release contains a single bug-fix, and includes a new same_tab
option for the nav
-action.
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
- As mentioned in the discussion and PR#185, a small bug prevented people to navigate to remote URL's. It's now fixed, and the
same_tab
option are added too, allowing people to navigate in the current window - instead of a new windows. The function takes use ofwindow.open()
just like Home Assistant. Thanks for the PR. Documentation will be updated soon.
Bug-fix for multiple events
Description
This release contains a single bug-fix.
Please do report, if you find anything that doesn't work after the following changes, listed below.
Changes
- As reported in #175, when clicking an element it causes the service to be called 4 times, instead of just 2, rendering unwanted results! This is now fixed with a simple patch.
Bug-fix for text_set - Moving from `title` to `tspan`
Description
This release contains a single bug-fix.
Changes
- As reported in #143, our text_set function wrapped the text in a
<title>
-tag, which could cause issues in some scenarios. We'll now wrap the text in a<tspan>
-element. If you're currently styling thetitle
-tag with CSS, kindly remember to replace it withtspan
.
Bug-fix for `double_tap_action`
Description
This release contains a single bug-fix.
Changes
- As reported in #132, we'd a few problems with the
double_tap_action
-function. It's now fixed. If you're using thedouble_tap_action
option, please note that single-tap actions will be delayed a bit, while it's waiting for the next click-action. The standard logics will be used, if thedouble_tap_action
are not in use, for each specific elements.