Hello! I need help to set up my hassio to automatically switch off a relay connected to GPIO Raspberry pi 2 when KNX binary sensor value is 1. I have configured the KNX binary sensor, and this is working. Can someone help me with code to automate this? Code for KNX binary sensor in my configuration.yaml:
I have not connected the relay yet, but the switch appeared in the UI. The invert_logic should make the relay turn off when switch is turned on. But How should the automation config look? Something like this? :
automation:
alias: turn off waterguard when home
initial_state: True
hide_entity: False
trigger:
platform: knx
entity_id: Waterguard
to: on
action:
service: switch.turn_on
entity_id: waterguard.rele