I have a problem with a device configuration. I’d like 2 covers to be visible as closed once their position is below certain value, but to be still able to set any position I want to. Moreover, I want such behavior not only in HA UI, but mostly in Home Kit (through Home Kit integration of course). I thought that using template for that would be simple and clean, but I encountered some problems. The best solution is this:
cover:
- platform: template
covers:
test_cover:
device_class: shade
friendly_name: "Test"
value_template: "{{ state_attr('cover.living_room_balcony_window_blind', 'position') >= 32 }}"
open_cover:
- service: cover.open_cover
target:
entity_id: cover.living_room_balcony_window_blind
close_cover:
- service: cover.close_cover
target:
entity_id: cover.living_room_balcony_window_blind
stop_cover:
- service: cover.stop_cover
target:
entity_id: cover.living_room_balcony_window_blind
set_cover_position:
- service: cover.set_cover_position
data:
entity_id: cover.living_room_balcony_window_blind
position: "{{position}}"
That has some drawbacks:
- Although I can set position for cover, I can’t see the position once it’s set
- HomeKit stuck on “Opening…” when I manually set position lower than threshold
Is there solution that suits all my needs? That is - I’ll see open/close status according to my threshold and I’ll still be able to manually set and read position of the cover.