[solved] Invalid config for [knx]

Hi guys, I keep getting this error after updating Proxmox which had to be rebooted (new kernel)
HA was running fine, nothing changed there except reconfiguring the Tuya integration.

configuration.yaml:

knx:
  switch: !include knx_switch.yaml
  sensor: !include knx_sensor.yaml
  tunneling:
    host: '192.168.1.49'
    port: 3671
    local_ip: '192.168.1.4'

Error:

Invalid config for [knx]: required key not provided @ data[‘knx’][‘sensor’][2][‘type’]. Got None. (See /config/configuration.yaml, line 43). Please check the docs at KNX - Home Assistant

I have restarted HA numerous times but without any improvement.
Any help is highly appreciated!

Something is wrong in your knx_sensor.yaml. An entry seems to be missing its type info. Can you show the file content?

1 Like

Hi @spacegaier, thanks for picking this up!

knx_sensor.yaml:

- name: knx_acttemp
  type: 'temperature'
  state_address: '0/3/11'
- name: knx_reqtemp
  type: 'temperature'
  state_address: '0/3/10'
- name: Pump_Status
  state_address: '0/0/13'
- name: Pump_Gate_Status
  state_address: '0/0/15'  

The last two entries in that file are missing the type attribute. But as you can see in the documentation (linked also in the error message from HA), that attribute is required.

1 Like

Thanks Philip, that seems to be the problem indeed!
Strange that this didn’t come up earlier… :woozy_face:

I have tried with:

type: 'binary'

but that doesn’t seem to work.
Commenting these lines out restores the rest though.

binary is not a valid sensor type. This is only valid in the expose: config context.
Use a binary_sensor instead. https://www.home-assistant.io/integrations/knx/#binary-sensor
With your separated file structure this would mean an additional !include and yaml file.

1 Like