fonske / clack-reader-v3

Esphome component for Clack WS1 softener with TOF sensor saltlevel detection
8 stars 6 forks source link

Allow to specify pulse_liters #10

Closed krasnoukhov closed 9 months ago

krasnoukhov commented 9 months ago

Hi @fonske, thanks for shipping me the gear! Proposing this change to make pulse_liters customizable since my clack is set up to give a pulse every 1 liter. Does this make sense?

kalpik commented 9 months ago

Hi! Thanks for this. Have you tested it though? Last time I tried, substitutions weren't available from within lambda, and I'd have to use a global.

krasnoukhov commented 9 months ago

I did test it, it's working for me. Substitution required a string so I had to do int in the lambda

kalpik commented 9 months ago

I did test it, it's working for me. Substitution required a string so I had to do int in the lambda

Perfect! I didn't experiment with strings indeed. Thanks again :)

fonske commented 9 months ago

I have changed the integer to float, to be able to calculate with 2.2 instead of 2

krasnoukhov commented 9 months ago

Oh that's right @fonske, sorry for that