Hello,
I have a Shelly Wave Shutter in use! Unfortunately, this is displayed as two devices in external venetian blind mode. One for the position, the other for the slat angle.
I have now tried to make one device out of the two using a template. It’s probably very amateurish, but that’s all my current skills allow.
In principle, the whole thing works reasonably well. Only the current position is not taken over. The current_position attribute always contains 0.
I would probably only have to write the attribute current_position from the entity “cover.raffstore_wohnen_ost” to the new entity. Unfortunately, I can’t do that.
cover:
- platform: template
covers:
cover_wohnzimmer_ost:
friendly_name: "Raffstore Wohnzimmer Ost"
unique_id: raffstore_wohnzimmer_ost
open_cover:
service: script.cover_wohnzimmer_ost
data:
modus: "open"
close_cover:
service: script.cover_wohnzimmer_ost
data:
modus: "close"
stop_cover:
service: script.cover_wohnzimmer_ost
data:
modus: "stop"
set_cover_position:
service: script.cover_wohnzimmer_ost_position
data:
position: "{{position}}"
set_cover_tilt_position:
service: script.cover_wohnzimmer_ost_tilt_position
data:
tilt: "{{tilt}}"
value_template: "{{is_state('sensor.cover_wohnzimmer_ost', 'open')}}"
icon_template: >-
{% if is_state('sensor.cover_wohnzimmer_ost', 'open') %}
mdi:window-open
{% else %}
mdi:window-closed
{% endif %}
script:
cover_wohnzimmer_ost:
sequence:
- service: "cover.{{modus}}_cover"
target:
entity_id:
- cover.raffstore_wohnen_ost
cover_wohnzimmer_ost_position:
sequence:
- service: cover.set_cover_position
target:
entity_id:
- cover.raffstore_wohnen_ost
data:
position: "{{position}}"
cover_wohnzimmer_ost_tilt_position:
sequence:
- service: cover.set_cover_position
target:
entity_id:
- cover.raffstore_wohnen_ost_lamellenposition
data:
position: "{{tilt}}"
sensor:
- platform: template
sensors:
cover_wohnzimmer_ost:
unique_id: cover_wohnzimmer_ost
value_template: >
{% if is_state('cover.raffstore_wohnen_ost', 'open') %}
open
{% else %}
closed
{% endif %}
Can someone please help me?
Thanks already