Operating blinds through slider

I have an input_number slider for my blinds with steps on 0, 25, 50, 75, 100.

I’m trying to get a script working, for opening my blinds for xx % by using the slider.

Tried following code but get an error on the position.

alias: script blinds s1
sequence:
  - device_id: 68b68dcd04142528ed4783da46284140
    domain: cover
    entity_id: cover.ikea_of_sweden_fyrtur_block_out_roller_blind_cover
    type: set_position
    position: states.input_number.slider_blinds_s1
mode: single

Shouldn’t you call a service ?
service: cover.set_cover_position
data: {}
target:
entity_id: cover.192

Btw, seen the custom blinds card possibly custom:cover-position-preset-row? I like the presets feature on that.

1 Like

I think you might want an automation instead of a script. E.g.,:

- alias: Set blind position
  trigger:
  - platform: state
    entity_id: input_number.slider_blinds_s1
    for: "00:00:02"
  action:
  - service: cover.set_cover_position
    target:
      entity_id: cover.ikea_of_sweden_fyrtur_block_out_roller_blind_cover
    data:
      position: "{{ trigger.to_state.state }}"

This automation will trigger whenever the slider changes and maintains the new value for at least 2 seconds. (The “for” part is to prevent the automation triggering while you’re changing the slider.") Then it will set the cover position to the new state of the slider.

Can you set them to the physical positions your require then set a scene at that position and then call the scene?

I have seen and tested the custom blinds card, for some reason it works but then suddenly i can’t select 0% anymore, it stops working…

when i set position through a script, that works…

have a lot of problems with the fyrturs, tried configuring a second one and the first stopped working

considering buying a tradfri hub, cause maybe that will give a solution to my problems?

thx, trying this i get an error:

Message malformed: required key not provided @ data[‘action’]

You have indentation errors.

All rows between trigger and action needs to be indented two steps.
And everything below action also needs to extra spaces.

Edit… no sorry. You need to remove spaces on trigger and action, they should not be indented. The other parts is correct.

Can you show me your YAML code? That was intended to go into automations.yaml. Where did you put it?

1 Like

made a new automation, set to yaml editor and pasted the code

That, of course, will not work. That code snippet, as I said, was intended to be pasted directly into automations.yaml. If you want to do it via the UI in YAML mode, then you have to understand how YAML works. Basically, that first dash character means it’s an entry in a list. That’s not appropriate in the UI YAML editor for a single automation. It would look like this:

alias: Set blind position
trigger:
  - platform: state
    entity_id: input_number.slider_blinds_s1
    for: "00:00:02"
action:
  - service: cover.set_cover_position
    target:
      entity_id: cover.ikea_of_sweden_fyrtur_block_out_roller_blind_cover
    data:
      position: "{{ trigger.to_state.state }}"
- id: '1666811425606'
  alias: Nieuwe automatisering2
  description: ''
  trigger:
  - platform: state
    entity_id: input_number.slider_blinds_s1
    for: 00:00:02
  condition: []
  action:
  - service: cover.set_cover_position
    target:
      entity_id: cover.ikea_of_sweden_fyrtur_block_out_roller_blind_cover
    data:
      position: '{{ trigger.to_state.state }}'
  mode: single

got it, this is from my automations.yaml

but the roller blinds don’t respond

Thanks for all the replies, but i’m going to wait and buy a tradfri hub, the dirigera, and try later on

this is so unreliable, working with zha directly to the fyrtur, one moment everything works fine, and then nothing works…

tried again through my former buttons that worked, but now it fails