Closed Timofiev closed 2 years ago
Are you sure it doesn't already support linear-gradient as color attributes in the config? Because I technically just use what the user inputs there as the css attribute. So if you know how to use linear-gradient css attribute, then you'll maybe be able to do it already?
Let me know.
Works fine here.
Thanks, its all beautiful and all, but I still don't know how to set it up. I tried again with no success. Can you show me how your config looks like, so I can see what I'm doing wrong?
This is how it looks for me:
Thank you!
Sure, see background under card_mod style ".slider-container input[type="range"] {".
type: "custom:my-slider"
entity: "[[[ return variables.ulm_popup_light_entity ]]]"
minBar: "[[[ return states[variables.ulm_popup_light_entity].attributes.min_mireds ]]]"
minSet: "[[[ return states[variables.ulm_popup_light_entity].attributes.min_mireds ]]]"
maxBar: "[[[ return states[variables.ulm_popup_light_entity].attributes.max_mireds ]]]"
maxSet: "[[[ return states[variables.ulm_popup_light_entity].attributes.max_mireds ]]]"
function: "Warmth"
radius: "20px"
rotate: 270
containerHeight: "320px"
width: "250px"
height: "100px"
thumbHorizontalPadding: "0px"
thumbWidth: "0%"
thumbHeight: "85px"
thumbColor: "#000"
mainSliderColor: "rgba(255, 255, 255, 0)"
mainSliderColorOff: "rgba(255, 255, 255, 0)"
card_mod:
style: |
ha-card {
background: none !important;
box-shadow: none !important;
}
.slider-container input[type="range"] {
position: revert !important;
border: 0px solid rgba(208, 208, 208, 1) !important;
background: linear-gradient(90deg, #c9f2fc, #fff, #f3db6d);
--thumb-top: 0px !important;
--slider-secondary-color: none !important;
}
.slider-container input[type="range"]::-webkit-slider-thumb {
margin-top: 0px;
background-color: none;
}
.slider-container input[type="range"]::-moz-range-thumb {
background-color: none;
}
.slider-container {
display: flex;
justify-content: center;
align-items: center;
}
This should be possible in the new slider-v2 card. If not and you still need help, just open another issue and we will figure it out.
Hi!
I would like to set up a linear-gradient as a main and secondary color for brightness and for color temperature. I think it would be cool, but I cannot set it up. Is it possible at all or just simple colors are possible. Could you let me know if this is possible? Thanks!