Flip Flop binary state

Two states (VALVE OPEN & VALVE CLOSED) are getting in from KNX - each with its own group address . I wish to show the last one. Sort of create a binary sensor that will set to ON with one incoming input and to OFF with the other.

I don’t know how to implement.

Advice will be appreciated,

Hi :wave:!
You could use a template entity Template - Home Assistant
Maybe event based with knx_event or using the state change event of two knx binary sensors or something like that.

Thx!
I’ll try to use template