Trouble with light automation

Found this thread:


Looks like a bug?
Anyway, I am testing a workaround, instead of before sunrise or after sunset I am using:
condition: state
      entity_id: sun.sun
      state: 'below_horizon'

Seems to be working, light do turn on :slight_smile:
I am still getting an error, though:

Configuration invalidCHECK CONFIG

Invalid config for [automation]: expected a dictionary @ data['condition'][0]. Got None extra keys not allowed @ data['entity_id']. Got None extra keys not allowed @ data['state']. Got None. (See /config/configuration.yaml, line 104). Please check the docs at https://home-assistant.io/components/automation/
- id: '1547866606884'
  alias: Ugasni luči.
  trigger:
  - entity_id: device_tracker.huawei_mate_20_pro
    from: home
    platform: state
    to: not_home
  - event: sunrise
    platform: sun
  condition: []
  action:
  - data: {}
    entity_id: group.all_lights
    service: light.turn_off
- id: '1547865918090'
  alias: Prižgi luči.
  trigger:
  - entity_id: device_tracker.huawei_mate_20_pro
    from: not_home
    platform: state
    to: home
  - event: sunset
    platform: sun
  condition: state
  entity_id: sun.sun
  state: 'below_horizon'
  action:
  - entity_id: group.all_lights
    service: light.turn_on