Hi,
Due to an issue with Somfy devices (showing as an awning and inverted position How to invert blinds sensor (from tahoma integration) - #15 by Alaric), I’m trying to create a new cover based on an existing cover and behaves:
- inverted current_position
- shows as a blind
I’ve read and tried several things based on the docs: Template Cover - Home Assistant and not able to get it the blind pysical to work.
configuration.yaml
cover: !include covers.yaml
covers.yaml
- platform: template
covers:
scullery_inverted:
device_class: blind
friendly_name: "scullery_screen_inverted"
optimistic: true
position_template: >
{{ 100 - (state_attr("cover.sunea_scr_40_io","current_position") | int ) }}
open_cover:
- condition: state
entity_id: cover.sunea_scr_40_io
state: "closed"
close_cover:
- condition: state
entity_id: cover.sunea_scr_40_io
state: "open"
stop_cover:
- condition: state
entity_id: cover.sunea_scr_40_io
state: "stopped"
set_cover_position:
service: cover.set_cover_position
data_template:
entity_id: cover.sunea_scr_40_io
position: "{{ 100 - position}}"
Any help would be appreciated very much.