je débute dans la domoticz et je souhaite intégrer sur domoticz, 1 ou plusieurs ampoules yeelight RGB actionnable via le bouton switch de xiaomi (le ptit interrupteur carré avec le bouton rond central. j'arrive sans difficulté à allumer ou éteindre la ou les ampoules via l'interface mais avec le switch impossible. Avez-vous une idée de mon problème?
voici quelques captures d'écran de mon installation
Mes périphériques:

Mon interrupteur


Mon scénario (ce n'est pas une priorité pour e moment, je cherche avant tout à acquérir la bonne méthode pour gérer du matériel xiaomi dans domoticz):

J'ai crée comme script (fichier existant dans mon raspberry /home/pi/domoticz/scripts/lua/switch_device_lamp_salon.lua
-- chargement des modules
package.path = package.path..";/home/nico/domoticz/scripts/lua/?.lua"
require "modules"
commandArray = {}
if (devicechanged[‘switch lamp’] == ‘1 clic’ and otherdevices[‘YeeLight bd’] == ‘Off’) then
print(“Allumage ampoule coté bd”)
commandArray[‘Switch lamp’]=’Off’
commandArray[1]={[‘Yeelight bd’]=’On’}
end
if (devicechanged[‘switch lamp’] == ‘1 clicl’ and otherdevices[‘YeeLight bd’] == ‘On’) then
print(“Extinction ampoule coté bd”)
commandArray[‘switch lamp’]=’Off’
commandArray[1]={[‘YeeLight bd’]=’Off’}
end
return commandArray
Merci de votre aide