Reporting problems

The binary switch worked ok for me. I did a few changes and created a simple on/off state sensor that reports to Home Assistant.

I will post the code when I get back to my office.