Adding debug. Since it doesn't seems to work after for night settings.

This commit is contained in:
2023-11-29 14:55:32 +01:00
parent b71c02fcca
commit 3f411c7113

View File

@ -179,7 +179,6 @@ if use_eco:
else:
# Use EDF "API"
# TODO:
today=date.today()
resp = http.request("GET", "https://particulier.edf.fr/services/rest/referentiel/searchTempoStore?dateRelevant="+str(today.strftime("%Y-%m-%d")))
if resp.status == 200:
@ -209,9 +208,13 @@ else:
now = datetime.now()
#Heures creuses: 22h00 -> 06h00
loggerinfo("Current hour : "+str(now.hour))
if now.hour >= 6 and now.hour <=22:
loggerinfo("We are DAY")
daynight = 1
else:
loggerinfo("We are NIGHT")
daynight = 0
loggerinfo("La couleur aujourd'hui "+str(curcouleur))