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¶m=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');
}Thanks in advance!