3.5.2 - Slider Improvements
Changes in 3.5.2
- Slider
value_attribute
can now use attributes that are arrays, likehs_color[0]
. - Service call data can now include
VALUE
and templates in array data.
Slider Tooltip
Sliders now show a tooltip with the current value when held down on, similar to Home Assistant tile sliders. You can disable this by setting tooltip
to false in a custom action for the slider.
The slider has also been refactored so it should perform a bit better, and shouldn't prematurely update it's value right after it sends an action, causing it to rubber band between the old and new values. The logic for turning the slider on and off has also been improved so it should update faster.
As part of standardizing the slider in this project with my other custom tile feature project, some slider related fields have been deprecated and moved to a slider custom action (old remote configs should continue to work).
slider_range
->custom_actions.slider.range
.slider_style
->custom_actions.slider.style
.slider_attribute
->custom_actions.slider.value_attribute
.enable_slider_feedback
->custom_actions.slider.haptics
.
You can now also set the slider step
value in a custom action for the slider.
Haptics
You can now enable or disable haptics for specific buttons by setting haptics
to true or false within their custom actions.
The following fields have been renamed:
enable_button_feedback
->button_haptics
.enable_touchpad_feedback
->touchpad_haptics
.
custom_actions:
slider:
range:
- 0.5
- 1
step: 0.1
value_attribute: brightness # defaults to volume_level
tooltip: true # defaults to true so you don't really need this line
haptics: false # defaults to true
style:
'--border-radius': 4px
Other Changes
- Fixed slider ID logic bug which would cause multiple sliders in different copies of the same card to use the same slider ID or not work at all #67.
- And another issue where default actions were being overwritten in one copy of this card and those changes showing up in another.
Patch Version Changes
- Mouse and touch event handlers are now always added to the element to fix support on environments such as the MacOS Home Assistant app (which says it has touch event handlers even if the devices does not have a touch screen) and tablets with desktop browsers.
- Prevent context menu from appearing when using touch hold actions on desktop browsers.
- Prevent touchpad center action from firing at the end of a multi touch action.
- Slider
value_attribute
can now use attributes that are arrays, likehs_color[0]
. - Service call data can now include
VALUE
and templates in array data.
Full Changelog: 3.4.0...3.5.2