Repository navigation
Automation triggers: a pick in the editor is shown at once - #5592
Open
olorinmaia wants to merge 2 commits into
Open
olorinmaia wants to merge 2 commits into
olorinmaia wants to merge 2 commits into
Conversation
The Bluetooth device, temp target, time and WiFi trigger editors did not get the tick that the other editors use to redraw. After a pick the value was stored in the trigger, but the screen kept the old text, so it looked like the pick was lost. The Bluetooth device field also showed the first paired device when nothing was stored. A user who did not open the list saved a trigger with an empty device name, which never fires. The field is now empty until the user picks a device. Fixes nightscout#5550
The date picker gives and takes a day as midnight UTC. The editor read the pick in the local zone and gave the picker the raw trigger time. West of UTC the stored date was one day too early. The picker could also open on the wrong day, for example in the first hour after midnight in Norway. The pick is now read in UTC, and the picker gets the local date as midnight UTC. The time of day is untouched.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the automation trigger editor, a pick in the Bluetooth device list or in "On connect / On disconnect" was stored but not shown, so it looked like the pick was lost. The temp target, time and WiFi triggers had the same fault. Two more faults were hidden behind it: the Bluetooth field showed the first paired device when nothing was stored (a trigger saved like that has an empty name and never fires), and the time trigger stored the picked date one day too early west of UTC.
Fix
tick, like the other editors (they redraw after a pick)Tests
No unit tests cover these editors, none added. On device (Z Flip 5,
fullrelease, time zone America/Vancouver): Bluetooth device and connect picks show at once, temp target and WiFi chips update, the time trigger shows and keeps the picked date.before.mp4
after.mp4
Fixes #5550