Hi. i have five covers that come into HA inverted. Didnt matter if i reversed the wiring. It just is reversed. So i found some code while googling and have integrated it with my needs.
Basicly i got a slider to set the position, with a position in percentage. Works fine.
But im looking to simplify it a bit more. I am looking how to just make a button that would set position, but with the template system in mind, because i want it to remember where it is.
Currently my config in my covers.yaml is like this per cover:
- platform: template
covers:
#### Kjøkken Markise Reversert####
markise_kjokken_cover_inverted:
friendly_name: Markise Kjøkken Inverted
position_template: >
{{100 - (state_attr('cover.markise_kjokken_cover','current_position')|int)}}
set_cover_position:
service: cover.set_cover_position
data_template:
entity_id: cover.markise_kjokken_cover
position: >
{{100 - position}}
and my entity is like this:
type: entities
entities:
- entity: cover.markise_kjokken_cover
type: custom:multiple-entity-row
name: Markise Kjøkken
icon: mdi:information-outline
tap_action:
action: none
entities:
- entity: cover.markise_kjokken_cover_inverted
name: Lukket/Åpen
unit: '%'
attribute: current_position
- type: custom:slider-entity-row
entity: cover.markise_kjokken_cover_inverted
attribute: position
full_row: false
hide_state: true
icon: mdi:window-shutter
tap_action:
action: none
name: Posisjon
How to archive the same functionality with just buttons?
Im thinking each button: 50% closed, Open, Closed. etc.
I have tried several codings, but i cant seem to understand templates and im not great with coding.
Any pointers? Guides? Help me, ill pay your coffee or something