I did not know I had to do that, but I added this to my configuration (last three lines) ,
but that did not help either
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 53.26086
longitude: 6.395335
customize_domain:
automation:
initial_state: 'on'
Until now I cannot find any documentation that says that I have to switch automation on, and how to do that.
Are you willing to give me a hint ? I would be very thankfull.
they are both off. I am still searching for info on this. I cannot remember I had to switch automations on or off. Strange that when you make triggers, you have to activate them on to function properly.
I hope they do not plan to do something like that with switches
There are times when you want to temporarily disable an automation, perhaps because you are testing something and don’t want the automation to interfere, that’s why you have the option to turn it on and off.
Should you wish to combine the two automations into one, here is how you can do it:
But why would you add the delay between those actions? I have many automation switch the lights, and simply list them, or maybe even better, turn on a scene which holds these lights, and have some extra settings on color and brightness etc etc.
also, when only using an entity which has its own service, we’re told to best use the dedicated service. In this case light.turn_{{trigger.to_state.state}}
just out of curiosity, why did you add the quotes round the service_templates? Never seen that before, and not needed at all isn’t it?
widespread practice is seldomly an argument… It would appear that the HA system translates the generic service homeassistant to the respective dedicated services internally. Which takes yet again some processing, and it would be more efficient to call the service directly, if possible. It is in this case, so that’s why I suggested that. They are there for a reason.
well, as always, mileage may vary. Many posts in this community are about quoting and non quoting, and when to or not to, or about mixing quotes of the various availabilities… many errors arise of non working automations and templates.
Doing away with that isn’t making thing messy, it is making things robust en tidy But in no way necessary.
(the docs for all components and templates and configurations all follow that style too, so it’s not exactly complicated to match your configuration to it)
great link, wasn’t aware it was there. At least I suggested a valid option
lol. I use it also. Especially when turning on/off groups, and mixed entities.
Yes you’re completely right about that. It’s just that I try to be as meticulous as possible everywhere, so I don’t miss the smallest bits either. Maybe obsessive. But the moment my browser inspector showed me 0 errors was a big boost in keeping that up.
Anyways, let’s keep inspiring one another . Appreciated!
That’s actually the reason I use homeassistant.turn_on everywhere, so my automations and scripts are more versatile. If I suddenly decide to turn on a switch at the same time as a light I can just add the entity of the switch to the list, I don’t have to change the service.
The delay was added, because in previous versions I noticed that when the commands are given to fast to the Rflink gateway, not all commands are executed.
yes, the was my approach also. Let me just get back to this one more time, and please don’t take it as trying to get it my way, this really is to share some personal experience.
I did notice unexplained issues of entities not being changed in my setup, mainly items being referenced in scripts which were activated by automations. Very simple but still. After having being advised to do so, I changed to dedicated services, these issues were gone completely.
would not run completely when used with the homeassistant service for all entities.
This approach had another advantage, I found out. It is easier to debug when things don’t behave as they should, because it is easier to track down the compromising service for a particular item.
Having said all this, I am a sucker for keeping things as short as possible… SO if you don’t experience any issues, and don’t want to save the last micro second of processor time, I guess there’s no reason to take it the long route…
we’re not really, we’re trying to find the reason your ‘automation won’t start’.
are you still experiencing issues now, or has the change helped you? Have you already turned on your automation, because if not, and that was your last post, it will never start…
and this is not strange, but essential functionality. One has to be able to turn automations on and off… for all sorts of reasons.
There has been a change in the restore state of automations, maybe that’s what you are experiencing. Before it relied on recorder, in now uses storage. So always have an initial_state in all you automations .
Hi Marius, thank you for this extensive answer. I will try to implement it like this.
Still looking for a way to “turn on” the automation however.
I thought my automation script was triggered by toggling the input_boolean
But I still have to do something else apparently. I did not try all the other options here because I went “naar bed”
Thank you all for your answers. Will try further in the evening (I think)