Configuring Washing Machine Notifications with Binary Sensors

Hey everyone, I’m working on setting up a notification system for my washing machine using a binary sensor. The goal is to have a light flash eight times and stay on for five minutes when the wash cycle finishes. Ideally, the light should turn off if the washing machine lid is opened, but I’m not sure how to achieve that yet. Let me walk you through my setup and the challenges I’ve faced so far. First, I’ve configured a binary sensor to detect when the washing machine completes its cycle. This sensor triggers an automation that controls a light bulb. The automation is designed to flash the light eight times before keeping it on for five minutes. Here’s the YAML code I’m using: yaml- id: ‘1682694410171’ alias: Washer Notification description: ‘’ trigger: - platform: state entity_id: binary_sensor.washer_wash_complete from: ‘on’ to: ‘’ condition: action: - service: light.turn_on data: brightness: 255 rgb_color: - 0 - 128 - 255 target: entity_id: light.washer_dryer_notification_bulb_mintransitionlight - delay: seconds: 1 - service: light.turn_off entity_id: light.washer_dryer_notification_bulb_mintransitionlight # … (repeated actions for each flash cycle) - delay: seconds: 300 - service: light.turn_off entity_id: light.washer_dryer_notification_bulb_mintransitionlightThe automation works well for the flashing part, but I’m still figuring out how to reset the light when the washing machine lid is opened. I don’t have a sensor for the lid, so I’m exploring alternative methods. Maybe I can use a motion sensor near the washing machine or set up a manual override through the Home Assistant interface. I’d love to hear if anyone has experience with similar setups or suggestions for improving this automation. For example, is there a more efficient way to handle the flashing sequence without repeating the same actions eight times? Also, does anyone know of a reliable way to detect when the washing machine lid is opened? This project has been a fun way to integrate my appliances into my smart home setup, and I’m excited to see how it evolves. Thanks in advance for any advice or tips you can share!