Skip to content

Commit 7c802bb

Browse files
committed
Fix colors when using Light Theme
1 parent 78c668b commit 7c802bb

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

raw/Devices_Online/devices_online.be

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ end
120120
# extension devices_online
121121
#---------------------------------------------------------------------------------#
122122
class devices_online
123-
static var line_highlight_color = "yellow" # Latest change highlight HTML color like "#FFFF00" or "yellow"
124-
static var line_lowuptime_color = "lime" # Low uptime highlight HTML color like "#00FF00" or "lime"
125-
126123
var mqtt_state # MQTT tele STATE subscribe format
127124
var mqtt_topic_idx # Index of %topic% within full topic
128125
var mqtt_step # MQTT message state
@@ -631,7 +628,7 @@ class devices_online
631628
msg += "<td>"
632629
for p: power.keys()
633630
msg += format("<a href='#p'%s title='Toggle POWER%d' onclick='la(\"&sd_pow=%s_%d\");'>%s&nbsp</a>",
634-
(power[p]) ? " style='color:lime;'" : "", p +1, topic, p +1, (power[p]) ? "&#x2612" : "&#x2610")
631+
(power[p]) ? " style='color:var(--c_txtscc);'" : "", p +1, topic, p +1, (power[p]) ? "&#x2612" : "&#x2610")
635632
end
636633
msg += "</td>"
637634
else
@@ -658,9 +655,9 @@ class devices_online
658655
msg += format("<td align='right'>%s%%&nbsp</td>", str(wrssi))
659656
end
660657
if int(last_seen) >= (now - dvo_time_highlight) # Highlight changes within latest seconds
661-
msg += format("<td align='right' style='color:%s'>%s</td>", self.line_highlight_color, uptime)
658+
msg += format("<td align='right' style='color:var(--c_txtscc);'>%s</td>", uptime)
662659
elif int(uptime_sec) < dvo_online_window # Highlight changes just after restart
663-
msg += format("<td align='right' style='color:%s'>%s</td>", self.line_lowuptime_color, uptime)
660+
msg += format("<td align='right' style='color:var(--c_txtwrn);'>%s</td>", uptime)
664661
else
665662
msg += format("<td align='right'>%s</td>", uptime)
666663
end

raw/Devices_Online/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Devices Online",
3-
"version": "0x190A0D00",
3+
"version": "0x190A0E00",
44
"description": "Display devices online info",
55
"author": "Theo Arends",
66
"min_tasmota": "0x09040000",

0 commit comments

Comments
 (0)