Page 1 of 1
Change between on/off verison of custom icon for text device
Posted: Saturday 08 October 2022 20:06
by calania
Hello! I have a text device that has a custom icon. The icon has a on/off version like any icon for a switch. I am wondering if it is possible for me, by json request, change between the on and off version of the icon. I have tried the customimage command but couldn't get it working. Does anybody know if this is possible.
Re: Change between on/off verison of custom icon for text device
Posted: Sunday 09 October 2022 21:34
by FireWizard
Hello @calania,
Yes, I believe it is possible, but not the way you want it.
I assume you have created the ZIP file, that contains the files as described in the WIKI.
See:
https://www.domoticz.com/wiki/Custom_ic ... binterface
A "TEXT" device is not a device that you can switch "On" or "Off".
You can send text to it and you can send a command to show the icon
If you create two ZIP files, 1 with the "On" icon and the other with the "Off" icon, you can send a command to display the icon:
Code: Select all
url + "/json.htm?type=setused&used=true&name=Example&idx=497&switchtype=0&customimage=118";
Check your index number of your custom image.
See my post at
viewtopic.php?p=290471&hilit=custom+icons+index#p290471
I hope this will help you.
Regards
Re: Change between on/off verison of custom icon for text device
Posted: Monday 10 October 2022 15:08
by calania
Awesome, that solved it for me! Thanks
