Implement state recovery for RFLink devices

As many of us know RFLink devices can’t pull state from devices and after HA restart current device state get lost.
I have implemented state recovery for RFLink devices and created a PR (https://github.com/home-assistant/home-assistant/pull/18208).

Looking some info about how can’t be avoided and I have find that it’s too easy to achieve. But also I have found that it’s poorly implemented. Maybe it is not a good idea? I don’t know, but you can see how can be done in the PR.

Before marking the PR as ready (still WIP), I wanted to ask your opinion.
I am fairly new to HA and I am still not familiar with all aspects, so although it may seem like a good idea to me, it may not be.

You can also suggest changes and improvements, but my intention is to release an initial version ‘as is’ and then review the possible improvements (or it may not be a good approach either)

Waiting for your comments. Thanks in advance.