    def set_ref_power(self, value: float) -> float | None:
        """
        Set a new reference power and return the resulting distance.

        Typically called from the parent device when either the user changes the calibration
        of ref_power for a device, or when a metadevice takes on a new source device, and
        propagates its own ref_power to our parent.

        Note that it is unlikely to return None as its only returning the raw, not filtered
        distance = the exception being uninitialised entries.
        """
        # When the user updates the ref_power we want to reflect that change immediately,
        # and not subject it to the normal smoothing algo.
        # But make sure it's actually different, in case it's just a metadevice propagating
        # its own ref_power without need.
        if value != self.ref_power:
            self.ref_power = value
            return self._update_raw_distance(False)
        return self.rssi_distance_raw
Set a new reference power and return the resulting distance.

Typically called from the parent device when either the user changes the calibration
of ref_power for a device, or when a metadevice takes on a new source device, and
propagates its own ref_power to our parent.

Note that it is unlikely to return None as its only returning the raw, not filtered
distance = the exception being uninitialised entries.
custom_components/bermuda/bermuda_device_scanner.py