02-07-2023 12:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-07-2023 12:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I've built a clockface back in the 2019 and now I'm trying to make some updates but it seems like in SDK v4.3 I can't control the brightness of display anymore:
var flashlightToggle = function() {
if (flash.style.opacity == 0) {
flashlightOn();
} else {
flashlightOff();
}
};
var flashlightOn = function() {
flash.style.opacity = 1;
display.autoOff = false;
display.brightnessOverride = 1.0;
};
var flashlightOff = function() {
flash.style.opacity = 0;
display.autoOff = true;
display.brightnessOverride = undefined;
};
In this context, flash is a white rectangle that takes the whole screen, and when triggered, acts like a flashlight and helps me find my way to bed every evening.
Using auto-brightness in situations where you need a flashlight doesn't make sense.
How can I get this functionality back?
Answered! Go to the Best Answer.

Accepted Solutions
02-07-2023 12:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


02-07-2023 12:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The API has changed for .autoOff and brighnessOverride (see here). autoOff will be a problem because of AOD.
Gondwana Software
02-07-2023 12:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


02-07-2023 12:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The API has changed for .autoOff and brighnessOverride (see here). autoOff will be a problem because of AOD.
Gondwana Software
02-07-2023 12:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-07-2023 12:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Thanks, this was really helpful! Maybe putting display to be always on isn't the best solution. I'll try to set the timer instead.
02-07-2023 13:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-07-2023 13:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I've made an update and even though it doesn't trow an error anymore, it does not work in practice. My "flashlight" is now almost useless 😞
var flashlightToggle = function() {
if (flash.style.opacity == 0) {
flashlightOn();
} else {
flashlightOff();
}
};
var flashlightOn = function() {
flash.style.opacity = 1;
display.autoOff = false;
//display.brightnessOverride = 1.0;
display.DisplayBrightnessValue = "max";
};
var flashlightOff = function() {
flash.style.opacity = 0;
display.autoOff = true;
// display.brightnessOverride = undefined;
display.DisplayBrightnessValue = "normal";
};
How can I fix it?!?

02-08-2023 00:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


