How to invert the states with a sunshade + Sonoff?

I have a sunshade with a Sonoff CH4Pro (Tamosta) and I followed the instructions on this thread:

Everyhing is working BUT:
When the sunshade is rolled up the status is “open” and when is down the status is “closed”.
I need to invert them.

How can I do?

Thanks!

Why not ask in that thread?

Because, IMHO, it could be a general problem: opening a new thread could give more visibility in the future searches.
But you have right, I will post the message in that thread, too!

I just think that the expertise is there, and the contributors to that thread will see your post, they might not see this thread :slight_smile:

What about just changing the on to off and the off to on

I don’t think it works because the line

position_template: “{{ (((states.input_number.window_position.state | int) * 100)/18 | int) }}”

gives to HA the status of the sunshade.

At least, it seems to me…