feat(cmd): auto-convert electric current intensity (mA/A)#3374
Closed
zoic21 wants to merge 1 commit into
Closed
Conversation
Add a unit conversion entry for electric current so that values expressed in mA are automatically scaled to A by autoValueArray(), matching the existing behaviour for power, energy, frequency, etc. Closes #2429
Mips2648
reviewed
Jun 15, 2026
Mips2648
left a comment
Collaborator
There was a problem hiding this comment.
Est-ce vraiment pertinent (je pose juste la question) de le faire dans ce sens?
l'unité de "base" c'est l'ampère ("A"), miliampère c'est un préfix
Contributor
|
Oui je suis d'accord @Mips2648, après coup j'ai aussi un doute sur le véritable intérêt de cette issue. De mémoire je l'avais ouverte suite à des retours sur le forum concernant les conversions automatiques mais j'ai peut être mal compris ou trop extrapolé. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Ajoute la conversion automatique d'unité pour l'intensité électrique : une valeur exprimée en
mAest désormais mise à l'échelle enAparcmd::autoValueArray(), comme c'est déjà le cas pour la puissance (W), l'énergie (Wh), la fréquence (Hz), etc.Détail
Nouvelle entrée dans la table
$_unite_conversiondecore/class/cmd.class.php:Le facteur
1000et la liste d'unités suivent exactement le format existant. Exemple de rendu :1500 mA→1.5 A.Format retenu conformément à la discussion de l'issue (
'mA' => array(1000, 'mA', 'A')) ;kAvolontairement écarté car peu usuel en domotique.Closes #2429