-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
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
Ajout prod compteur linky #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, merci pour ta PR !
Je n'ai pas eu le temps de tout lire car je suis en déplacement mais j'ai déjà laissé quelques premiers commentaires
src/config.ts
Outdated
prm: string; | ||
token: string; | ||
name: string; | ||
action: 'yes' | 'non'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas de mélange français anglais stp
src/index.ts
Outdated
|
||
const isSyncingNeeded = dayjs(lastStatistic.start).isBefore(dayjs().subtract(2, 'days')) && dayjs().hour() >= 6; | ||
if (!isSyncingNeeded) { | ||
let isSyncingNeeded1 = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas fou comme nom de variable
Bonsoir, "je vous ai compris " ;) les modifications demandées sont disponible dans mon dernier PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci encore pour tes changements, mais y'a pas mal de points qui m'embêtent, désolé pour les allers-retours je suis assez pris en ce moment je n'ai pas pu tout voir au premier passage
Bonsoir, "je vous ai compris " ;)
Si c'est une allusion à Charles de Gaulle, je suis pas sûr d'avoir compris ce que ça vient faire là 🤷
const firstDay = dayjs(lastStatisticP.start).add(1, 'day'); | ||
const energyData = await productionClient.getEnergyData(firstDay, true); | ||
incrementSums(energyData, lastStatisticP.sum); | ||
await haClient.saveStatistics(userConfig.production.prm + 'p', userConfig.production.name, energyData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense que ce serait plus clean d'ajouter un paramètre "isProd" dans les fonctions de "haClient".
Dans le cas de la production, on pourrait remplacer l'id linky:12345
par linky_production:12345
ou un truc du genre
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je l'avais créé dans ma première version mais pas vraiment d'intêret
history.unshift(LinkyClient.formatLoadCurve(loadCurve)); | ||
debug(`Successfully retrieved load curve from ${from} to ${to}`); | ||
offset += interval; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dommage de tout dupliquer au lieu de factoriser
Idem pour la fonction sync où tout est écrit en double
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je ne connais pas assez HA, donc n'hésite pas à modifier
Co-authored-by: Boris K <[email protected]>
Co-authored-by: Boris K <[email protected]>
Merci pour toutes ces modifications ! J'essaie de libérer un peu de temps dans les semaines à venir pour faire quelques tests et modifications mais je ne te promets rien 🤞 |
En tout cas c'est fonctionnel chez moi
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je décommente l'image pour vérifier que ça builde bien dans la CI
@cddu33 C'est bon, j'ai mergé ce matin + ajouté quelques améliorations et pas mal de refactorisation (cf #11) 🥳 Je vais faire une release dans la journée. Est-ce que c'est toi cet utilisateur sur HACF ? |
Yep |
Super, je ferai également une annonce car beaucoup de personnes attendent cette fonctionnalité. Merci encore pour ton aide ! |
Ajout de la récupération des données de productions du compteur linky
Modification des intitulés prm pour prod et conso
Modification de es intitulés token pour prod et conso
Rajout d'un oui/non pour activer les données de protuction ou non