and I recieve the following error when I test in Developer tools
This template does not listen for any events and will not update automatically.
switch.galaxy_tab_a_2016_screen is coming from Fully Kiosk integration and light is a mqqt entity that works fine. Goal is to turn light on when display turns on.
Use Trigger >
Entity ⌠choose your switch.galaxyâŚ
To: On
Action:
âŚ
triggers:
- trigger: state
entity_id:
-switch.galaxy
to:
- "on"
PS: Im not sure how you manage to make it so âComplicatedâ
Nor Why You Choosed switch.turned_on as a Trigger , And why you added that âOptionsâ , What does that Option do actually ?
Yes i noticed after i posted , and i have never tried any of the ânewâ options etc. in Automations, So i canât tell if they are intuitive ⌠To Me
Not sure what could cause that, it looks ok to me, i would go out of the automation-page/refresh browser go in and try again
Also try with just light.turn_on > entity.id ( As i have no idea which device it is you are trying to âlight_turn_onâ
Gut feeling is we are on the wrong path. This is the error
This template does not listen for any events and will not update automatically.
I think it is an the Fully Kiosk entity issue although it behaves properly when tested on developer options and reports on/off. The entity Iâm tryingto turn on/off is a hue bulb over MQTT.
If you have some âcodeâ as YAML, and you are testing it in Developer Tools, just what Tool exactly are you testing this in?
If, perchance, you are testing your automation configuration code inside the Template testbed, then no this is not a template and will not actually listen for anything or do anything.
Your YAML configuration, to my inexperienced eyes, looks like a good automation, and would naturally go inside an automation.
If you use the HA automation, create a new one, switch to edit in YAML, paste your (second) configuration, then switch back to edit in UI, it should show you if there are any errors. Doing this and substituting a switch and âdeviceâ on my system works just fine.
Hi Geoff,
Yes I was using Template in developer tools, still learning and confused . I tried what you reccomended and recieve the following error
New automation setup timed out
Your new automation was saved, but waiting for it to set up has timed out. This could be due to errors parsing your configuration.yaml, please check the configuration in developer tools. Your automation will not be visible until this is corrected and automations are reloaded. Changes to area, category, or labels were not saved and must be reapplied.
You may continue to wait for a response from the server, in case it is just taking an unusually long time to process this automation.
I thought this would be a 2 minute job, guess I was wrong
The Template Editor simply tests Jinja2 templates and nothing else (i.e. it does not test an automationâs YAML code). Your automation contains no templates and so you get that message.
Home Assistant can be very confusing when first starting. It does take time to understand all the various bits.
Automations can be hand-coded using YAML and edited into the correct part of the main configuration.yaml file. Normally the main config file holds automation: !include automations.yaml or similar to point to (include) a separate automations.yaml file, which is the one that actually holds the automations. When using the UI to write automations, HA will, on save, attempt to modify and maintain this file for you, hence it has to be there and available.
Sometimes HA canât find the file to work on:
This post holds a list of possible causes and fixes that may help you. My uneducated guess is that your configuration file is either corrupted or does not have the âautomations.yamlâ file there, particularly if you have never created an automation before and this is the first time you are seeing this error.
The first Developer Tool, YAML - âcheck configurationâ - can help a bit, but where there are configuration file problems the only solution is to get access to the main directory and check it all out. I have found setting up Samba share (HA App) to permit direct file access to my HA directory very useful. If editing the configuration files, always use a plain text editor, and keep a backup copy first!
Note that, if you add automations directly to the main configuration file, then they have to be started with âautomation:â and the rest of your code must be space indented. If you add automations to the include file, then the indentation is not required. Personally I do all my (few) automations entirely using UI and I do not attempt to mix the HA-generated ones from UI with any hand-coded ones.
As I say, I used the HA Automation (UI) to create a new, blank automation, pasted your config code directly into the âedit yamlâ option, adjusted the trigger sensor and the light device to something that I have, and saved it successfully. Perhaps you should start with a basic HA automation in the UI, using eg a time trigger with a set time to turn a light (entity not device) on and just check that the âsave automationâ works.
When it works, yes it is a 2 minute job, so eventually you will break through the learning barrier and reach the sunny uplands.