Du coup spiwit ton script n'as pas d’intérêt. Car si tu lit une chaîne pour inscrire une autre chaîne dans une variable, autant te servir de la première chaîne direct. Et dans ce cas ça donne ça:
Blockly Teleinfo action selon "Tarif en cours"
-
landaisbenj
- Messages : 695
- Inscription : 12 mars 2017, 19:24
Re: Blockly Teleinfo action selon "Tarif en cours"
Rpbi3b: Domoticz + Homebridge + Monit + Freebox scripts + Shellinabox; Rpbi2: Jarvis
Domoticz: Derniere stable; RFLINK: Dernière stable; Xiaomi Gateway
Domoticz: Derniere stable; RFLINK: Dernière stable; Xiaomi Gateway
Re: Blockly Teleinfo action selon "Tarif en cours"
J'ai bien essayé comme tu le décris, mais ça ne fonctionne pas... Et je crois que c'est idem pour la personne qui a lancé ce post 
spiwit
@FermeQuiTweet https://twitter.com/FermeQuiTweet
Mon installation https://easydomoticz.com/forum/viewtopi ... =21&t=6452
@FermeQuiTweet https://twitter.com/FermeQuiTweet
Mon installation https://easydomoticz.com/forum/viewtopi ... =21&t=6452
-
landaisbenj
- Messages : 695
- Inscription : 12 mars 2017, 19:24
Re: Blockly Teleinfo action selon "Tarif en cours"
A mince. Je peux pas aller plus loin sans tester.
Avez vous bien utiliser le champs chaines de l'onglet variable ? Je crois qu'il y a un problème la dessus...
Avez vous essayé en lua ?
Genre:
Avez vous bien utiliser le champs chaines de l'onglet variable ? Je crois qu'il y a un problème la dessus...
Avez vous essayé en lua ?
Genre:
Code : Tout sélectionner
if otherdevices['EDF Tarif']=='(1) Heures Creuses' then
print('EDF Tarif HC')
end
Rpbi3b: Domoticz + Homebridge + Monit + Freebox scripts + Shellinabox; Rpbi2: Jarvis
Domoticz: Derniere stable; RFLINK: Dernière stable; Xiaomi Gateway
Domoticz: Derniere stable; RFLINK: Dernière stable; Xiaomi Gateway
Re: Blockly Teleinfo action selon "Tarif en cours"
Bonjour,
un petit 'UP' pour ce thread, je n'y arrive pas non plus...
Olivier
un petit 'UP' pour ce thread, je n'y arrive pas non plus...
Olivier
-
landaisbenj
- Messages : 695
- Inscription : 12 mars 2017, 19:24
Re: Blockly Teleinfo action selon "Tarif en cours"
Il faut vraiment essayer en lua !!
Rpbi3b: Domoticz + Homebridge + Monit + Freebox scripts + Shellinabox; Rpbi2: Jarvis
Domoticz: Derniere stable; RFLINK: Dernière stable; Xiaomi Gateway
Domoticz: Derniere stable; RFLINK: Dernière stable; Xiaomi Gateway
Re: Blockly Teleinfo action selon "Tarif en cours"
effectivement c'est beaucoup mieux !

merci
Code : Tout sélectionner
commandArray = {}
-- ECS OFF = 10% / ON = 20% / AUTO =30%
-- Mode AUTO - HC
if (otherdevices['Teleinfo Tarif en cours']=='(1) Heures Creuses'
and otherdevices['ECS']=='AUTO')
then
print('EDF Tarif Heures Creuses')
commandArray[1]={['Alimentation Chauffe-Eau']='On'}
-- Mode AUTO - HP
elseif (otherdevices['Teleinfo Tarif en cours']=='(2) Heures Pleines'
and otherdevices['ECS']=='AUTO')
then
print('EDF Tarif Heures Pleines')
commandArray[2]={['Alimentation Chauffe-Eau']='Off'}
-- Mode forcage - un seul cycle
-- ECS sur ON
-- Tarif bascule en HC
elseif (otherdevices['Teleinfo Tarif en cours']=='(1) Heures Creuses'
and otherdevices['ECS']=='ON')
then
print('Fin de forcage ECS - retour en mode AUTO')
commandArray[3]={['ECS']='Set Level: 30 %'}
-- Mode forcage OFF - permanent
elseif (otherdevices['ECS']=='OFF')
then
print('Forcage arrêt ECS')
commandArray[4]={['Alimentation Chauffe-Eau']='Off'}
end
return commandArray