I make a cover with a dc motor,a hall sensor is also installed on the axis as an encoder. Opening and closing the window is 11 revolutions of the sensor, how to set up automation of triggering or how to add a variable (as in c++ (int x++)) . I imagine the work like this (
if(sensor hall=>1){
if (int hall >= 11) { cover.stop }
else{ hall++ }}
I don’t understand how to create a variable to which to add a value in yaml during the turnover
I understand that you are not interested in this or you decided to raise a turnip, but go to the forest, I need a more detailed explanation from a knowledgeable person
How to declare a global variable to use it in and OUT of lambda
how to use 2 lambda