Getting rid of extra keys that platform doesn't support

I’ve installed Hass on a Raspberry Pi Zero, and part of the install is a magnetic switch on a door. Configuration.yaml:

binary_sensor:

  • platform: rpi_gpio
    device_class: opening
    ports:
    14: Garage Door

While this worked, I’ve been getting an error that my setup contains extra keys that the platform does not support (but were silently accepted before 0.88). It says this must be removed, as it will become a breaking change. The issue looks to be ‘device_class’

breaking

I’ve since read that ‘device_class’ isn’t listed as an option for Raspberry Pi GPIO Binary Sensor, so I’ve since added a few lines to my Customize.yaml:

binary_sensor.garage_door:
friendly_name: Garage Door
icon: mdi:door

But the error still persists.
It’s weird, because I use the same code on other Pi’s and they have no issues.

can you use the blue bar on top of the page to format your code correctly?
Also can you confirm that device_class: opening was indeed on line 32 of configuration.yaml?
Once you remove the line and restart the issue should be resolved unless you have other components with such additional keys.

Also for your customize.yaml, you’d be better os using the device_class there. Don’t forget the spaces as below (can’t check your original code as again it was not correctly formatted)

binary_sensor.garage_door:
  friendly_name: Garage Door
  device_class: door