Battery low level highlight does not respect setting

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
domja
Posts: 8
Joined: Friday 20 June 2025 19:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Contact:

Battery low level highlight does not respect setting

Post by domja »

Version: 2025.1 both stable and beta (build 16782)
Platform: Raspberry Pi / ODroid (Docker)
Plugin/Hardware: dummy/percentage device
Description:

According to the wiki https://wiki.domoticz.com/Application_S ... _Low_Level when Battery Low level is set, a notification is sent and highlight color yellow is shown when the battery level is reached.

To test I created a dummy/percentage device and set the percentage to 25% (via api call /json.htm?type=command&param=udevice&idx=19&svalue=25&battery=25)
When in settings->other, the battery low level percentage is set to 30%, a notification is sent... however the device widget is NOT colored yellow.

After some digging I found:
- div.item.statusLowBattery is responsible for the yelllow color
- div.item.statusLowBattery is controlled by www/app/DashboardController.js (and possibly www/app/app.js?)

In both situations the low level value is hardcoded to 10:

Code: Select all

 var BatteryLevel = parseInt(item.BatteryLevel);
 if (BatteryLevel != 255) {
	if (BatteryLevel <= 10) {
		$(id + " #name").removeClass('statusNormal');
		$(id + " #name").addClass('statusLowBattery');
	}
The code should respect the value as set in the settings.

Thanks in advance!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest