This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Thermostat
#17
Hello, I have a question.
I have a custom thermostat widget, and using this code I can change its color depending on the state (heating/cooling). However, I use the same custom widget for different thermostats and replace the group addresses.
The problem is that the other thermostat depends on a different state address of (heating/cooling), and I’m not sure how to handle this properly with the same widget.
Do you have any solution or suggestion for this?
Code:
Visu.on('widget-ready', 894, ({ widget }) =>
  { const el = widget.getEl()
  if (el) { const fg = el.querySelector('.circularslider-fg')
  widget.listen('1/4/8', (value) =>
  { fg.style.setProperty('--visu-widget-active-color', value ? 'rgb(255, 0, 0)' : 'rgb(0, 0, 255)') }) } })
Reply


Messages In This Thread
Thermostat - by Tanish Gill - 26.01.2026, 08:48
RE: Thermostat - by admin - 26.01.2026, 08:53
RE: Thermostat - by Tanish Gill - 26.01.2026, 11:29
RE: Thermostat - by admin - 26.01.2026, 11:32
RE: Thermostat - by Tanish Gill - 26.01.2026, 12:01
RE: Thermostat - by admin - 26.01.2026, 13:22
RE: Thermostat - by Tanish Gill - 27.01.2026, 11:37
RE: Thermostat - by admin - 27.01.2026, 13:17
RE: Thermostat - by admin - 29.01.2026, 10:41
RE: Thermostat - by Tanish Gill - 10.02.2026, 09:07
RE: Thermostat - by stianj - 02.02.2026, 13:37
RE: Thermostat - by admin - 02.02.2026, 14:15
RE: Thermostat - by stianj - 02.02.2026, 14:19
RE: Thermostat - by admin - 03.02.2026, 07:49
RE: Thermostat - by stianj - 03.02.2026, 09:19
RE: Thermostat - by admin - 03.02.2026, 09:22
RE: Thermostat - by stianj - 03.02.2026, 11:30
RE: Thermostat - by Daniel - 10.02.2026, 09:15
RE: Thermostat - by admin - 10.02.2026, 09:41

Forum Jump: