From aec426e602c628fc41995ffb4cbbc2e3aa9595fa Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Tue, 9 Dec 2025 09:17:58 -0500 Subject: [PATCH] Enhance HomeKit configuration by refining entity management and improving compatibility with Alexa. Update comments for clarity on multi-bridge setup. --- .../homeassistant/inverted_binary_sensor.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 config/blueprints/template/homeassistant/inverted_binary_sensor.yaml diff --git a/config/blueprints/template/homeassistant/inverted_binary_sensor.yaml b/config/blueprints/template/homeassistant/inverted_binary_sensor.yaml new file mode 100644 index 00000000..5be18404 --- /dev/null +++ b/config/blueprints/template/homeassistant/inverted_binary_sensor.yaml @@ -0,0 +1,27 @@ +blueprint: + name: Invert a binary sensor + description: Creates a binary_sensor which holds the inverted value of a reference binary_sensor + domain: template + source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/template/blueprints/inverted_binary_sensor.yaml + input: + reference_entity: + name: Binary sensor to be inverted + description: The binary_sensor which needs to have its value inverted + selector: + entity: + domain: binary_sensor +variables: + reference_entity: !input reference_entity +binary_sensor: + state: > + {% if states(reference_entity) == 'on' %} + off + {% elif states(reference_entity) == 'off' %} + on + {% else %} + {{ states(reference_entity) }} + {% endif %} + # delay_on: not_used in this example + # delay_off: not_used in this example + # auto_off: not_used in this example + availability: "{{ states(reference_entity) not in ('unknown', 'unavailable') }}"