Newbie Automation help condition is invalid

Is that still needed when it is in the automations.yaml? I though I has an issue with a prior automation when I kept that. It started to work once removed.

I am using notepad++

No, it’s not needed if you’re putting those automations into automation.yaml. However, you shouldn’t be putting the timer in automations.yaml.

I need to remove this whole block from the automations.yaml and add it to the configuration.yaml? And include the automation: lines?

If the information you’ve posted above represents the contents of your automations.yaml file, remove the timer section and add it to your configuration.yaml file.

1 Like

I had to change ring.backyard to ring_backyard and now it appears to be valid with the timer section in the other file.

Correct, Home Assistant reserves the use of a period for delimiting an entity’s domain from its identifier. For example:

light.kitchen
timer.daily_reminder
switch.front_porch

You can use an underscore in an entity’s name but not a period.

I suggest you consider using Visual Studio Code for editing Home Assistant’s files. Combined with an available Home Assistant plugin and YAML plugin, it’ll help you to avoid making common syntax errors.

Thanks for the help on this. Hopefully I will be able to get the next automations down on my own. 3 out of 4 is still good odds though. LOL

I will look into Visual Studio Code.

1 Like

I was able to finally test this and I noticed that the two lights don’t trigger on. Am I missing something else. I do see the timer start.

If the timer starts, that means the first automation was successfully triggered (‘Stickup Cam detects motion’). However, its attempt to turn on the light and switch appears to have failed.

You will need to confirm the light and switch can be activated by Home Assistant. Go to the Services page, select the service called homeassistant.turn_on, select the entity light.laundry_room, then click the CALL SERVICE button. The light should turn on. Repeat the test using the homeassistant.turn_off service.

I was able to turn the lights on and off using the service commands.

Thanks again for all the advice.

i’m surprised any of it is working since you have the timer entity_id as “timer.ring.backyard”. Again notice the “.” between ring & backyard. That needs to be a “_”. Check you entity_id in the dev-states page to be sure tho.

I’m not sure what it will be since you defined the timer as “ring.backyard” in the timer config and the system will (should…) replace “.” with the “_” automatically. I would probably rename that to avoid confusion.

I believe it was corrected a few posts ago (see this one).

OOPS. Missed that one. never mind…

If you can control the lights manually with the service commands then it means the automation can do it as well. However, you said the auatomation failed to turn the lights on … yet started the timer. That’s puzzling.

I could be mistaken that it activated. I see this in the log:

image

Thinking that it did.

I see the timer becomes active but it goes `idle not 15 seconds later (at 12:29) but 23 seconds later at 12:37. I don’t understand what those results are saying.

Does the log contain the activation of the binary_sensor.ring_backyard_2_motion?

It does not show anything within 1 days time for binary_sensor.ring_backyard_2_motion.

Looking at my camera. Does appear that I triggered the motion at 11:47 PM prior to the timer

The automation is triggered by that motion sensor. If the sensor has not detected any motion for the last day, that would explain why the automation hasn’t been triggered.

I have seen this trigger in the log and not any of the automation has started. I suspect it has something to do with the ring since the only automations I have that don’t work involve a ring sensor.

Thanks for all the help with this. I successfully set up 10 more automations that work. :wink: