Help with a service

Hi, new to HA and with a little-to zero knowledge of coding

I have installed a wifi switch for my awning.
I can see at services that there is a service
=cover.set_cover_position
and I get the following in developres tool

{
“entity_id”: “cover.50758014840d8e918614”,
“position”: 30
}

I assume that it means move the awning in some position

However when I call the service it does not respond

If for example I try the same with the service
cover.close_cover

it closes the awning

Is there something I could do-try in order to make the service
=cover.set_cover_position
to work?

I need to automate the awning if it is windy to move to a desired position but no totally closed

You need to post any code / entity configuration using the </> button above the edit box
spacing is important and normal paste destroys it

If I were you I’d create an input_number (look it up) to store desired position
I’d then create an automation triggered by a change in the above number to fire an action
the action I’d fire would be (i’m guessing here)

  - service: cover.set_cover_position
    entity_id: cover.50758014840d8e918614  ### who names these dang things and why havn't you changed it ???
      data_template: 
        position: "{{ states('input_number.my_awning_position' | int }}"

But I’m not 100% sure, put it through your check config and comeback if it complains

Thanks for your help

I don’t understand what you mean to
“to post any code / entity configuration using the </> button above the edit box”
can you please elaborate?

I read about input number and I can understand what I could do
However, I would like (somehow) to check first that my switch does support the service
cover.set_cover_position
Is there away to physical check it?

When you click reply …
A little box opens up for you to type text into …
In the header of “the box” … (not the whole popup) …
is a row of buttons to quote, embolden, italiscise …
The 7th one in … is … </> …

Check Service …
Go to “Developer Tools”
Click Services …
Select the service you want to test …
Select the entity you want to test this on …
Call the service …

It won’t let me as I don’t have any covers

I checked the service in developers tool
The awning stays still. No movement
This means that the switch doesn’t support the service?

I’m not sure, I don’t have an awning.
I do have dimmers and though I can use this to turn them on and off, I have not been able to set a level, so perhaps this is a bit limited.
Is the awning the only device you have?
Try something else.

I must admit in nearly 3 years of HA I’ve never used this feature til today.
I’d just write the automation and try it.
Maybe someone else can help

Try putting quotes around the 30 also.

{
“entity_id”: “cover.50758014840d8e918614”,
“position”: "30"
}

Just managed to try it. The answer is no movement at all.