In saveCharacteristic(), when deciding if the wind speed occupancy detector is to be set, the comparison is performed against a hard-coded trigger value of '4'. But the wind speed value being compared has already been converted to different units (if non-SI units are being used).
This PR saves the converted characteristic value without mutating the passed-in value. This leaves the passed in value in unconverted units so it can be used for comparison later without having to also convert the trigger value.
In saveCharacteristic(), when deciding if the wind speed occupancy detector is to be set, the comparison is performed against a hard-coded trigger value of '4'. But the wind speed value being compared has already been converted to different units (if non-SI units are being used). This PR saves the converted characteristic value without mutating the passed-in value. This leaves the passed in value in unconverted units so it can be used for comparison later without having to also convert the trigger value.