Bonjour à tous
J’ai un simple widget d’info qui ne se met pas à jour sur la dashboard quand la valeur change, il faut que je face un F5 pour que l’affichage se mette à jour
vous voyez un problème dans le code ?
<div style="padding:1px; min-width:110px; min-height:30px;" class="cmd #history# container-fluid tooltips cmd-widget" data-type="info" data-version="#version#" data-eqLogic_id="#eqLogic_id#" data-subtype="numeric" data-cmd_id="#id#" data-cmd_uid="#uid#">
<center>
<span class="cmdName" style="font-weight: bold;font-size : 10px; #hideCmdName#">#name_display#</span>
<span class='label label-capsule'>#state# #unite#</span>
</center>
<style>
.label-capsule {
background-color: rgba(27, 31, 43,1)!important;
border-radius:1em;
color:white;
font-size: 80%;
padding-left:6px;
padding-top:1px;
width:105px;
display:inline-block;
border-style: solid;
border-color: rgb(252, 252, 253);
border-width: 2px;
height:20px;
}
</style>
<script>
jeedom.cmd.update['#id#'] = function(_options){
$('.cmd[data-cmd_uid=#uid#] .label-info').html(_options.display_value+' #unite#');
$('.cmd[data-cmd_id=#id#]').attr('title','Valeur du '+_options.valueDate+', collectée le '+_options.collectDate);
}
jeedom.cmd.update['#id#']({display_value:'#state#',valueDate:'#valueDate#',collectDate:'#collectDate#',alertLevel:'#alertLevel#'});
</script>
</div>
merci