We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
Hi, This may help: https://community.jeedom.com/t/fonction-archive-de-la-class-history/75979
I personally use this code in a scenario:
$totI = 0; $totKey = 0; $totCmd = 0; $histoCmds = cmd::allHistoryCmd(); foreach ($histoCmds as $histoCmd) { if ($histoCmd->getConfiguration('historizeMode') == 'none' && ($histoCmd->getConfiguration('repeatEventManagement') == 'never' || $histoCmd->getConfiguration('repeatEventManagement') == 'auto')) { $totCmd++; $scenario->setLog($histoCmd->getId() . ' ---> ' . $histoCmd->getHumanName()); $historys = history::all($histoCmd->getId()); $i = 0; $key = 0; foreach ($historys as $key => $history) { if ($key == 0) continue; if ($history->getValue() === $historys[$key-1]->getValue() && substr($history->getDatetime(), 0, 10) === substr($historys[$key-1]->getDatetime(), 0, 10)) { //$history->remove(); // *** Uncomment me to DELETE FOR REAL *** $i++; } } $scenario->setLog("Nb d'enregistrements effacés $i, sur $key précédement"); $totI = $totI + $i; $totKey = $totKey + $key; } } $scenario->setLog("-------------------------------------------------------------------"); $scenario->setLog("Nb d'enregistrements effacés $totI, sur $totKey précédement"); $scenario->setLog("Nb de commandes historisées : $totCmd");
Bad
Sorry, something went wrong.
zoic21
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: