I am working first time with ESP32 in HA. I have problem which I am not able to solve.
I have following application. I have valve with two coils ( open / close ) and two sensors ( opened / closed ). I used template for valve, but in template is expecting only one sensor for monitoring of position. If sensor has value 1 then it’s open and if value is zero then is expected that is closed. In my case zero value for sensor don’t mean that valve is closed because it can be in middle position. can somebody help me hot to modify valve template for two sensors evaluation? I tried to add some code in lambda, but template is not changed.
in reality it is small DC motor, which rotate shaft and opening or closing water valve It is continuous regulation. These two coils are two relays for changing of polarity on the DC motor
I have DC motor connected with clutch to the valve. ( I am sorry, I don’t have picture ). On the wheel connected on the shaft I have two sensors. If you are rotating to the right you are closing valve and when it’s closed then one of sensor is on. If you are rotating to the left, then valse is opening and when is completely open second sensor is on. I will try to draw some picture.