Entity state A/B from energy consumption

Hi world,
I would like to create a entity state showing A/B state, based on energy consumption.
This specific case is that I have an elevator in my house and I would like to keep track of how many times it gets used and also create a binary sensor showing me if it’s upstairs or downstairs, based on the power usage of that channel. It drayins 40w in idle, and it start eating more energy when it’s moving for about 50 sec.
So if a sensor can detect the power increase and change it’s state in HA, I would know if it’s up or down.
Thank’s everybody stepping forward and helping me in the journey of this awesome platform.