If you can’t select sensors I think it’s something you are doing otherwise you should show some screenshots that illustrate what you are trying to do and/or create an issue… You may not like the editor but it does work.
After sunset and before sunrise can be tricky anyway due to spanning days but it can be done.
Yes I hit skip to set it up manually.
So you must have clicked on ‘Turn the light on when motion is detected’ I would just skip that and set up triggers/conditions/actions normally.
So it’s trying to guide you for entities according to the type of automation you select OR you could type something in and create automation and it will try and present options according to that.
I think if you go that route you can just use the friendly name, not the sensor. etc name… Or just skip and setup manually. But this is a gap in understanding (yours), not a ‘bug’
DavidFW1960David
So you must have clicked on ‘Turn the light on when motion is detected’ I would just skip that and set up triggers/conditions/actions normally.
I did click on turn on … as this is what the direction say to do.
If this doesn’t work or if it is still a work in process it would be helpful that a user is told this.
It goes to the picture I sent you. There is no drop downs there. I don’t understand how this is a lack of understanding. If It is my lack of understand and not a bug, why does it let me enter a name for this and then the name is erased? The Sun picture I sent you doesn’t make sense. It is not consistent to the docs.
condition:
condition: or # 'when dark' condition: either after sunset or before sunrise - equivalent to a state condition on `sun.sun` of `below_horizon`
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
It uses the name to try and determine what kind of automation you are trying to make and present you with the right device type prompt. It uses natural language (almond) from what I can see for that.
(Clicking the ADD CONDITION at the bottom for the second sun condition)
They don’t just release shit that doesn’t work… if you can’t make it work it’s almost always because of a lack of knowledge.
ALSO EDIT: Why not make a yaml automation and save it and then open it in the GUI editor - you will then see how it is put together and it might help you to use the GUI editor if you want to in the future. The new editor lets you make very complex conditions that always used to just show as unsupported in the editor before… it’s really good now.
I never said they intentionally release stuff that doesn’t work. I understand this is beta, and there are things that doesn’t work. What I said is that they are not consistent. If you follow the logic in the docs, the lights turn on after sundown and stay on until sunrise. The document I linked show the data entered is now the opposite of what is now with the new automatic automation builder. Again for anyone learning a new system consistency makes the learning much easier. When things don’t work I look at the docs and try to figure out what I did wrong. When the lights don’t turn on when I think they should look at the code and try and figure out why.
My understanding of the new automation builder is to us this.
I don’t understand the question. I did a screenshot in preceding post with sunset and sunrise conditions… ok the order I showed is the reverse of your text… but they can be reversed and still do the same thing.
The GUI editor does re-sort stuff and show it in a different order and that is frustrating I agree and it’s one of the reasons I don’t use the GUI editors because it makes stuff unreadable - but that’s because I am used to using yaml - it’s not a bug and both ways give identical functionality.
It’s actually not. You could specify the conditions in the same as the yaml order (but they might get re-ordered when you save) However that’s not that important - just different but still does the same thing and works the same way. A condition is just a condition…
EDIT: I see what you mean with the order looking again. But it doesn’t matter… you could just add another condition like I did in my screenshot - both will work.
When I am learning new coding there is no why that I know that order doesn’t matter. When you deal with the next day many times order matters when coding! I look at before sunrise to after sunset completely differently than after sunset and before sunrise. One of the docs showed graphs showing how the code is handled. I’ll try and find it an see if it agrees with your explanation.
You can also use 2 seperate sun conditions as well instead of having them as part of the one condition. The yaml code you show and my screenshot have them as 2 seperate conditions. Your screenshot will have them in yaml as 1 condition I think - you just need to try and see. Ultimately, it’s going to use the yaml code either created by the GUI or manually entered by you. That’s why I suggest doing it in yaml and then viewing in GUI as well so you can see what it does.
Mine puts in condition: or, yours does not. Are you saying you don’t need the or?
I also see when you enter with the GUI it is different from the docs. Don’t know if it is an issue, but it doesn’t run as I expect it should. I have manually edited it and am now trying per the documents. If this works I will post the difference.
Just saw in another thread from metbril
Robert , that the Gui editor does not support advanced conditions (yet).
As I did say previously, to see what is up, enter it in yaml and then open the automation in the GUI editor and see how it could have been entered using the editor.
I didn’t actually use the one I screenshotted… was just showing you can have both…
I am not aware as I said of any bug or issue with the automation editor now… it isn’t my preference to use it but it works.
This is how the automation editor creates the “or” code
condition: or
conditions:
- condition: sun
before: sunrise
after: sunset
This is how it should look
condition:
- condition: or
conditions:
- after: sunset
condition: sun
- before: sunrise
condition: sun
The first one does not work and is a bug in the editor. The second one is from the HA document and it works. Try it on your end and see if you see the same issue? On a different thread another user has this identical issue.
I re-read your link and I understand what it says, but there are still many bugs that need to be cleaned up. They show the first screen that we talked about yesterday and neither one of us could enter devices there. Both of us had to hit skip to be able to add devices. Not sure if it worked when this was released and got broken after one of the updates or it was broken when released?
I never tried but I will now - as I said I am pretty sure on this screen you would add the friendly name NOT sensor. etc…
I enter turn on coffee maker
Then create automation
I then specify an area… like kitchen…
click create automation
It then creates it with this action:
I did try a turn lights on but as my lights are not ‘devices’ I can’t select them. You also wanted to use motion sensor and the device needs to have a class of motion or something like that…
So you’re right it needs some refinement probably and some stuff added… it only seems to work with devices at the moment… so check configuration devices to see which devices you should be able to specify I guess. I don’t see this as a bug as such but meh…
Mine looked identical to yours, but the yaml code created is is different from the HA document and does not work. Did you look at the code in yaml file? My GUI looks identical to yours but the code it created is not working.
I will look again at the first screen and see if my problem is due to lack of understand on how it works or something else.
I have no drop down.
I created this one using only the automation editor:
- id: '1578192928902'
alias: New Automation
description: ''
trigger:
- event: start
platform: homeassistant
condition:
- condition: or
conditions:
- after: sunset
condition: sun
- before: sunrise
condition: sun
action:
- entity_id: light.lounge
service: light.turn_on
The conditions look identical to your posted working one.
Again, I suggest you open the automation you created in yaml in the editor and see how it looks. Anyway, the GUI one I created is IDENTICAL to your posted code and would work exactly the same way.
Do you have any devices of type motion-device? Did you look in the configuration devices… are there any motion-device types listed? For examply, in my device list I don’t see any lights as they are not ‘devices’ but I do see switches which are devices.