COMMENT
@JOERCHA
V3 Se aΓ±ade codigo numerico y de colores a cada franja horaria, definiendo las horas mas economicas y mas caras, de 5-0 y de Verde a Negro.
TEXT
3

Text
VARIABLES
Set variable
varVer
to
Texto
URL
https://bit.ly/version_jerxa

URL
NETWORK
Get contents of
URL
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
precioluz.ver
in
Contenido de URL

Dictionary Value
NUMBER
Valor del diccionario

Number
SCRIPTING
If
NΓΊmero
is greater than
varVer
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Actualizar

Menu Result
URL
Contenido de URL

URL
SAFARI
SCRIPTING
Continuar con esta VersiΓ³n

Menu Result
SCRIPTING
End Menu

Menu Result
SCRIPTING
End If

If Result
LIST

List
VARIABLES
Set variable
varValora
to
Lista
TEXT
{"00-01":"π’π’π’π’π’π’","01-02":"π’π’π’π’π’π’","02-03":"π’π’π’π’π’π’","03-04":"π’π’π’π’π’π’","04-05":"π’π’π’π’π’π’","05-06":"π’π’π’π’π’π’","06-07":"π’π’π’π’π’π’","07-08":"π’π’π’π’π’π’","08-09":"π‘π‘π‘π‘π‘π‘","09-10":"π‘π‘π‘π‘π‘π‘","10-11":"π΄π΄π΄π΄π΄π΄","11-12":"π΄π΄π΄π΄π΄π΄","12-13":"π΄π΄π΄π΄π΄π΄","13-14":"π΄π΄π΄π΄π΄π΄","14-15":"π‘π‘π‘π‘π‘π‘","15-16":"π‘π‘π‘π‘π‘π‘","16-17":"π‘π‘π‘π‘π‘π‘","17-18":"π‘π‘π‘π‘π‘π‘","18-19":"π΄π΄π΄π΄π΄π΄","19-20":"π΄π΄π΄π΄π΄π΄","20-21":"π΄π΄π΄π΄π΄π΄","21-22":"π΄π΄π΄π΄π΄π΄","22-23":"π‘π‘π‘π‘π‘π‘","23-24":"π‘π‘π‘π‘π‘π‘"}

Text
SCRIPTING
Get dictionary from
Texto

Dictionary
VARIABLES
Set variable
varDicSem
to
Diccionario
TEXT
{"00-01":"π’π’π’π’π’π’","01-02":"π’π’π’π’π’π’","02-03":"π’π’π’π’π’π’","03-04":"π’π’π’π’π’π’","04-05":"π’π’π’π’π’π’","05-06":"π’π’π’π’π’π’","06-07":"π’π’π’π’π’π’","07-08":"π’π’π’π’π’π’","08-09":"π’π’π’π’π’π’","09-10":"π’π’π’π’π’π’","10-11":"π’π’π’π’π’π’","11-12":"π’π’π’π’π’π’","12-13":"π’π’π’π’π’π’","13-14":"π’π’π’π’π’π’","14-15":"π’π’π’π’π’π’","15-16":"π’π’π’π’π’π’","16-17":"π’π’π’π’π’π’","17-18":"π’π’π’π’π’π’","18-19":"π’π’π’π’π’π’","19-20":"π’π’π’π’π’π’","20-21":"π’π’π’π’π’π’","21-22":"π’π’π’π’π’π’","22-23":"π’π’π’π’π’π’","23-24":"π’π’π’π’π’π’"}

Text
SCRIPTING
Get dictionary from
Texto

Dictionary
VARIABLES
Set variable
varDicFin
to
Diccionario
CALENDAR
Format
Current Date
Options Under Construction

Formatted Date
NUMBER
Fecha con formato

Number
SCRIPTING
If
NΓΊmero
is greater than
20
CALENDAR
Add
1
days
from
Current Date

Adjusted Date
VARIABLES
Set variable
varFechaSol
to
Fecha ajustada
SCRIPTING
Otherwise
VARIABLES
Set variable
varFechaSol
to
Current Date
SCRIPTING
End If

If Result
TEXT
]);
var table = new google.visualization.Table(document.getElementById('table_div'));
table.draw(data, {showRowNumber: false, width: '80%', height: '75%'});
}
</script>
</head>
<body>
<div id="table_div"></div>
</body>
</html>

Text
VARIABLES
Set variable
varFinal
to
Texto
CALENDAR
Format
varFechaSol
Options Under Construction

Formatted Date
VARIABLES
Set variable
vardia
to
Fecha con formato
TEXT
lun mar miΓ© jue vie

Text
SCRIPTING
If
Texto
contains
vardia
TEXT
S

Text
VARIABLES
Set variable
varDic
to
varDicSem
SCRIPTING
Otherwise
TEXT
F

Text
VARIABLES
Set variable
varDic
to
varDicFin
SCRIPTING
End If

If Result
TEXT
9999

Text
VARIABLES
Set variable
PrecioMejor
to
Texto
TEXT
0

Text
VARIABLES
Set variable
PrecioPeor
to
Texto
URL
https://api.esios.ree.es/archives/70/download_json?locale=es&date=
varFechaSol

URL
NETWORK
Get contents of
URL
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
PVPC
in
Contenido de URL

Dictionary Value
SCRIPTING
Repeat with each item in
Valor del diccionario

Repeat Results
SCRIPTING
Get dictionary from
Repeat Item

Dictionary
TEXT
PCB

Text
MATHS
Texto
Γ·
1000.0
Options Under Construction

Calculation Result
MATHS
Round
Resultado del cΓ‘lculo
to
Hundred Thousandths

Rounded Number
VARIABLES
Add
NΓΊmero redondeado
to
PrecioTotal
VARIABLES
Set variable
PrecioH
to
NΓΊmero redondeado
TEXT
PrecioMejor

Text
SCRIPTING
If
Texto
is
0
TEXT
PrecioH

Text
VARIABLES
Set variable
PrecioMejor
to
Texto
SCRIPTING
End If

If Result
TEXT
PrecioPeor

Text
SCRIPTING
If
Texto
is
0
TEXT
PrecioH

Text
VARIABLES
Set variable
PrecioPeor
to
Texto
SCRIPTING
End If

If Result
SCRIPTING
Get
Value
for
Hora
in
varDic

Dictionary Value
TEXT
['
Valor del diccionario
PrecioH
', '
Hora
β¬'],

Text
VARIABLES
Set variable
DatosHora
to
Texto
TEXT
PrecioH

Text
SCRIPTING
If
Texto
is less than
PrecioMejor
TEXT
PrecioH

Text
VARIABLES
Set variable
PrecioMejor
to
Texto
TEXT
Hora

Text
VARIABLES
Set variable
DatosMejor
to
Texto
SCRIPTING
End If

If Result
TEXT
PrecioH

Text
SCRIPTING
If
Texto
is greater than
PrecioPeor
TEXT
PrecioH

Text
VARIABLES
Set variable
PrecioPeor
to
Texto
TEXT
Hora

Text
VARIABLES
Set variable
DatosPeor
to
Texto
SCRIPTING
End If

If Result
TEXT
DatosHora

Text
VARIABLES
Add
Texto
to
Resultado
LIST

List
SCRIPTING
End Repeat

Repeat Results
MATHS
PrecioPeor
-
PrecioMejor
Options Under Construction

Calculation Result
MATHS
Resultado del cΓ‘lculo
Γ·
5
Options Under Construction

Calculation Result
MATHS
Round
Resultado del cΓ‘lculo
to
Thousandths

Rounded Number
VARIABLES
Set variable
varPaso
to
NΓΊmero redondeado
MATHS
Calculate the
Average
of
PrecioTotal

Statistics
MATHS
Round
Average
to
Ten Thousandths

Rounded Number
VARIABLES
Set variable
PrecioMedia
to
NΓΊmero redondeado
SCRIPTING
Repeat with each item in
Resultado de la repeticiΓ³n

Repeat Results
TEXT
Match
, '([^β¬]+)
in
Repeat Item

Matches
DOCUMENTS
Replace
, '([^β¬]+)
with
$1
in
Coincidencias

Updated Text
NUMBER
Texto actualizado

Number
VARIABLES
Set variable
varACT
to
NΓΊmero