Ravn::Bluez::State::
Pairing
class
Request a bluetooth pair with a watch device.
In normal operations, attempt to pair to the stored device path - on failure, go back to scanning. If there is a hardcoded watch address in the configuration, we’ll continually attempt to attempt to pair to the device.
def update( * )
if self.device.class.bluetooth_address
self.device.start_scanning unless Ravn::Bluez.scanning?
return :is_paired if self.device.pair
else
return self.device.pair ? :is_paired : :lost_pair
end
end