Hi!
New to HASS and are trying to learn. I am trying to just add a simple thing like that one of my hue lamp should turn on at a given time. But I can´t get it to work. Do I have to make some entries into automations.yaml also?
Does somebody perhaps have some code that I could “play” with. I cant seem to find a simple thing like above here at the forum
I would start with the official documentation first, and then when you have specific questions the forum will be here to help you. We like to see what you’ve tried and errors (if you have them) in order to help you best.
I have read thoose, of course. But sometimes you just need a push in the right direction to get started.
This is what I have put in my configuraion.yaml
id: evening_lightning_on
alias: Evening lighting on
trigger:
platform: time
at: ‘21:00:00’
action:
service: light.turn_on
entity_id: light.hall
I think light.turn_on should be homeassistant.turn_on
I have tried that also. But it does not work. I get en error in the GUI says it is some error with the automations.
It feels like I am doing something wrong. Should I put some code in automations also? Now I have just put the code in the end of confiurations.yaml
It’s hard to tell if you’ve got your formatting correct because you didn’t use code blocks (see the blue bar at the top of your post"
Here is a properly formatted automation that SHOULD work if your entities exist:
- alias: Evening lighting on
trigger:
- platform: time
at: '21:00:00'
action:
service: light.turn_on
entity_id: light.hall
Well that don´t work. Where in the configuration.yaml should I put the code? Does that matter?
Regardless where I put it now, when I restart hass I cant reach the GUI. If I remove the code the GUI works.
I have used the automated way to get the HUE lamps into HASS. I can reach them and turn them on/off via the GUI.
Well got it all figured out now But I wonder if I should put the automations in configuration or in the automations file?
you have two options, either you have somewhere in your configuration the following
automation: !include automations.yaml
In that case you must put your automation in the automations.yaml file
Or you put directly in your configuration.yaml, with the correct spacing an stuff
automation:
alias:...
trigger:
platform: blabla
entity_id: blabla.
On the main website there is a ‘example’ page with lots and lots of examples and more importantly many different full config of some users. Start by reading these and understand how everything works. Check also BRUH Automation youtube channel, there is plenty of examples and tutorial for all the beginner stuff