Hello together,
yesterday I installed multiple Aqara Door/Window Sensors and to differentiate between the status completly open and tilted open, I installed two Sensors per balcony door. Afterwards I combined both sensors in HA through a template helper to a sensor with three states.
- sensor:
- name: Esszimmer Balkontuer
state: |
{% set b1 = states('binary_sensor.esszimmer_balkontuer_oben_contact') %}
{% set b2 = states('binary_sensor.esszimmer_balkontuer_unten_contact') %}
{% if b1 == 'off' and b2 == 'off' %} closed
{% elif b1 == 'on' and b2 == 'off' %} half-opened
{% elif b2 == 'on' and b1 == 'on' %} open
{% elif b1 == 'unavailable' or b2 == 'unavailable' %} nicht verfügbar
{% else %} unbekannt
{% endif %}
icon: |
{% set b1 = states('binary_sensor.esszimmer_balkontuer_oben_contact') %}
{% set b2 = states('binary_sensor.esszimmer_balkontuer_unten_contact') %}
{% if b1 == 'off' and b2 == 'off' %} mdi:door-closed-variant
{% elif b1 == 'on' and b2 == 'off' %} mdi:angle-acute
{% elif b2 == 'on' and b1 == 'on' %} mdi:door-open
{% elif b1 == 'unavailable' or b2 == 'unavailable' %} mdi:exclamation
{% else %} mdi:exclamation
{% endif %}
Unfortunately I’m not able to hand over this sensor to HomeKit. I assume it’s because HomeKit only knows the state open and closed for this kind of sensor.
Is it possible to change this sensor to some kind of, I don’t know, maybe a cover or something else with multiple states and hand this over to HomeKit to see a status like closed for completly closed, 50% for tilted and open for completly open?
Or is there any other solution for this issue to keep the WAF (wife acceptance factor) stable and to show the correct status in HomeKit without showing both sensors per door?
Thanks in advance.
Kind Regards
Sven