Fixes
This commit is contained in:
@ -10,7 +10,7 @@ import pyprowl
|
|||||||
from datetime import date,datetime
|
from datetime import date,datetime
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
from secret import ecodevice,gx,gxsn,chgbleu,chgblanc,chgrouge,minbleu,minblanc,minrouge,prowlkey
|
from secret import ecodevice,use_eco,gx,gxsn,chgbleu,chgblanc,chgrouge,minbleu,minblanc,minrouge,prowlkey
|
||||||
|
|
||||||
# Lancer ceci du 01 Oct au 31 mai
|
# Lancer ceci du 01 Oct au 31 mai
|
||||||
# une fois avant 22h / une fois apres 22h
|
# une fois avant 22h / une fois apres 22h
|
||||||
@ -181,7 +181,7 @@ else:
|
|||||||
# Use EDF "API"
|
# Use EDF "API"
|
||||||
# TODO:
|
# TODO:
|
||||||
today=date.today()
|
today=date.today()
|
||||||
resp = http.request("GET", "https://particulier.edf.fr/services/rest/referentiel/searchTempoStore?dateRelevant="+str(date..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:
|
||||||
edfapi = json.loads(resp.data)
|
edfapi = json.loads(resp.data)
|
||||||
curcouleur = edfapi['couleurJourJ']
|
curcouleur = edfapi['couleurJourJ']
|
||||||
@ -214,8 +214,10 @@ else:
|
|||||||
else:
|
else:
|
||||||
daynight = 0
|
daynight = 0
|
||||||
|
|
||||||
|
loggerinfo("La couleur aujourd'hui "+str(curcouleur))
|
||||||
|
loggerinfo("La couleur demain "+str(demaincouleur))
|
||||||
if tomorrow == -1:
|
if tomorrow == -1:
|
||||||
loggerinfo("La couleur de demain n'est pas d<EFBFBD>finie -> exit")
|
loggerinfo("La couleur de demain n'est pas definie -> exit")
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user