-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circleslider doesn't work on scale 15-25 #182
Comments
It might be the angle that is the actual problem. There is an upcoming fix for some math related (sin/cos) problems that might solve your problem. I will add a comment in this issue if I pushed the changes out to Github as a new version! |
tyvm ! it's really weird that it's only with that exact scale (as far as i've found) |
Currently testing with this test-set of circular sliders, see #187 You can see I have sliders in every quadrant (sin/cos related). With my development version these at least work, but with the current Github version only a few work, so that is progress 😄 You also might see that in card 3 tool parts (brightness part) or - as in card 6 - even the whole toolset disappears depending on the state of the light. Different opacity for slider in card 6 (1.0 instead of 0.3), depending on the brightness slider value: For this to work, as in the state of an entity 'controls' another entity, there is support for multiple entities ( - type: 'custom:swiss-army-knife-card'
entities:
- entity: light.livingroom_light_duo_right_light
name: 'CircSlider Test'
- entity: light.livingroom_light_duo_right_light
attribute: brightness
unit: "%"
format: brightness
aspectratio: 1/1 # Card is 100x100 grid
layout:
styles:
card:
toolsets:
# ================================================================
- toolset: circ-slider-test
position:
cx: 50
cy: 50
tools:
# ------------------------------------------------------------
- type: circslider
position:
cx: 50
cy: 50
radius: 40
start_angle: 0
end_angle: 360
label:
placement: 'position'
cx: 50.01
cy: 50.01
# entity_index: 1
entity_indexes:
- entity_index: 1 # Entity index 1 is the default (brightness)
- entity_index: 0 # Entity index 0 is the extra entity
animations:
- state: '50' # Set opacity to 0.3 if brightness >= 50%
operator: '>='
reuse: true
styles:
track:
opacity: 0.3
transition: opacity 1s ease
- state: '50' # Set opacity to 1.0 if brightness < 50%
operator: '<'
reuse: true
styles:
track:
opacity: 1
transition: opacity 1s ease
- state: 'on'
entity_index: 0 # Explicitly use entity index (light state) here
reuse: true
styles:
track:
stroke: red
tool:
display: initial # Display tool
- state: 'off' # Light switched off: remove complete tool setting display to none.
reuse: true
entity_index: 0
styles:
tool:
display: none # Remove tool from displaying
Thanks for the heads up! |
FYI: bug still exists for me in current release, both on iphone and opera. (was marked as fixed in release notes) |
According to my notes, I tested the Getting older… |
This is a funny bug. I thought that there was something wrong with the slider itself, ie that the start/stop angle of the circular slider is causing this, but all the sliders in the screenshots above can't handle the 15-25 scale: they all freak out at a value of 20 and go back to 15. You get the same results with a scale range 25-35, and with 24-35 for instance. But 24-36 also. Weird stuff. No errors on the console, and no crashes. Just weird results 😨 Must dig deeper. |
Bug description
Circleslider somehow bugs out with a scale of 15-25. the sliding doesn't work as it should and is impossible to set once you reach about halfway.
To Reproduce
Steps to reproduce the behavior:
create circle slider with said scale:
Expected behavior
it should just slide
Desktop browser (please complete the following information):
opera browser, windows
Companion App on Smartphone/Tablet (please complete the following information):
iphone 12 (normal)
Additional context
i tried multiple scales, all work really well except for some reason if its 15-25.
tried: scales 0-10 0-100 5-25 ...
scales: 0.5, 1, unset.
(Optional): Suggested Solution
temporary solution is setting scale 14-25 or 15-26.
The text was updated successfully, but these errors were encountered: