Eshome call service blind position

Good afternoon. I’m working with esphome with a switch, making various combinations of touches.
I can’t call the service to position the blind in a certain position.
Someone can help me?

#Botao escritorio    
binary_sensor:
  - platform: gpio
    pin:
      number: D3
      mode: INPUT_PULLUP
      inverted: true
    name: "Botão escritório"
    on_multi_click:
      - timing:
        - ON for at most 0.5s
        - OFF for at least 0.5s
        then:
          - homeassistant.service:
              service: cover.set_cover_position
              data:
                entity_id: cover.estore_anexo_80
                position: 50%

Following the Template Cover Integration, this probably should be:

position: 50

in esphome, without the “%” does not accept

Maybe something like this ?

service: cover.set_cover_position
target:
  entity_id: cover.estore_anexo_80
data:
  position: 50

Captura de ecrã 2021-10-28 195842

Neither.
In ESPHome I can’t use the “target”

That something you should mention to Esphome on the github or discord.
HA wants an INT and ESPhome wants a string :smiley:

Anyway. just put the position in “” and it will work (just tested it)

          - homeassistant.service:
              service: cover.set_cover_position
              data:
                entity_id: cover.estore_anexo_80
                position: "50"

Always check your logs, i found out by looking at both ESPhome and HA logs.
The HA log said:

voluptuous.error.MultipleInvalid: expected int for dictionary value @ data['position']

So i knew it was ESPhome that was sending out a wrong message.

Thank you
:slight_smile:

It was shown in your ESPHome Editor error message that you should add the quotes.

Anyway, just out of interest: does it also work if you do this:
position: 50.0