Hi all!
I have several roller shutters configured in Home Assistant as covers that I control over the HomeKit component with many Apple devices.
Everything works fine until I change the closed_position in the template definition from 0 to a number greater than 0. This is required to record in Home Assistant that a cover is closed also if is not in position 0. In fact I like to leave the holes between each row of the rolling shutter opened. Normally this number is between 8% to 12% and depends on the roller shutter.
When I change to cover template from this:
- platform: mqtt
name: "Serranda Cameretta"
state_topic: "shellies/shellyswitch25-xxx/roller/0"
state_open: "open"
position_topic: "shellies/shellyswitch25-xxx/roller/0/pos"
position_open: 100
# Chiude a 8
position_closed: 0
set_position_topic: "shellies/shellyswitch25-xxx/roller/0/command/pos"
command_topic: "shellies/shellyswitch25-xxx/roller/0/command"
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
retain: false
optimistic: false
qos: 1
to this (note the position_closed is the only difference):
- platform: mqtt
name: "Serranda Cameretta"
state_topic: "shellies/shellyswitch25-xxx/roller/0"
state_open: "open"
position_topic: "shellies/shellyswitch25-xxx/roller/0/pos"
position_open: 100
# Chiude a 8
position_closed: 8
set_position_topic: "shellies/shellyswitch25-xxx/roller/0/command/pos"
command_topic: "shellies/shellyswitch25-xxx/roller/0/command"
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
retain: false
optimistic: false
qos: 1
the commands sent from an HomeKit device are well executed, but the state on HomeKit is not consistent with the real state of the roller shutter, mainly stuck in Opening or Closing state but sometimes also the opening % is different from the current_position reported from the device.
On Home Assistant all seems to be good, and the state is Closed from the 8/12% to 0%, so I can log the closed state correctly.
Without the changes to the template definition, I’m not able to log the closed state of the roller shutters, but I like to control them via HomeKit without the need to select each of them and see the state.
Have you any hint on a possible way to fix this behaviour?
Thanks in advance!