Unable to swap shutters indication

Hello,
I have smart wifi switches for controlling the window shutters.
Since integration in HA, all of them are showing opposite indications. Open if closed, and closed if open.

I have follow instruction and create Template cover under Helpers.

Name - Inverted Shutter
State:
{{ 100 - state_attr('cover.shutter_mb_balcony_curtain', 'current_position') | int(0) }}

action on open - selected close cover
action on close - selected open cover

With action performed upon preview eg. testing Im getting error: failed to perform action cover/ close cover , not a valid value for dictionary
value @ data entity id