Type of capability

Hello,
I’m writing a new driver.
I’m struggling with an issue about the type of a capability.
The capability is ‘measure_luminance’ that is supposed to be a number.
But the device send a boolean (light/dark) and I got the following error :
Error: Invalid capability (measure_luminance) value type. Expected: number. Got: boolean

How to manage this issue?
Regards

Either make up values (0 for dark, 10000 for light, for instance) or create a custom capability.

make up ?

await this.setCapabilityValue('measure_luminance', value === 'dark' ? 0 : 10000);