04.08.2020, 18:01
(This post was last modified: 04.08.2020, 18:06 by Carlos Padilla.)
Hi Erwin, thanks for responding and for your help. I tried what you told me and it worked. Now, I want the same user to be the one to put the names to each subtable that will be a profile so that it can be stored and managed. I tried to use the .. to concatenate it, but it gives me a syntax error. I enclose the code to see where I am going wrong. Thank you and I will be attentive.
Code:
Nombre_modo = grp.getvalue('32/1/21')
encendido_clima = grp.getvalue('32/1/22')
temperatura_clima = grp.getvalue('32/1/23')
velocidad_clima = grp.getvalue('32/1/24')
mytable = {}
mytable...Nombre_modo = {}
mytable...Nombre_modo..encendido = encendido_clima
mytable...Nombre_modo..temperatura = temperatura_clima
mytable...Nombre_modo..velocidad = velocidad_clima
mytable.mysecondtable = {}
mytable.mysecondtable.encendido = encendido_clima
mytable.mysecondtable.temperatura = temperatura_clima
mytable.mysecondtable.velocidad = velocidad_clima
log(mytable)
resultado = storage.set('Perfiles Climas', mytable)