Last active
July 25, 2022 13:25
-
-
Save SirUli/711757810d36a252a0d70198c5e4a510 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: "KNX - Expose binary_sensor state to KNX" | |
| description: "Exposes a binary_sensor state on a KNX group address" | |
| domain: automation | |
| input: | |
| binary_device: | |
| name: "Entity which has the binary state" | |
| description: 'Entity with binary state' | |
| selector: | |
| entity: | |
| domain: binary_sensor | |
| lock_address: | |
| name: "Address of the lock" | |
| description: 'Group address of the respective lock. DPT 1.003 Example: ''3/2/9''' | |
| source_url: "https://gist.github.com/SirUli/711757810d36a252a0d70198c5e4a510" | |
| variables: | |
| binary_device: !input 'binary_device' | |
| lock_address: !input 'lock_address' | |
| trigger: | |
| - platform: homeassistant | |
| event: start | |
| - platform: event | |
| event_type: automation_reloaded | |
| condition: [] | |
| action: | |
| - choose: | |
| - conditions: | |
| condition: or | |
| conditions: | |
| - condition: template | |
| value_template: '{{ trigger is not defined }}' | |
| - condition: template | |
| value_template: '{{ trigger.platform == "homeassistant" }}' | |
| - condition: template | |
| value_template: '{{ trigger.platform == "event" and trigger.event.event_type == "automation_reloaded" }}' | |
| sequence: | |
| - service: knx.exposure_register | |
| data: | |
| address: '{{ lock_address }}' | |
| entity_id: !input 'binary_device' | |
| default: 'off' | |
| type: binary | |
| mode: single | |
| max_exceeded: silent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment