HA + Shelly + Homekit -> Garage door

Hi,

I’m trying to make a garage door open and integrate it with home kit. So far I manage to make it work… sort of…

cover:

  • platform: template
    covers:
    garage_door:
    device_class: garage
    friendly_name: “Garage Door”
    position_template: “{{ is_state(‘binary_sensor.shelly_shsw_1_E0980695348A_switch’,‘on’) }}”
    open_cover:
    service: switch.turn_on
    data:
    entity_id: switch.shelly_shsw_1_E0980695348A
    close_cover:
    service: switch.turn_off
    data:
    entity_id: switch.shelly_shsw_1_E0980695348A
    stop_cover:
    service: switch.turn_on
    data:
    entity_id: switch.shelly_shsw_1_E0980695348A
    icon_template: >-
    {% if is_state(‘binary_sensor.shelly_shsw_1_e0980695348a_switch’, ‘off’) %}
    mdi:garage-open
    {% else %}
    mdi:garage
    {% endif %}

The up arrows don’t work, but I can open close with the stop button. How to make it work with the up and down arrow?

In the home kit I’ve got this

homekit:

  • filter:
    include_domains:

    include_entities:
    - cover.garage_door
    entity_config:
    cover.garage_door:
    name: “Garage Door”

    It shows that garage its open when it is closed and vice versa. How can I correct this.

TIA

Foun d the solution!
changed to: value_template: “{{ is_state(‘binary_sensor.shelly_shsw_1_E0980695348A_switch’,‘off’) }}”