Shelly 2 as roller shutter with percentage

You have them both with the same name.

awning_position is the name I gave it. You can name yours anything you like but they must be different from each other.

input_number:
  awning_position:
    name: Awning Position
    icon: mdi:map-marker-distance
    initial: 0
    min: 0
    max: 100
    step: 10

#Estore slider
  awning_position_1:
    name: Awning Position 1
    icon: mdi:map-marker-distance
    initial: 0
    min: 0
    max: 100
    step: 10

You need the indentation.

apparently it will workā€¦ if all ok i will post full instructions for other users ok?

Glad you got it sorted.

What instructions was I missing?

hi thereā€¦well it does not work
automation is:

  • alias: ā€˜PosiĆ§Ć£o estore Suiteā€™
    initial_state: ā€˜onā€™
    trigger:
    • platform: state
      entity_id: input_number.awning_position_suite
      action:

    - delay: ā€˜00:00:3ā€™

    • service: mqtt.publish
      data_template:
      topic: ā€˜shellies/shellyswitch25-73C369/roller/0/command/posā€™
      retain: true
      payload: ā€œ{{ states(ā€˜input_number.awning_position_suiteā€™) | int }}ā€

and configuration yaml is:
input_number:
awning_position_suite:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10

#Estore slider
posica_estore_suite:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10

what am i doing wrong?

You need to format you code for it to be read correctly:

- alias: 'Set awning position'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_number.awning_position
  action:
    # - delay: '00:00:3'
    - service: mqtt.publish
      data_template:
        topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
        retain: true
        payload: "{{ states('input_number.awning_position') | int }}"

You have no indentation, thatā€™s the first place to start.

If you format the code so it displays correctly itā€™ll be easier to help you.

Screen2019-04-22_10-43-59_am

Do you mean it doesnā€™t do what you expect or itā€™s doesnā€™t pass config check?

Does it display in the front end?

hi
so it passes the config and can add the slider on the UI

image

config:

  input_number:
  awning_position:
    name: Posicao estore suite
    icon: mdi:map-marker-distance
    initial: 0
    min: 0
    max: 100
    step: 10

#Estore slider
  posica_estore_suite:
    name: Posicao estore suite
    icon: mdi:map-marker-distance
    initial: 0
    min: 0
    max: 100
    step: 10

automation file yaml:

- alias: 'Set awning position'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_number.awning_position
  action:
    # - delay: '00:00:3'
    - service: mqtt.publish
      data_template:
        topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
        retain: true
        payload: "{{ states('input_number.awning_position') | int }}"

thanks

You need to format all of the code.

Indentation is not correct for the input_number:

Everything below input_number needs to move right.

Or input_number needs to move left. Itā€™s difficult to tell with the formatting as is.

Thatā€™s better. Move the input_number left.

When you say itā€™s not working, what is happening?

input_number:
  awning_position:
    name: Posicao estore suite
    icon: mdi:map-marker-distance
    initial: 0
    min: 0
    max: 100
    step: 10

All that should happen is when you click on the slider line the cover will move to that position. The indicator doesnā€™t move with the cover, just in case thatā€™s what you were expecting.

Hi
what happens is this:

Image from the slider
image

image from built in code:
image

so it seams that they are not synced
since i am not at home now i dont know if the roller is really moving or not but i think not

- alias: 'Set awning position'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_number.awning_position
  action:
    # - delay: '00:00:3'
    - service: mqtt.publish
      data_template:
        topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
        retain: true
        payload: "{{ states('input_number.awning_position') | int }}"

config:
input_number:
awning_position:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10

    #Estore slider
      posicao_estore_suite:
        name: Posicao estore suite
        icon: mdi:map-marker-distance
        initial: 0
        min: 0
        max: 100
        step: 10

the entity i am adding is this one:
input_number.awning_position

Iā€™m not sure what you are trying to achieve but if you add a sensor you will be able to see what position the awning is.

sensor:
  - platform: mqtt
    name: "Awning Position"
    state_topic: "shellies/shellyswitch-Ā£Ā£Ā£Ā£Ā£Ā£/roller/0/pos"
    unit_of_measurement: "%"
    icon: mdi:percent

ok will try this night and give feedback !

hi againā€¦
i am so sorry for beeing a noob . you are helping a lot
so with the sensor i got the following:

but this is the result of changing this slider:
image

and not this one
image

that apparently is not getting the info to send to shelly :frowning:

current code:
config:

  input_number:
  awning_position:
    name: Posicao estore suite
    icon: mdi:map-marker-distance
    initial: 0
    min: 0
    max: 100
    step: 10

#Estore slider
  posicao_estore_suite:
    name: Posicao estore suite
    icon: mdi:map-marker-distance
    initial: 0
    min: 0
    max: 100
    step: 10

automation yaml:

- alias: 'Set awning position'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_number.awning_position
  action:
    # - delay: '00:00:3'
    - service: mqtt.publish
      data_template:
        topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
        retain: true
        payload: "{{ states('input_number.awning_position') | int }}"

input_number is still indented incorrectly. Move it left.

image
correct?

Yes. Thatā€™s it.

done but it does not workā€¦
apparently the slider does not send info i thinkā€¦
the sensor gives the correct info about the state but the slider, no matter where i move it does not impact the sensor

The sensor is getting itā€™s information from the Shelly so the Shelly must be responding to the slider.