Switch error on existing (unmodified) config

Hi,

I did not change this config, but now I’m getting errors on this switch:

switch:
  - platform: command_line
    switches:
      evse:
        friendly_name: EVSE activeren
        command_on: "curl http://192.168.2.98/setStatus?active=true"
        command_off: "curl http://192.168.2.98/setStatus?active=false"
        command_state: "/usr/bin/curl -X GET http://192.168.2.98/getParameters"
        value_template: '{{ value_json.list[0].evseState == True}}'

Invalid config for [switch]: required key not provided @ data[‘platform’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch/

What is wrong with it?

Sort off solved it. There is actually nothing wrong with this switch.

I have switch: configured like this in configuration.yaml:

switch: !include_dir_merge_list include/switches

But I also have several switches defined in packages which are included like:

homeassistant:
  packages: !include_dir_named packages

I deleted a (the last) switch from /include/switches so there where no more files in that folder.

That is wat caused the issue.

I now just put one file with a dummy template switch back in /include/switches/ and the error is gone.