Successfully Automating My Computer's Smart Plug - Any Tips for Improvement?

Hey everyone, I wanted to share my recent success with automating my computer’s smart plug! I’ve been looking for a way to save energy by turning off my computer when it’s in standby mode for too long. After some research and trial and error, I finally got it working perfectly. Here’s how I did it:I set up an automation that monitors the current consumption of my smart plug. If the consumption drops below 20 watts (which means the computer is in standby) for one minute, the plug automatically turns off. It’s been working like a charm for the past few weeks!Here’s the configuration I used:yamltrigger: - platform: state to: ‘on’ entity_id: binary_sensor.spare2_binary_sensorcondition: - condition: and conditions: - condition: state entity_id: sensor.spare2_current_consumption state: ‘below: 20’ for: '00:01:00’action: - service: switch.turn_off target: entity_id: switch.spare2_tuyaI’m really happy with how this setup has reduced my energy consumption, especially during the night when I forget to turn off my computer. However, I’m curious if there are any improvements I could make to this automation. Maybe adding a notification before it turns off, or adjusting the thresholds for different times of the day?If anyone has suggestions or tips, I’d love to hear them! This community is amazing, and I’m grateful for all the help I’ve received so far. :raised_hands: