Hi all,
after some fiddling I got my Wago PLC integrated and working in HomeAssistant.
It has some digital in and outputs. The inputs are connected to physical wall switches. When pressed they set the input “high”. When released they go “low”. This is default behaviour. When a button is pressed I want to toggle a light switch. Depending on its state on or off. The status should be changed. e.g when off, button pressed, switch lights on and vice versa.
I managed to get it half working using an automation. When the corresponding entity is pressed it calls a toggle switch service. The last part seems to work. But I cannot get the input working correctly.
The input switch looks like this:
- name: DI 01-5
unique_id: DI 01-5
address: 4
write_type: coil
verify:
input_type: coil
state_on: 1
state_off: 0
The output looks like this:
unique_id: DI 01-1
address: 0
write_type: coil
verify:
input_type: coil
state_on: 1
state_off: 0
The automation config looks like this:
id: '1656433613119'
alias: Verlichting TV Zone Schakelen
description: ''
trigger:
- platform: state
entity_id:
- switch.di_01_5
condition: []
action:
- service: switch.toggle
data: {}
target:
entity_id: switch.verlichting_tv_zone
mode: single
And as often asked, what am I missing/doing wrong?