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.

Custom Air Condition Widget
#1
Hi,

As I am completly ignorant with css I would like if someone could help with a custom widget.

I want to have the top part of the Thermostat widget and botom-mode selection part of the Air Condition widget.
Fan speed selection as on Thermostat (o=off, 33=Min, 67=Mid, 100=Max) and mode (0=Auto, 1=Heating, 3=Cooling, 9=Fan, 14=Dry)

Thank you in advanve for any help.
George

 
Reply
#2
For this you will need to know JavaScript.
Link the output of this object to a virtual object and depend of the value you get write to your object. The fan speed you can set in widget parameters.
------------------------------
Ctrl+F5
Reply
#3
(24.08.2020, 07:37)Daniel. Wrote: For this you will need to know JavaScript.
Link the output of this object to a virtual object and depend of the value you get write to your object. The fan speed you can set in widget parameters.

Can you please share the script, style sheet from the thermostat widget so i can have a starting point?
Reply
#4
I'm not sure what are the values sent on output of the mode but I guess it is 0,1,2,3,4. Change it accordingly Then the script would looks like that
Code:
value = event.getvalue()

if (value == 0) then
  grp.write('1/1/1', 0)
elseif (value == 1) then
  grp.write('1/1/1', 1)
elseif (value == 2) then
  grp.write('1/1/1', 3) 
elseif (value == 3) then
  grp.write('1/1/1', 9)
elseif (value == 4) then
  grp.write('1/1/1', 13) 
end
------------------------------
Ctrl+F5
Reply
#5
(24.08.2020, 12:23)Daniel. Wrote: I'm not sure what are the values sent on output of the mode but I guess it is 0,1,2,3,4. Change it accordingly Then the script would looks like that
Code:
value = event.getvalue()

if (value == 0) then
  grp.write('1/1/1', 0)
elseif (value == 1) then
  grp.write('1/1/1', 1)
elseif (value == 2) then
  grp.write('1/1/1', 3) 
elseif (value == 3) then
  grp.write('1/1/1', 9)
elseif (value == 4) then
  grp.write('1/1/1', 13) 
end

There is no need to create another script for something that could be done native from the widget.
Reply
#6
This is not that simple as you think. I can send you the source code for this widget if you want.
------------------------------
Ctrl+F5
Reply
#7
(24.08.2020, 12:35)Daniel. Wrote: This is not that simple as you think. I can send you the source code for this widget if you want.

That would be great... after all this project is still on development so no worries if i meshed up  Cool
Reply
#8
Here you go. This widget was done by 3rd party and some of the code is hidden in common js which you can't edit.

Attached Files
.gz   se-thermostat.tar.gz (Size: 14.64 KB / Downloads: 48)
------------------------------
Ctrl+F5
Reply


Forum Jump: