Caldav calendar and then? I would like to let something blink

Hi,

I have created a new caldav calendar and managed to add it to home-assistant. Appointments of the calendar appear in the web gui of home-assistant.

From configuration.yaml:

calendar:
  - platform: caldav
    username: assistant
    password: !secret caldav_password
    url: https://XXXXXXX/caldav.php/assistant/calendar/

I had problems with the self signed certifcate of my server, but I disabled the check in the source currently.

I would like now to turn on a light if I there is a calendar appointment and I do not get the concept/syntax/naming scheme/pattern…

What I did:

I used the web gui editor and created this file:

# cat automations.yaml 
- id: '1544375976196'
  alias: New Automation
  trigger:
  - entity_id: calendar.home_assistant_calendar
    platform: state
  condition:
  - condition: state
    entity_id: calendar.home_assistant_calendar
    state: 'on'
  action:
  - alias: ''
    data: {}
    service: light.turn_on

Which does not work as far as I can see. My light is a tradfri and has the name light.sofa.
Obviously the action does not specify which light to turn on. Do I need to enter that as data?
How does the name of the calendar “calendar.home_assistant_calendar” in automations.yaml relate to the strings in configuration.yaml?

Is automation the way to follow for this? Or am I on the wrong track?