I used to have something similar for a notification light when a window is opened. I’m currently on vacation, but I can check once I’m home again.
I think your app is solid, the only thing I would change is getting the entities from the args and not hardcode them. I always try not to hardcode anything in the app itself.
The other thing I can recommend is starting to use voluptuous. I wrote a quick introduction to it in this post in case you are interested.