Have error in log for automation. need help

getting the following error

homeassistant.bootstrap: Invalid config for [automation]: expected a dictionary @ data[‘condition’][0]. Got None
extra keys not allowed @ data[‘after’]. Got {}
extra keys not allowed @ data[‘before’]. Got {}
extra keys not allowed @ data[‘weekday’]. Got {}.

I have 2 config files with these settings

config 1:

  • alias: TravelGSMAgrifirm
    trigger:
    • platform: numeric_state
      entity_id: sensor.agrifirm
      above: 18
      condition: time
      after: ‘08:00:00’
      before: ‘08:30:00’
      weekday:
    • mon
    • tue
    • wed
    • fri
      action:
      service: notify.GSM_Martin
      data_template:
      message: ‘Reistijd naar agrifirm is {{ states.sensor.agrifirm.state }}’

      Config 2:
  • alias: AnkeThuis
    trigger:
    • platform: state
      entity_id: device_tracker.anke
      state: home
      condition: time
      weekday:
    • mon
    • tue
    • wed
    • fri
      action:
      service: notify.GSM_Martin
      data_template:
      message: “Anke is thuis”

Forum is messing up the spaces in the beginning

Try this.

condition:
  condition: state        # Or any other condition #
  entity_id:

I have edited your yaml below…

- alias: TravelGSMAgrifirm
  trigger:
    platform: numeric_state
    entity_id: sensor.agrifirm
    above: 18
  condition:
    condition: time
    after: '08:00:00'
    before: '08:30:00'
    weekday:
      - mon
      - tue
      - wed
      - fri
  action:
    service: notify.GSM_Martin
    data:
      message: 'Reistijd naar agrifirm is {{ states.sensor.agrifirm.state }}'

I’ll give it a try

thank you it worked with your suggestion. i

iI only changed data to data_template

1 Like

Glad I could assist!