If you don’t mind using the api, which means you’ll need an active internet connection for this to work, it’s quite easy to get it working. I’ve posted instructions here: Switch-Bot API integration - Feature Requests - Home Assistant Community (home-assistant.io)