Hi,
I have a SomFy cover which I can open/close/stop through an RFXcom integration. I can only send commands but cannot receive them in this set up. Since the cover can also be controlled through a remote, this breaks HA’s knowledge of the state and I never know the position.
I want to fix that.
I happen to monitor the electrical curcuit on which the cover is running, so I have a power sensor which shows 120 W whenever the cover is moving up, 118W when going down and zero otherwise.
I wanted to create a new template cover which would control the underlying Somfy cover and read the position (optimisticaly) by tracking the initial state and the time that the power is different from zero, but I am a bit confused where to start here. I need to convert the state of the power sensor into a duration and then that to a position variable. I also need the template cover to change the position if the motion is initiated using the remote and therefore there is no open/close command in HA, but just the power sensor.
Could someone point me in the right direction?
Thanks!