index 3f60235cd88c8660419dfa3b47541904f0d57a29..745e7fa71c67958d4478b0afc10546492749bbb1 100755 (executable)
## ticprocess.py
## Basic processing of tic2json dictionary output
##
-## (C) 2022 Thibaut VARENE
+## (C) 2022-2023 Thibaut VARENE
## License: GPLv2 - http://www.gnu.org/licenses/gpl-2.0.html
##
now = datetime.now(udate.tzinfo)
- if (now.day != udate.day):
+ if (now.day != udate.day): # skip if update day isn't today
+ return None
+ elif (sdate < now): # skip if start date is past
return None
else:
match color:
delest = inhibit_loads(tic) or over_vatresh(tic)
edhwok = allow_edhw(tic)
dayhc = day_hc(tic)
- colors = tempo_colors(tic)
- dc = colors[0]
- ndc = colors[1]
+ (dc, ndc) = tempo_colors(tic)
p = tic.get(ETIQ_POWER)
p = p and p.get("data")