Page 1 of 1
Change icon on Selector Switch
Posted: Monday 16 May 2016 16:09
by Domange
Hu,
I think all is said...
I have a selector switch and the only icon I can have is an On/Off one...
Is it posible to have different icons dependeing on the current level ?
Thank you
Re: Change icon on Selector Switch
Posted: Sunday 19 February 2017 11:09
by keson
Hi. Did you ever get solution for your question?
Re: Change icon on Selector Switch
Posted: Wednesday 02 May 2018 12:03
by DAVIZINHO
Hello, sorry for the up,
but this is a interesting question
i have a selector switch and will be very usefull if i can design a icon for value 10, other for 20, etc.... like the temperature icon.
its is posible???
Re: Change icon on Selector Switch
Posted: Wednesday 02 May 2018 14:24
by Nautilus
No it is not possible at the moment. Some workarounds exist:
viewtopic.php?f=31&t=107#p100598 look especially into this line in the lua script:
Code: Select all
os.execute('curl -s -i -H "Accept: application/json" "http://"'..DOMO_IP..'":"'..DOMO_PORT..'"/json.htm?type=setused&idx="'..idxmoonphaseicon..'"&name=Maanfase&description=&switchtype=0&customimage="'..moonPhaseIcon..'"&devoptions=1;%20&used=true"')
So you could setup a lua script that is triggered when the level changes and it would update the icon (already uploaded) based on the new level. But I think it require you to reload the page before it is updated, not sure though. If someone has the skills, it would of course be a nice contribution to allow custom icons for all device types and as a follow up to that, a custom icon based on the switch status, at least for selector switches
