I recently bought an Upsy Desky to help move my desk up and down. I would love to be able to control it in a nice and aesthetic way. If it is possible, can I change a slider to buttons?
To further specify what I mean, take a slider as an example. The slider has values ranging from 76-125m. I would like to have a button that goes up and one that goes down. When pressed, the up button will take the status of the current height sensor and add 5m to it. If I press and hold it, it will continuously add 5m until I let go and reach my desired height. Same goes for the down button, which will subtract 5m from the current state of the sensor. Also, the sensor which updates height is separate from the one to set height, therefore I must find a way to make these interlock together.
Thanks in advance for your help and best of wishes for y’all at home.
You’ll need 4 scripts to make this work: to save the presets (press and hold on one of the preset buttons calls this script - so you need it x4 or modify it to accept a button number as a variable and do one script)
alias: Office Desk - Store and Set Preset 1
sequence:
- service: input_number.set_value
data:
value: "{{ states('sensor.office_desk_desk_height') | float(0) | round(1) }}"
target:
entity_id: input_number.office_desk_preset_1
- service: button.press
data: {}
target:
entity_id: button.office_desk_set_preset_1
mode: single
icon: mdi:numeric-1-box-multiple-outline
As you can see I’m storing each preset in an input number.
Version 2 will collapse the current and target height into one control I just haven’t gotten around to making the changes. (will use mushroom template)