Dim lights at time x

Found a thread on editors - have a read

Yes that is much nicer. I have tried this and also get an error when testing it.

Error loading /home/homeassistant/.homeassistant/configuration.yaml: expected β€˜β€™, but found β€˜β€™
in β€œ/home/homeassistant/.homeassistant/automations.yaml”, line 12, column 1

I have tried to call the lights but they did not switch on or off then. This setup is working and will start tweaking when it al works. Also the names and not the idents.

No this is for my home.

What is on line 12 of of your configuration.yaml file?

alias: Hek dimmen om 00:00:00

I dont think you can do that, use this and then check config again:

alias: Hek dimmen om middernacht

good catch, probably because I didn’t like his use of 0:00 so I changed it to β€œ00:00:00”
My Bad : - (((((
There are other instances of that in alias’ aswell, he may need to replace those similarly
Mutt

Funny bit is that this is also used in line 2 of the code. And that is not stopping the action. I have changed now into 0:00 and try to reboot.
Big failure and no UI. Deleted the GoGogate part and no UI after reboot. So something in this code is not working like it should :wink:

The messy out of the UI automation did always work so not bad at all.

try to avoid any special characters in your aliases then (I’m thinking about the β€œ:” here)
Just letters, numbers and underscores (never start with a number either, it’s just bad practice)

So back to my old automation without the GoGoGate part and working like a dream as it always did. Also checking config gives all lights green.

Now adding the part of GoGoGate and get this lines after checking

Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping values are not allowed here
in β€œ/home/homeassistant/.homeassistant/automations.yaml”, line 74, column 12

… AND THAT SAYS ???
We are not stood over your shoulder you know !

It is now working also with the : part as long as I’m not using the GoGoGate part.

Automation is now

- id: '1566298789438'
  alias: Guesthouse dimmen om 0:00
  trigger:
  - at: '0:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_2
    entity_id: scene.Guesthouse_Dim
    service: scene.turn_on
- id: '1566303950332'
  alias: Hek dimmen om 0:00
  trigger:
  - at: 0:00
    platform: time
  condition: []
  action:
  - service: scene.turn_on
    entity_id: scene.Hek_Dim
- id: '1566314038315'
  alias: Zon onder
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_2
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_4
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch_2
    service: switch.turn_on
- id: '1566314814044'
  alias: Zon op
  trigger:
  - event: sunrise
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch
    service: switch.turn_off
  - data:
      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
    service: switch.turn_off
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch_2
    service: switch.turn_off
- id: '1566315078053'
  alias: 0:00
  trigger:
  - at: 0:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
    service: switch.turn_off
- id: '1566418818385'
  alias: GoGoGate open licht aan
    trigger:
      - platform: state
        entity_id: cover.hek
        from: "closed"
        to: "open"
    condition:
      - condition: time
        after: "00:00:00"
    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:
      - platform: state
        entity_id: cover.hek
        from: "open"
        to: "closed"
    condition:
      - condition: time
        after: "00:00: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

And is giving an error but is booting.

Deleting the GoGoGate part working like a dream and test gives a green light.

- id: '1566298789438'
  alias: Guesthouse dimmen om 0:00
  trigger:
  - at: '0:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_2
    entity_id: scene.Guesthouse_Dim
    service: scene.turn_on
- id: '1566303950332'
  alias: Hek dimmen om 0:00
  trigger:
  - at: 0:00
    platform: time
  condition: []
  action:
  - service: scene.turn_on
    entity_id: scene.Hek_Dim
- id: '1566314038315'
  alias: Zon onder
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_2
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch_4
    service: switch.turn_on
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch_2
    service: switch.turn_on
- id: '1566314814044'
  alias: Zon op
  trigger:
  - event: sunrise
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch
    service: switch.turn_off
  - data:
      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
    service: switch.turn_off
  - data:
      entity_id: switch.qubino_goap_zmnhdd1_flush_dimmer_switch_2
    service: switch.turn_off
- id: '1566315078053'
  alias: 0:00
  trigger:
  - at: 0:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch
    service: switch.turn_off

Wow wow hold your horses I’m not complaining or try to get you upset. But it is funny that the comment was that my yaml file was a mess. Explained that it comes out of the UI like that, hey I’m not a programmer and totally new to this, you give me a nicer looking yaml file and that is not working. So to make a joke I just said that that is funny. Messy is working and nice not.

So for now. Line 74 is - platform: state that gives an error.

that is a completely legitimate line but given your file, I’m not convinced that the YAML is correctly indented.
You need to post from say 5 lines before that to 10 lines after.
I see from your posted files that you are still using the automation editor, despite what we advised.
It’s okay if you only follow β€˜part of our advice’. But the best you can then hope for is β€˜part of a solution’

Looking at your Gogate automation that you are using:

  1. I see that your are using "00:00:00 " around your time and I dont think you can do that, it has to be single quotes ’ 00:00:00’. This is why I hate quotes.

  2. For your time statement you are using at: β€˜00:00:00’, and i do not believe that is allowed anymore, way back when yes, but now you have to use before: β€˜00:00:00’ and/or after β€˜00:00:00’.

I wish I could just run over to your house, and help you through this : )

Also, what version of Homeassistant are you using?

No, I use β€œ18:00:00” (for example) ALL the time

Damn quotes but, the at is still a factor I think.

for an actual use of a script that I see running now on my system (once every minute for 30 secs)

script:
  sc_media_update:
    alias: Media Index Update Script
    sequence:
      - delay: "00:00:30"  #### edit automation if changed
      - service: input_number.set_value
        data_template:
          entity_id: input_number.in_media_index2
          value: "{{ states('input_number.in_media_index1') | int }}"

AND index2 gets updated every 60 seconds - This checks if my music server has stalled, and kicks it

@RemcovanKuilenburg, if you take out your GoGate code and stick this back in and then do a Check Config, tell me where the error is you get:

- id: '1566418818385'
  alias: GoGoGate open licht aan
  trigger:
    platform: state
    entity_id: cover.hek
    from: "closed"
    to: "open"
  condition:
    - condition: time
      after: '00:00:00'
  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:
    platform: state
    entity_id: cover.hek
    from: "open"
    to: "closed"
  condition:
    condition: and
    conditions:
      - condition: time
        after: '00:00: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