I’m trying to get my head around a configuration. All my garden lights go on at sunset and off at sunrise. But I want to dim 2 lights at time X say 0:00. My modules are Qubino. This is the automation I have created but I’m stuck.
‘’’
id: ‘1564949714672’
alias: Hek verlichting uit bij zon op
trigger:
event: sunrise
platform: sun
condition: []
action:
Do you know if it is possible to trigger a scene from opening a gate? I have a GoGoGate module and connected to Home assistant. I can open and close the gate trough the UI.
What I want to do if you open the gate after 0:00 the dimmed lights should go to 100% and when you close the gate it goes back to 20%
First I did put in the scene into the configuration.yaml file and that worked. After a reboot I saw the two extra scenes in the UI. After I put in the automation part in the automation.yaml and after that I can not get into the Home Assistant. The system is rebooted several times and also complete power down of the raspberry.
When you are copying code into your messages, you should copy the code in your message and then highlight it and click on the </> symbol above where you are typing your message. This will format the code the way it should be and makes it a lot easier to read. The code you have posted looks a little out of order, but that might be because of the formatting. Try the method I suggested above and we will go from there.
- id: '1566418818385'
alias: GoGoGate open licht aan
trigger:
- entity_id: cover.hek
from: closed
platform: state
to: open
condition:
- after: '22:00'
condition: time
- after: sunset
before: sunrise
condition: sun
action:
- entity_id: scene.garden_lights_bright
service: scene.turn_on
- data:
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
service: switch.turn_on
This should be better. I have changed one bit already. I had dicht and that makes GoGoGate not connecting to Home Assistant. But now changed and working. I have also changed the time just for testing.
But it seems that when opening the gate the lights are not triggered. So I think the command open and closed are not the right ones.
When I add the sun part it is not working. So time set to 0:00 now and end time 5:00 for now. And just walked the dogs and by opening the gate lights went on and by closing off.
I believe you are missing a crucial part in your condition statement, it is the " condition: and " and you have somethings out of order. Give this a try:
- id: '1566418818385'
alias: GoGoGate open licht aan
trigger:
- entity_id: cover.hek
platform: state
from: "closed"
to: "open"
condition:
condition: and
conditions:
- condition: time
after: 0:00
- condition: sun
after: sunset
before: sunrise
action:
- service: scene.turn_on
entity_id: scene.garden_lights_bright
- service: switch.turn_on
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
- id: '1566423130786'
alias: GoGoGate dicht licht uit
trigger:
- entity_id: cover.hek
platform: state
from: "open"
to: "closed"
condition:
condition: and
conditions:
- condition: time
after: 0:00
- condition: sun
after: sunset
before: sunrise
action:
- service: scene.turn_on
entity_id: scene.garden_lights_dim
- delay:
minutes: 1
- service: switch.turn_off
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
Changed it into your code and not working. Opened the gate and closed it no trigger. Or do I have to wait until sun is up and the system is settling in?