You should not need to be connected to update the value. However it could still make sense to stop updating it if nobody is reading to save power (if you run from battery).
Maybe the setInterval fires already before you call NRF.setServices?
Saving power make sense. I can see the device is drawing around 40mA even when not connected. It would be nice to detect the connection. Then it could be kept in some lower power mode when nothing is connected to it.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You should not need to be connected to update the value. However it could still make sense to stop updating it if nobody is reading to save power (if you run from battery).
Maybe the setInterval fires already before you call NRF.setServices?