Off the top of my head I would think no, because the slider in custom_ui is not a universal slider, but a ‘brightness’ slider, so probably specifically links to the light/brightness service.
Unless someone can tell you how to link it to your fan speed, then you’re going to need an input_number on the line below I think.
(totally happy to be wrong on this btw, and hope someone can help you get it working as desired)
I have finally make my button “oscillate” working fine for the dyson link fan.
I used the input_boolean to achiver this and it was quit difficult for me to understand the process. I want to share my code for the peeople interested:
input_boolean:
fan:
name: Fan
initial: off
- alias: 'Oscillate On'
trigger:
- platform: state
entity_id: input_boolean.fan
to: 'on'
action:
- service: script.turn_on
entity_id: script.1516402506314
- alias: 'Oscillate Off'
trigger:
- platform: state
entity_id: input_boolean.fan
to: 'off'
action:
- service: script.turn_on
entity_id: script.1516402701204
'1516402506314':
alias: Fan oscillate on
sequence:
- data:
entity_id: fan.salon
oscillating: 'true'
service: fan.oscillate
'1516402701204':
alias: Fan oscillate off
sequence:
- data:
entity_id: fan.salon
oscillating: 'false'
service: fan.oscillate