Change between on/off verison of custom icon for text device

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
calania
Posts: 20
Joined: Friday 17 April 2020 21:02
Target OS: Windows
Domoticz version:
Contact:

Change between on/off verison of custom icon for text device

Post 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.
User avatar
FireWizard
Posts: 1905
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Change between on/off verison of custom icon for text device

Post 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
calania
Posts: 20
Joined: Friday 17 April 2020 21:02
Target OS: Windows
Domoticz version:
Contact:

Re: Change between on/off verison of custom icon for text device

Post by calania »

Awesome, that solved it for me! Thanks 😊
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest