Hey everyone, I wanted to share a fun project I recently worked on with my coffee machine in Home Assistant. I’ve been using a smart coffee machine for a while now, and I wanted to take it a step further by creating a custom switch that shows the progress of the brewing cycle as a percentage.
Here’s why I wanted to do this: every morning, I’d set my coffee machine to brew and then have to check if it was done. It was a bit of a hassle, and I wanted a more seamless experience. So, I decided to create a custom switch that not only controls the coffee machine but also shows the progress of the brewing cycle.
The challenge was figuring out how to display the percentage instead of just an on/off status. I remember seeing something about a status bar in Home Assistant, but that required another card, which I didn’t want. After some research and trial and error, I found a way to modify the switch’s state to show the percentage.
Here’s what I did: I used a script to send the coffee settings to the machine and then set up a loop to update the switch’s state every few seconds. This loop calculates the brewing time and converts it into a percentage, which is then displayed on the switch. It’s a bit technical, but the end result is pretty cool!
I’d love to hear if anyone else has done something similar or if there’s a better way to achieve this. It’s amazing how customizable Home Assistant is, and I’m always excited to share and learn from the community. Thanks for reading, and happy brewing! ![]()