Hot to configure commandline sensors as temperature (so they can be exported to Google Home)

I am using a commandline script to read out some 433Mhz temperature sensors.

sensor:
  - platform: command_line
    device_class: temperature
    name: Woonkamer Temperatuur
    command: "/config/homewizard/homewizard.sh -t -d Woonkamer"
    unit_of_measurement: "°C"
  - platform: command_line
    device_class: temperature
    name: Slaapkamer Temperatuur
    command: "/config/homewizard/homewizard.sh -t -d Slaapkamer"  
    unit_of_measurement: "°C"

But when I do that these entities are not available for synchronisation through the Nabu Casa Google home integration. So I assume I need to define them as

device_class: temperature
.

But if I add that to the sections above I get a config error. What am I doing wrong?

Invalid config for [sensor.command_line]: [device_class] is an invalid option for [sensor.command_line]. Check: sensor.command_line->device_class. (See ?, line ?).

Try setting the device class via:

Configuration > Customisations

Seems to be less restrictive as to which platforms you can assign them to.

I have the following command_line sensor appearing in Nabu Casa using the above method

  - platform: command_line
    name: CPU Temperature
    command: "cat /sys/class/thermal/thermal_zone0/temp"
    unit_of_measurement: "°C"
    value_template: '{{ (value | multiply(0.001)) | round(1) }}'