Setting a state to a switch based on the last state saved before restart

Hi,

I ran into the same problem with pilight and HA. Status is not recoverd after restart HA.
I have no solution.
Maybe we can do a feature request.