Solving Automation Redundancy for Aquarium Lighting

I wanted to share my experience in addressing an issue with my aquarium lighting automation. The problem was that the light occasionally failed to turn on due to the NodeMCU entering an unavailable state. To tackle this, I designed an automation that checks if the light is off and turns it on after 30 minutes. Here’s how I approached the solution:

  1. Identify the Issue: The NodeMCU controlling the aquarium light would sometimes become unresponsive, causing the light to remain off.

  2. Automation Setup: I created an automation using the built-in editor with a webhook trigger. The automation checks the state of the light switch and turns it on if it’s off after 30 minutes.

  3. Testing and Adjustments: I tested the automation multiple times to ensure it works reliably. It now provides peace of mind knowing the aquarium lighting will be managed even if the NodeMCU encounters issues.

Here’s the automation configuration for reference:

yaml

  • id: ‘1610656736957’
    alias: Aquarium Light Check
    description: Checks if aquarium light is off and turns it on after 30 minutes
    trigger:
    • platform: webhook
      webhook_id: Aquarium_Light_Check
      condition:
      action:
    • service: switch.turn_on
      entity_id: switch.aquarium_light

This setup has been effective in maintaining consistent lighting for my aquarium. If anyone has similar issues or suggestions for improvement, I’d love to hear your thoughts!