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.
Hi,
based on the new sensor module "yfs201" I created a more flexible module, which will work with almost all flow rate sensors. These sensors create a pulse frequency, which can be calculated into a flow rate by a formula (factor).
While the yfs201 module has a fixed factor of "7", the factor of this module is configurable in the config.
From YF-S201 manual:
Pulse Characteristic: F = 7 * Q (L/MIN).
Pulse frequency (Hz) / 7.0 = flow rate in L/min
==> Factor = 7.0
From YF-DN50 manual:
Pulse Characteristic: F = 0.2 * Q (L/MIN).
Pulse frequency (Hz) / 0.2 = flow rate in L/min
==> Factor = 0.2
Example config for YF-S201:
If you have a more complex formula, you can use "1" as factor. You will get the frequency in Hertz (Hz) this way and the real flowrate can be calculated by another software/system/whatever.