KlikAanKlikUit (kaku) automation time based on/off

Hello there fellow home-automators :slight_smile:

I’ve got a nice system set up here with homeassistant running on a raspberry pi, with an rflink arduino connected to it.
I can switch on/off my klikaanklikuit (kaku) switches through the homeassistant webinterface and app.

But what I’m actually looking for is some automation, I want to turn off all my switches at 18:00:00 and off at 22:00:00

What I’ve tried is adding automation scripts to my configuration.yaml, without errors when I let homeassitant check it
But the switches don’t respond to it…

Can anyone help me set up my automation please?

My configuration.yaml:

light:
  - platform: rflink
    automatic_add: True
    device_defaults:
      fire_event: true
    devices:
      kaku_000043_1:
        name: klikaanklikuit_1
      kaku_000043_2:
        name: klikaanklikuit_2

automation:
    alias: 'Light on at night'
    trigger:
        platform: time
        at: '18:00:00'
    action:
        service: light.turn_on
        entity_id: light.klikaanklikuit_1

automation 2:
    alias: 'Light off at night'
    trigger:
        platform: time
        at: '22:00:00'
    action:
        service: light.turn_off
        entity_id: light.klikaanklikuit_1

Don’t put “automation:” in automations.yaml. Layout your automations like this example:

The "automation: " code is not in automation.yaml,

All my info is in configuration.yaml

I don’t use my automation.yaml

Ok this is wrong though

automation 2:

List all your automations under

automation:

e.g.

automation:
  - alias: 'Light on at night'
    trigger:
        platform: time
        at: '18:00:00'
    action:
        service: light.turn_on
        entity_id: light.klikaanklikuit_1

  - alias: 'Light off at night'
    trigger:
        platform: time
        at: '22:00:00'
    action:
        service: light.turn_off
        entity_id: light.klikaanklikuit_1

too bad, no luck :frowning:

Indentaion was a bit off:

automation:
  - alias: 'Light on at night'
    trigger:
      platform: time
      at: '18:00:00'
    action:
      service: light.turn_on
      entity_id: light.klikaanklikuit_1

  - alias: 'Light off at night'
    trigger:
      platform: time
      at: '22:00:00'
    action:
      service: light.turn_off
      entity_id: light.klikaanklikuit_1

Also check your HA system time.

grrrrrrrr :japanese_ogre: it was the HA system time, apparently the time was 1 hour behind real time (maybe daylight savings time?)

How to set the HA system time?

Thanks for the help everyone!

It’s in configuration.yaml:

homeassistant:
  name: Your HA name Here
  latitude: !secret home_lat
  longitude: !secret home_long
  elevation: 0
  unit_system: metric
  time_zone: !secret home_time_zone   ###<--- Set time zone here ###

Thanks! All set now! :grin: