Successfully Automating Beer Can Recycling with Govee Sensors

Hey everyone, I wanted to share a fun and practical automation setup I recently completed using Govee sensors. It’s all about keeping track of my beer cans and getting notified when it’s time to recycle them. :beer::recycle:

So, the setup is pretty cool. I have this beer can chute leading to my basement, and every time a can drops, a motion sensor detects it. I then use a scrape sensor to count the cans and record the values with a PHP script. The goal was to create an automation that sends me a notification whenever the count increases by one, letting me know how many cans I’ve accumulated that day.

Initially, I tried setting up the automation with the following code:

yaml
automation 85:

  • alias: “Another Beer on the Wall”
    trigger:
    platform: state
    entity_id: binary_sensor.beer_cans
    from: ‘off’
    to: ‘on’
    action:
    service: notify.iOSApp
    data:
    message: “{{sensor.beer_today +1}} Beer Today”

But it wasn’t working as expected. After some troubleshooting, I realized I needed to ensure the sensor values were correctly updated before sending the notification. I also had to make sure the message template was properly formatted to display the incremented value.

After tweaking the automation, it finally worked! Now, every time a can drops, I get a notification on my phone with the updated count. It’s a simple yet effective way to stay on top of recycling without constantly checking the sensor. Plus, it’s a fun way to track my progress throughout the week.

I’d like to give a shoutout to Govee for their reliable sensors and the supportive community here. Without the tips and tricks shared in this forum, I wouldn’t have been able to figure this out so quickly. :raised_hands:

If anyone has similar automation ideas or needs help setting something up, feel free to reach out! I’d be happy to share more details or troubleshoot together. Cheers! :cup_with_straw: