Overcoming Configuration Errors in Smart Home Automation

Hey everyone, I’m new to the world of smart home automation and I’ve been encountering some configuration errors that have been a bit of a puzzle. I thought I’d share my journey and perhaps get some insights from the community.

Recently, I set up a few automations to control my hot water system in the mornings. The idea was to have it turn on using electricity if the gas option wasn’t available. I followed the configuration guide meticulously, but upon reloading the automations, I was greeted with an error message: Invalid config for [automation]: Invalid time specified: 749.

At first glance, I was a bit puzzled. The error mentioned line 9 in my configuration.yaml, but when I checked, there was nothing there. The time I had set for the automation was ‘05:15’, which seemed perfectly valid to me. I even double-checked my automations.yaml file, but there was no mention of ‘749’ anywhere.

I decided to take a closer look at the structure of my automations. Here’s what I had:

yaml
id: ‘1597439749601’
alias: HotWater_InMorningsByElec
description: create hot water either using electricity if usegas=false
trigger:

  • at: ‘05:15’
    platform: time
    condition:
  • condition: state
    tity_id: input_boolean.g_usegas
    state: ‘false’
    action:
  • device_id: 02d2a65643a74f85977c333e1dcb9916
    domain: switch
    entity_id: switch.innrplug1_on_off
    type: turn_on
  • delay: 01:15
  • device_id: 02d2a65643a74f85977c333e1dcb9916
    domain: switch
    entity_id: switch.innrplug1_on_off
    type: turn_off
    mode: single

Everything seemed in order, but the error persisted. I started to wonder if there was an issue with the way I structured the triggers or actions. Maybe the delay wasn’t formatted correctly? Or perhaps there was a conflict with another automation?

After a bit of research, I came across a suggestion to simplify the configuration by removing any unnecessary elements. I decided to flatten my setup and start fresh. Here’s what I tried:

yaml
id: ‘1597439749601’
alias: HotWater_InMorningsByElec
description: create hot water either using electricity if usegas=false
trigger:

  • at: ‘05:15’
    platform: time
    condition:
  • condition: state
    tity_id: input_boolean.g_usegas
    state: ‘false’
    action:
  • service: switch.turn_on
    tity_id: switch.innrplug1_on_off
  • delay: 01:15
  • service: switch.turn_off
    tity_id: switch.innrplug1_on_off
    mode: single

This streamlined version worked like a charm! The error disappeared, and the automation functioned as intended. It taught me the importance of simplicity and the value of community resources when troubleshooting.

If anyone else is struggling with similar configuration issues, I’d recommend starting fresh, simplifying your setup, and gradually adding complexity back in. It might save you hours of frustration!

Thanks to everyone who contributes to this amazing community. Your insights and experiences are invaluable. Happy automating! :rocket: