Can't get automation to work

New to Home-assistant here, love it so far. But…

All of my lamps, switches and sensors are available in the HA user interface and controllable using the user interface.
Next step would be to do some automation, but can’t get is to work; not even a little bit.

My configuration.yaml contains: automation: !include_dir_merge_list automation
In the folder automation I have one file: test.yaml
test.yaml contains the following minimized code to make troubleshooting easier:

- alias: Test
  initial_state: False
  hide_entity: False
  trigger:
    platform: time
    at: '13:27:00'
  action:
    service: light.turn_on
    entity_id: light.sk_wxxxx_2'

Remark1: light.light.sk_wxxxx_2 is on Hue and is controllable in the user interface.
Remark2: the switch Test is visible in the user interface. Using it does not switch the lamp on. In the HA terminal (Linux) I see a message containing <event service_executed[L]: service_call_id3050914576-12> using the switch in the UI

So what am I missing or doing wrong here that fails this automation to work?

Thanks for your help!

Regards,
OWK

Your simplified automation has an errant ’ at the end.
I’ll assume that is just a typo, and not in your test.yaml.
by setting the initial_state to"False" you are disabling this automation on startup.
That means you have to explicitly enable somewhere else or it will never run.
Just take out the initial state line, and you should be fine.

That turns the automation on and off. It’s set to trigger at 13:27, so if you correct that entity_id, reload the automations, turn the automation on, and then wait for 13:27, you should be good.

Don’t forget there’s documentation on how to troubleshoot these issues, which will help you eliminate some simple errors.

Hi Tinkerer and Treno

Thanks for your quick response.

I assumed the switch in the user interface would bypass the trigger and fire the automation. But now I understand it acts as an on/of switch for the automation.

Thanks, life can be simple sometimes :wink:

Regards
OWK

If you click on the name of the automation, you’ll get a pop up that’ll allow you to manually trigger it. Conditions will still apply however.

Thanks Tinkerer, great tip

My first automation (switching the hallway light on when dark and frontdoor opens) is now working.

Next project: bathroom ventilator to switch on while shower is in use and off when moisture is down to the level before showering

Reagards,

OWK