How to define a 3 state sensor?

Hi all,
I have an automatic gate which, through an aux output on the motor card, can show me:

  • if the aux output is closed -> gate open or opening
  • if the aux output is intermittent -> gate closing
  • if the aux output is open -> gate closed

How can I define a 3-state sensor that tells me if the gate is open / closing / closed?

Hello,

I have done the same with an actuator state (stopped/openning/closing).

To do so, i use an input select with 3 states, an i have setup an automation to update the value, based on multiple (2 in mu case) « basic » binary sensors on my esp.