This commit resolves the warning "characteristic was supplied illegal value: number 0 exceeded minimum of 0.0001" for the CurrentAmbientLightLevel characteristic.
The changes include:
Clamping the initial value of the CurrentAmbientLightLevel characteristic to be within the valid range (0.0001 - 100000) before updating the characteristic value.
Clamping the value of CurrentAmbientLightLevel whenever there is a 'change' event from the device, ensuring the updated value is always within the valid range.
By clamping the values, we prevent the plugin from setting an illegal value for the CurrentAmbientLightLevel characteristic, which was causing the warning to be generated.
This fix should eliminate the warning when the plugin first starts, as well as during subsequent updates from the device.
This commit resolves the warning "characteristic was supplied illegal value: number 0 exceeded minimum of 0.0001" for the CurrentAmbientLightLevel characteristic.
The changes include:
By clamping the values, we prevent the plugin from setting an illegal value for the CurrentAmbientLightLevel characteristic, which was causing the warning to be generated.
This fix should eliminate the warning when the plugin first starts, as well as during subsequent updates from the device.