I recently got myself a raspberry pi along with the official 7" touchscreen to use as a dashboard and thought it would be neat to be able to control it via Home Assistant and use it in automations. So I wrote a little python script that allows you to add the screen as an MQTT Light in Home Assistant and control brightness and screen power state. I’ve only tested it with the 7" touchscreen so far, but in theory this should work with any screen connected to the raspberry pi.
The whole thing isn’t very polished yet and requires some customization to get it to work, but I thought I’d share it anyway. Check out the Github repository for more information and some instructions on how to set it up.
Hi, thanks for your work!
The connection from the pi with the touch display to the mqtt server on the pi with HA works fine, but where can I put the code in HA? (Like in your example)