1/ Is there a way to add infos on existing value choice:
Like object name, and maybe object value from the original value with name difference like I did for the temp color change:
$(function() {
$('.backTemp').each(function(_, el) {
var addr = $(el).data('object');
if (addr) {
grp.listen(addr, function(obj) {
var value = obj.value
, color = 'rgba(255, 65, 65, 0.5)'; // default color
//console.log(obj);
//console.log(obj.value);
var nom = obj.name;
var newNom = nom.replace('SET','CUR');
var valeur = grp.getvalue(newNom);
if (valeur > 22.0) {
color = 'rgba(255, 0, 0, 0.5)';
}
else if (valeur >= 18.0) {
color = 'rgba(250, 165, 0, 0.7)';
}
else if (valeur < 18.0) {
color = 'rgba(75, 180, 230, 0.5)';
}
$(el).css('background-color', color);
});
}
});
});
2/ Other option
I would like to generate a dynamic widget on ambiant temperature object clic, wich display setpoint choice, setpoint feedback, heat status, name of the room from object.namme or object.comment, background....
When you have 200 widget to do it would be great to overload your existing buton, or to dynamic create one (of course group adress should be with same name like room-set, room-ambiant, room-value, room-heat-state ...).
3/Last option but more pain, creat a script that generate all widget once...
Would appreciate if the first and second option is possible
4/ Last question when using cicle buton value choice (for setpoint temp for example). The arrow put value to min or max value, is there a way to only increase/decreas by step instead (like +1/ -1)
Like object name, and maybe object value from the original value with name difference like I did for the temp color change:
$(function() {
$('.backTemp').each(function(_, el) {
var addr = $(el).data('object');
if (addr) {
grp.listen(addr, function(obj) {
var value = obj.value
, color = 'rgba(255, 65, 65, 0.5)'; // default color
//console.log(obj);
//console.log(obj.value);
var nom = obj.name;
var newNom = nom.replace('SET','CUR');
var valeur = grp.getvalue(newNom);
if (valeur > 22.0) {
color = 'rgba(255, 0, 0, 0.5)';
}
else if (valeur >= 18.0) {
color = 'rgba(250, 165, 0, 0.7)';
}
else if (valeur < 18.0) {
color = 'rgba(75, 180, 230, 0.5)';
}
$(el).css('background-color', color);
});
}
});
});
2/ Other option
I would like to generate a dynamic widget on ambiant temperature object clic, wich display setpoint choice, setpoint feedback, heat status, name of the room from object.namme or object.comment, background....
When you have 200 widget to do it would be great to overload your existing buton, or to dynamic create one (of course group adress should be with same name like room-set, room-ambiant, room-value, room-heat-state ...).
3/Last option but more pain, creat a script that generate all widget once...
Would appreciate if the first and second option is possible
4/ Last question when using cicle buton value choice (for setpoint temp for example). The arrow put value to min or max value, is there a way to only increase/decreas by step instead (like +1/ -1)
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT