Adding debug. Since it doesn't seems to work after for night settings.
This commit is contained in:
@ -179,7 +179,6 @@ if use_eco:
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
# Use EDF "API"
|
# Use EDF "API"
|
||||||
# TODO:
|
|
||||||
today=date.today()
|
today=date.today()
|
||||||
resp = http.request("GET", "https://particulier.edf.fr/services/rest/referentiel/searchTempoStore?dateRelevant="+str(today.strftime("%Y-%m-%d")))
|
resp = http.request("GET", "https://particulier.edf.fr/services/rest/referentiel/searchTempoStore?dateRelevant="+str(today.strftime("%Y-%m-%d")))
|
||||||
if resp.status == 200:
|
if resp.status == 200:
|
||||||
@ -209,9 +208,13 @@ else:
|
|||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
#Heures creuses: 22h00 -> 06h00
|
#Heures creuses: 22h00 -> 06h00
|
||||||
|
loggerinfo("Current hour : "+str(now.hour))
|
||||||
|
|
||||||
if now.hour >= 6 and now.hour <=22:
|
if now.hour >= 6 and now.hour <=22:
|
||||||
|
loggerinfo("We are DAY")
|
||||||
daynight = 1
|
daynight = 1
|
||||||
else:
|
else:
|
||||||
|
loggerinfo("We are NIGHT")
|
||||||
daynight = 0
|
daynight = 0
|
||||||
|
|
||||||
loggerinfo("La couleur aujourd'hui "+str(curcouleur))
|
loggerinfo("La couleur aujourd'hui "+str(curcouleur))
|
||||||
|
|||||||
Reference in New Issue
Block a user