I get errors if I try to remove the code you mention! I also no clue of any 3 little dots in the upper right corner of the automation editor, there is nothing like that on my screen. I’m I using a different setup here?
I’ve also just tried using Notepad++ to copy your code and getting this error though it seemed to go into the Automations.yaml file better and had fewer errors so might be a mistake on my behalf in the code!
alias: Turn on Desk Lamp
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.lumi_lumi_motion_ac02_motion
to: 'on'
- platform: state
id: "off"
entity_id:
- binary_sensor.lumi_lumi_motion_ac02_motion
to: "off"
for:
hours: 0
minutes: 3
seconds: 0
condition:
- condition: time
after: 09:00:00
before: '20:00:00'
action:
- service: light.turn_on
data: {}
target:
entity_id: light.desk_lamp_bulb
mode: single
- id: '1693220799421'
alias: Turn off Desk Lamp
description: ''
trigger: []
condition: []
action: []
mode: single
Its triggered now but still no light coming on though. I know you mention there was code at the bottom to remove but I get errors doing that and you are using kitchen lights instead of Desk Lamp which is also a switch to turn a bulb on but I keep the switch turn on all of the time for that to work.
Your screenshot shows the automation has only one trigger.
The YAML code for the same automation shows two triggers … but the first one is not indented correctly.
Is the indentation mistake actually in your YAML code or is that just a copying error when you pasted it into the forum post? If the mistake is real then it may explain why the screenshot shows only one trigger.
You are not supposed to edit automation.yaml by hand…use the automation editor instead.
And no personal offence, but you are not listening to us; if you want us to help you, you need to.
Otherwise it is pointless to give you suggestion, and it just becomes a waste of time…
Applogise if this sound like a rand… but we are now 28 post futher and we accomplised not much
Images would help me more than text as I find it hard to fully understand where or what you mean when I see nothing to what you say on my screen! I understand what you are meaning and trying to do but my options do not come up like yours do and I must have a different way Im unsure of as I know nothing in HA
Its frustrates me when this happens and also when files vanish and then come back on 30 mins later or errors don’t show up until 10 mins later
I manually did your code in a text editor to make sure I was getting it right, but in this process there is more chances it will be wrong with trying to do it this way and yes your way would be better if I know how too. if I see image of what you are explaining I would then know where to go or what to look for properly instead of me guessing and making things worse or in most cases better It cant really be much worse when not working.
Thanks!
Maybe 4 post would be better too for me, but maybe you get on my PC and you will see straight away it’s different than your setup! And does silly things! We can soon remove a lot of this post once we figure the issues but so far the issues are the same not working, but we do now after 28 post have light on but no light off
My Applogise if this sounds like a rand back to you
But unless you explain properly I will never know! If I see a video I follow it to the book and most o the time it works but like all things what one person computer show is different on another!
what is an Automation Page?
This is an example your asking me to open an Automation Page so to me I have 3 places to look so which is it or where to go to?
It’s also great you are helping me so don’t take this as Im having a go at you Im not!
I just cannot follow your instructions and yes its frustrating I know even more so for me as I have nothing working and spent time and money to do this to help rather than it being harder.
I have no choice on this as with my conditions I want things as easy as possible but also safe as possible which so far it pretty good 28 posts might be 30 now Im not counting! better than 50 years getting from a zx81 don’t think any of us want that again do we what more I learn and understand helps others get setup too as I tend to help back too when I can! And I know its hard when you cannot see the other person’s screen! Sorry for being a pain on not getting this right but I will eventually! Thanks for your time and Patients with me too!
Your option 4: I have never seen any 2. click the 3 dots, select ‘yaml mode’ to open?
So where Im I pasting any code in this? There is no where to do this, all it does it take me to where I was before in Visual Studio code.
This Automation does not remove my last code either as Im in a New one made!
Its the code that’s wrong for not turn the light off after the given time that’s not working on this Automation so again I see nothing I was doing wrong before apart from the code being wrong
I think with this video your code and me making a few changes, the solution is solved! I will remove some of the posts I think now Is not really needed but it is to a learner like me!
Thanks and I like your images too would of been great back at post-5
Code Used and Fully Working Now: By Aceindy, & Dave at The Diabeticway
alias: >-
Turn on/off Desk Lamp on motion between 09:00 and 18:00 and off after 3min
without motion
description: ""
trigger:
- platform: state
id: "on"
entity_id:
- binary_sensor.lumi_lumi_motion_ac02_motion
to: "on"
- platform: state
id: "off"
entity_id:
- binary_sensor.lumi_lumi_motion_ac02_motion
to: "off"
for:
hours: 0
minutes: 2
seconds: 0
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- "on"
- condition: time
after: "09:00:00"
before: "18:00:00"
sequence:
- service: light.turn_on
data:
brightness_pct: 60
target:
entity_id: light.desk_lamp_bulb
default:
- service: light.turn_off
data: {}
target:
entity_id: light.desk_lamp_bulb
mode: restart
Seen as I have done this setup on a Desk Lamp can anyone recommend a good one to replace my 20-year-old one please, and to be Zigbee compatible? I do like my lamp but it’s falling to bits now! SO, would something similar be great as a link too? I’ve looked for a while now and never really seen one similar!
Yes seems a better way and more control of it all too but takes a while to get used to doing it and without people like your self a lot harder to do thank you so much!
I be busy now doing the all home to this way and then trying to get iPad display to come on as a sensor detects me so this will also help with that later question I will be asking!
I also did a small Word file to share which I will add to the tube video to make things easier for me as I was not thinking to do this video but its taken me months to use it in this way and I’m sure it will help many more people thanks to you!
I also updated the video and no IKea around me to pop into but I will take a look Thanks for that too.
I’ve also noticed I see no Conditions to change to Sun by not using the editor but its not showing up the one you made in the code why Is this and how do I correct it?
Yes I know I saw it there but will it mess the other up that is already in the code? As they don’t seem to be syncing to each other from the editor? As you are showing there is how I did it before but we moved to do it code way did we not
Just tried an got both now in the code so how do I stop it from using the time can I add symbols at from to stop it from reading that code?