Added rule for bat_now.status = Full when rate suppose be 0

This commit is contained in:
Andrej Kouřil 2016-03-27 15:28:52 +02:00
parent 37c4198cdf
commit 2b4e911dfd
1 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,14 @@ local function worker(args)
bat_now.status = first_line(bstr .. "/status") or "N/A" bat_now.status = first_line(bstr .. "/status") or "N/A"
bat_now.ac_status = first_line(astr .. "/online") or "N/A" bat_now.ac_status = first_line(astr .. "/online") or "N/A"
-- if rate = 0 or rate not defined skip the round
if not (rate_power and rate_power > 0) and
not (rate_current and rate_current > 0) and
not bat_now.status == "Full"
then
return
end
local rate_time = 0 local rate_time = 0
if bat_now.status == "Charging" if bat_now.status == "Charging"
then then