The real challenge in home automation is not YAML, Jinja, Helpers or Flow editors — it is complexity

Posted identically in the Home Assistant Community

The more I work on sophisticated automations, the more I realise that neither YAML, Jinja, Helpers, Home Assistant’s visual editor nor Homey’s Advanced Flow are the real challenge.

The real challenge is complexity — and trying to foresee every possible interaction and edge case.

My roller shutter system is a good example.

It has several operating modes:

  • Manual

  • Manual (temporary)

  • Sun protection

  • TV

  • Sun protection + TV

And each mode behaves differently.

The sun-protection logic doesn’t simply check whether the sun is shining. Depending on the window, it evaluates solar azimuth, solar elevation and luminance to determine whether that window actually needs protection.

On colder days, it becomes more complex. The system compares the temperature measured on the sun-exposed facade with a sensor in the shade. From the temperature difference, it estimates whether the sun currently has enough heating power to justify closing the shutter.

In bedrooms, the logic changes again depending on whether the window is open or closed.

With the window closed, the shutter primarily provides sun protection.

With the window open, indoor and outdoor temperatures are compared and the shutter effectively becomes part of the ventilation control, adjusting how much air exchange is possible.

There is also winter protection: if the room gets too cold while a window is open, the shutter closes completely to slow further cooling.

Then there are exceptional situations.

If a smoke alarm is triggered, all shutters open to clear possible escape routes. A central override prevents any other automation from closing them again while the alarm is active.

Manual operation also has priority. If somebody operates a shutter using the physical switch, that window changes to Manual (temporary) and normal automations leave it alone. At 03:00, it automatically returns to its previous mode.

All of this is already quite complex, and I honestly don’t think I could have built and maintained the complete logic without AI helping me analyse it.

But then my son found an edge case that neither I nor the AI had considered.

He was doing homework when the sun-protection automation started lowering the shutter. He didn’t want it closed, so he stopped it while it was moving and then raised it again manually.

A few minutes later, the shutter went down again.

Normally, manually moving a shutter should activate Manual (temporary) and prevent sun protection from touching it again.

So what happened?

The automation had marked the downward movement as an automatic movement. That flag was supposed to be cleared when the shutter reached its target position.

But my son interrupted the movement before it arrived there.

The flag therefore remained set.

When he subsequently raised the shutter manually, the system still believed that the movement belonged to the automation and did not activate Manual (temporary).

Technically, every part of the logic worked exactly as designed.

The problem was that we had never considered the sequence:

Automatic movement → manually interrupted → manual movement in the opposite direction.

We changed the logic so that interrupted movements are handled correctly as well.

And that brought me to what I now think is the real difficulty of sophisticated home automation:

Building the automation is not necessarily the hardest part. Foreseeing every possible state, interruption, timing issue and interaction between automations is.

AI helps enormously, but even AI doesn’t automatically think of every real-world situation that someone in the house may create.

So I’m curious how others approach this.

Do you also build increasingly sophisticated automation logic and deal with these edge cases as they appear?

Or do you deliberately keep your automations simpler and accept giving up some of the “ultimate” automation experience in exchange for easier maintenance and predictability?

Well I’m I person, that think.. Keep it simple
So i’m not the person you like to answer this question: But hey..

I try to keep it simple. Less problems, but that’s me..

  • KISS

I tried to automate every corner of all cases but the results are:

  • an angry wife when curtains go open and close due to sun and tv and time…
  • I can’t no longer overview all the steps I have put in an Advanced flow

I gave up and do simple automation, the rest goes by hand (old school). I accepted that I can not automate my house as if Homey is a human.

I completely understand this. My wife is rather tech-agnostic too, and if the house behaves in a way she doesn’t expect, she is not amused. :wink:

What works for me is to design the automation around human interaction, not just around sensors and conditions. That became much easier once I moved the logic to Home Assistant.

My shutters have different modes. In Sun protection mode they move automatically based on several criteria.

On the wall tablet, my wife can switch a shutter to Manual (temporary). In that mode, the automation leaves it alone until 03:00 at night, when it automatically returns to the previous mode.

In theory, that solves the problem.

In practice, my wife either selects Manual, which means manual until someone changes the mode again, or she simply opens a shutter and complains three minutes later when the automation closes it again. :wink:

So I added another layer.

All shutters in my house also have physical wall buttons. If someone moves a shutter manually, the automation detects that and automatically switches that shutter to Manual (temporary).
From that moment on, the automation leaves it alone for the rest of the day. That works much better because nobody has to think about changing modes first.

I use the same philosophy for lighting. I have around 12 different light scenes in the living room, but we also have Hue Tap Dial switches. My wife uses maybe four scenes and the dimmer on the physical button. She is happy with that. I am the one using double-taps, triple-taps and the more exotic scenes. :wink: So for me, the trick is not to force everyone to use the full smart-home interface.

Let the automation be sophisticated in the background, but make the everyday interaction as simple and familiar as possible.

And of course, if your wife is happy with your current setup:
Happy wife, happy life. :wink:

That’s a perfectly valid approach.

I think homes are as individual as the people living in them.

I started with Apple Home, where even fairly complex automations are possible if you use Shortcuts and third-party tools — but at some point that goes against Apple’s original philosophy of keeping things simple.

So there is absolutely nothing wrong with being happy with simple automations and enjoying the reliability and clarity that comes with them.

Not everyone has to become a nerd like me and keep asking: “What else can I automate?” :wink: