AndroidAPS icon indicating copy to clipboard operation
AndroidAPS copied to clipboard

[WIP] Night mode

Open justmara opened this issue 1 year ago • 8 comments

This PR adds overnight SMB restriction mode (inspired by Eating Now @dicko72).

  • You set up the time interval for 'Night mode' to be active
  • Set the BG offset (from profile target) in which Night mode will be active during time from step 1

So during night while your BG is below profileTarget + BG offset - SMB will be disabled and only TBR will be active for plugins. When BG escalates higher than profileTarget + BG offset - SMB overnight restriction falls off.

You can also set up Night mode to be disabled if COB > 0. Or when Temp Target is set lower than profile target.

telegram-cloud-photo-size-2-5228906977193741105-y

07..15:00 time is set here because I were testing it during a day now :)

telegram-cloud-photo-size-2-5228906977193741106-y telegram-cloud-photo-size-2-5228906977193741104-x

The idea of this mode itself is to add some security mode against overnight sensor pressures. Here is my daughter's BG this night - these fast drops are sensor pressures, and quick rises - BG comes back to real after pressure released. telegram-cloud-photo-size-2-5228833984224546746-y

Usually AAPS acts like this for these quick rises (see many SMBs here) telegram-cloud-photo-size-2-5228833984224546748-y

But frankly thats a graph from my test phone connected to virtual pump, because in reality MUCH lower amount of insulin were required to deal with that: telegram-cloud-photo-size-2-5228833984224546747-y

TBS is way more safe for such beaviour

justmara avatar Sep 26 '23 09:09 justmara