mirror of
https://github.com/home-assistant/android
synced 2024-10-15 20:43:06 +00:00
Update sensors when BLE transmitter turned on and off (#3385)
* Update sensors when BLE transmitter turned on and off * Remove duplicate code
This commit is contained in:
parent
aaef25497d
commit
deb3d84ab7
|
@ -164,8 +164,8 @@ fun commandBleTransmitter(
|
|||
null
|
||||
)
|
||||
}
|
||||
BluetoothSensorManager().requestSensorUpdate(context)
|
||||
SensorUpdateReceiver.updateSensors(context)
|
||||
}
|
||||
BluetoothSensorManager().requestSensorUpdate(context)
|
||||
SensorUpdateReceiver.updateSensors(context)
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -108,10 +108,6 @@ class BluetoothSensorManager : SensorManager {
|
|||
return
|
||||
}
|
||||
|
||||
TransmitterManager.stopTransmitting(bleTransmitterDevice) // stop in all instances, clean up state if start required
|
||||
if (transmitEnabled) {
|
||||
TransmitterManager.startTransmitting(context, bleTransmitterDevice)
|
||||
}
|
||||
sensorDao.add(SensorSetting(bleTransmitter.id, SETTING_BLE_TRANSMIT_ENABLED, transmitEnabled.toString(), SensorSettingType.TOGGLE))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue