This PR adds the ability to only refresh a specific card.
This could be used in the case where the user click on a switch, but some application logic is preventing the switch to turn on. In this case, since there is no update of the component, the yellow waiting icon stays and blinks, as reported in issue #179.
So it is possible to force update only this specific component in the callback to avoid that.
A typical use case is:
buttonCard.attachCallback([&](int value) {
if(application logic autorise the switch) {
// do something
dashboard.sendUpdates();
} else {
// switch is prevented, but the component still needs to be refreshed to clear the waiting yellow icon
dashboard.refreshCard(&buttonCard);
}
});
This PR adds the ability to only refresh a specific card.
This could be used in the case where the user click on a switch, but some application logic is preventing the switch to turn on. In this case, since there is no update of the component, the yellow waiting icon stays and blinks, as reported in issue #179.
So it is possible to force update only this specific component in the callback to avoid that.
A typical use case is: