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
Change icon on Selector Switch
Moderator: leecollings
Change icon on Selector Switch
Runs fine on ODroid N2 4Gb Ubuntu 18.04 LTS except V2020.1
-
- Posts: 4
- Joined: Sunday 19 February 2017 11:07
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Czech
- Contact:
Re: Change icon on Selector Switch
Hi. Did you ever get solution for your question?
-
- Posts: 234
- Joined: Sunday 27 August 2017 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Spain
- Contact:
Re: Change icon on Selector Switch
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???
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???
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Change icon on Selector Switch
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:
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 
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"')

Who is online
Users browsing this forum: No registered users and 1 guest