Skip to content

Conversation

bernard-dandrea
Copy link

Description

La commande Refresh demande une mise à jour à Z2M pour toutes les commandes info à l'exception de 'linkquality' et 'last_seen' (voir fonction refreshValue())

Dans le cas où il n'y a pas de converter défini dans Z2M pour le device concerné, on reçoit une erreur par exemple :

2025-02-02 17:17:11z2m: No converter available for 'battery' ("")

A priori, il n'y a pas de moyen de savoir si il y a un converter ou pas pour une commande donnée.

Le PR permet d'indiquer pour chaque commande info si il y a converter ou pas; en fonction de cet indicateur, la fonction refreshValue() fera une demande de récupération de la donnée à Z2M ou pas.

Suggested changelog entry

  • Modification de z2m.js afin d'ajouter l'indicateur noConverter pour les commandes de type info
  • Modification dans z2m.class.php de la fonction refreshValue afin de ne pas demander la mise à jour des champs pour lesquels l'indicateur noConverter est activé

Related issues/external references

Fixes #

Types of changes

  • Bug fix (non-breaking change which fixes)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

  • I have checked there is no other PR open for the same change.
  • I have read the Contribution Guidelines.
  • I grant the project the right to include and distribute the code under the GNU.
  • I have added tests to cover my changes.
  • I have verified that the code complies with the projects coding standards.
  • [Required for new sniffs] I have added MD documentation for the sniff.

Dans la fonction Refresh, si l'option No Converter est activée, on ne demande pas le rafraichissement du champ concerné
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant