well first, is it just an open/close sensor? If the answer is yes, ditch the sensor and make a binary sensor. Let translation handle open/close.
Then use value_template instead of position_template. I would expect your resulting cover template to look like this with a binary sensor.
cover:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Door"
value_template: "{{ is_states('binary_sensor.garage_door', 'on') }}"
open_cover:
service: switch.turn_on
entity_id: switch.garasjeport
close_cover:
service: switch.turn_on
entity_id: switch.garasjeport
stop_cover:
service: switch.turn_on
entity_id: switch.garasjeport
But, if the binary_sensor is just a template… don’t even bother with the binary sensor and put whatever the binary sensor’s template into the value_template
cover:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Door"
value_template: >
{{ whatever'd you'd use for binary_sensor value_template }}
open_cover:
service: switch.turn_on
entity_id: switch.garasjeport
close_cover:
service: switch.turn_on
entity_id: switch.garasjeport
stop_cover:
service: switch.turn_on
entity_id: switch.garasjeport
Remember, translation is handled by home assistant. So if you select the appropriate language for your system, you should always try to let that handle the translations. Less work for you and it makes your code work everywhere because you’re using the untranslated values. Then when you have someone else visit and use the system, they can swap the language to what suits them without impacting your code. Or without it impacting their ability to read statuses.