nightscout / nightscout/AndroidAPS

[Feature Request] Automation - Add simple maths operators to numeric condition fields

Open
#3,777 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement for_discussion wontfix
Dominant language
Kotlin
Stars
1.2k
Forks
6.4k
Avg merge
2d 7h
Merged PRs (30d)
19

Description

I'd like to suggest the benefit of adding simple maths operators to numeric condition fields in the automation rules, where two different conditions could be combined to give a numeric result.

One usage example would be to add Glucose and BG Difference.
So, Glucose + BG Difference < 5.0 (delta in this situation would usually be negative, hence why I've used the + operator)
This could allow customised notifications alerts, not based solely on blood glucose value OR rate of change, (which is already possible, both in BYODA and AAPS automation), but by considering both and pre-warning of the likelihood of approaching a particular value in the next 5-15 minutes.
I realise, of course, that the rate of change is not necessarily going to be the same, but I'd still like to be given this warning.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the automation rules' numeric condition implementation and its tests, then clarify how two conditions should be combined and compared. Done means the requested arithmetic operators support the glucose and BG Difference example and have verified behavior in the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.