I would look at spitting up your config, makes thing a lot easier.
Going to be new and clean. I have some changes to do to have less lines.
@TinyDoT just finished the new codes for the “old” automation part. And that is back in action.
Did some tests with the gate and found out that the sun part is working great. Sun set and gate lights etc work fine. But found out that the 0:00 part is not working. So before 0:00 also the rules are activated resulting lights on and off during opening and closing the gate. So we have a small thing to change. Funny bit is that I have changed 00:00:00 to 00:00 etc but no result.
Remco
#Hek dicht licht uit
- alias: GoGoGate dicht licht uit
trigger:
platform: state
entity_id: cover.hek
from: open
to: closed
condition:
condition: and
conditions:
- condition: time
after: 0:00
- condition: state
entity_id: sun.sun
state: below_horizon
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
#Hek open licht aan
- alias: GoGoGate open licht aan
trigger:
platform: state
entity_id: cover.hek
from: closed
to: open
condition:
condition: and
conditions:
- condition: time
after: 0:00
- condition: state
entity_id: sun.sun
state: below_horizon
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
#Hek en guesthouse dimmen om 0:00
- alias: Hek en guesthouse dimmen om 0:00
trigger:
- at: 0:00
platform: time
action:
- service: scene.turn_on
entity_id: scene.guesthouse_dim
- service: scene.turn_on
entity_id: scene.hek_dim
#Tuin verlichting aan bij zon onder
- alias: Tuin verlichting aan bij zon onder
trigger:
- event: sunset
platform: sun
action:
- service: switch.turn_on
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
- service: switch.turn_on
entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch_2
- service: switch.turn_on
entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch
- service: switch.turn_on
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_2
- service: switch.turn_on
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_4
#tuin verlichting uit bij zon op
- alias: Tuin verlichting uit bij zon op
trigger:
- event: sunrise
platform: sun
action:
- service: switch.turn_off
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
- service: switch.turn_off
entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch_2
- service: switch.turn_off
entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch
- service: switch.turn_off
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_2
- service: switch.turn_off
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_4
#Garage verlichting uit om 0:00
- alias: Garage verlichting uit om 0:00
trigger:
- at: 0:00
platform: time
action:
- service: switch.turn_off
entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
I’m pretty sure it your line of code:
after: 0:00
needs to look like this:
after: ‘00:00:00’
The after: ‘00:00:00’ gives an error.
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘after’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None
required key not provided @ data[‘condition’][0][‘conditions’][0][‘entity_id’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 74). Please check the docs at Automation - Home Assistant
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘after’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None
required key not provided @ data[‘condition’][0][‘conditions’][0][‘entity_id’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 74). Please check the docs at Automation - Home Assistant
After: 00:00 is green light
I think you need to go to one of the examples on the link I sent and copy and paste and see if that give you an error.
copied
condition:
condition: time
# At least one of the following is required.
after: '15:00:00'
before: '02:00:00'
weekday:
- mon
- wed
- fri
and result
Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a block collection
in “/home/homeassistant/.homeassistant/automations.yaml”, line 2, column 1
expected , but found ‘?’
in “/home/homeassistant/.homeassistant/automations.yaml”, line 100, column 1
And now changed into
after: '23:59:00'
And a green light. So I have to be quick to test 23:57 here
After a crash of gogogate connection it now works.
Cheers,
I think in the dusty corners of my memory that this rings a bell.
I had issues getting triggers to opperate bang on midnight ie zero hour of the next day.
Generally (I think) I set all my midnight triggers to “00:01:00”
I wouldnt put money on it as I’m only 65% sure
But hell if it works for you !!!
I’m gonna test this over the weekend and see
Set the time now on 00:00:20 and all fine
Great to hear.
I trust you will be very cautious about using any of the built in editors now ?
I’d be interested in your opinion as it’s being discussed on Teras’s @123 thread “School of hard knocks”
Feel free to post your views there.
Good luck in your future automations
Awesome job guys, i knew we would get it, and I think we all learned something in the process.