Artificial signal

Hey there, is there some way to store a state that can be later used in automations in case where you don’t have a special device for it?

Let’s say that I have a light switch and if the button is pressed, it will invoke a first automation only when the time is between 6-8; and a second automation only when the time is between 8-10 o’clock.

I know that I can l use the acting time option for that and just conditionally execute that specific automation only when the time is valid.

But what if I want to have multiple light switches to behave in the same way? To perform one thing at one time and to perform other thing and some other time? I get that I can again use the acting time option but the issue is the following:

Now I have several automations where each has the same condition (acting time is valid between 6-8) and I want to change that time range… What I would need to do is to edit all the automations and choose different time ranges which I don’t want to do.

I think I found a workaround, but I’m wondering if there is a better solution? My workaround is basically an use of an extra automation that under the hood does nothing but can be enabled/disabled. Then I created another automations to enable that automation at 6 AM and disable it at 8 AM. And all the related light switches, instead of using the acting time option, use a precondition that checks if the automation is enabled or disabled…

Does it make sense? And is there really a better option that does not involve buying a light sensor? :slight_smile: Thanks

2 Likes

I use the fake automation enable/disable trick too. I’m not sure of another option.

4 Likes

Hello. You came up with a great idea with group control via “dummy automation trigger”, but there are risks, unfortunately, that such automation can become cloud-based. In extreme cases, I went through this. For cases like the one you described, I use a relay that is simply in the house without a load. The contacts of the free relay act as triggers for what you described as “dummy” automation. By the way, they are currently testing automation 2.0, I will try to simulate your automation. If you want, give me your automation conditions.

3 Likes

Hi @z_sojma,

unfortunately Aqara doesn’t have native states or variables you can reuse in automations. I solve this in a similar way to what you described — with multiple automations and clearly defined modes.

In my setup the house has three main modes: Morning/Evening, Day, and Night. For lighting this means: 100% brightness in the morning/evening, 0% during the day, and 5% at night. I use scenes to enable the right automations and disable the others. These scenes themselves are triggered by other automations — based on time, lux values from sensors, or sometimes just manually.

Yes, it takes a little setup work, but it runs very reliably and makes it much easier to adjust timing or logic in just one place. I also described it here: Different Modes for Your Smart Home – Why They’re a Game Changer

Always remember: “If your car is smarter than your home… you’re driving into the future while living in the past” :red_car::house:

Check this out: Topics to remember – Bookmark and keep coming back!

4 Likes

Thank you, but I’m unfortunatelly not part of that trial so I cannot use it anyway :slight_smile: But looking forward to automations 2.0

2 Likes