This is gettig the better of me, I want it to be fast, like microcontroler fast. I had it working but still had issues with is only running when the sensor updated. I’m trying to implement a crude solar constant voltage input control as an approx to MPP. it doesn’t matter if I get voltage overshoot or undershoot but id like it to be faster than the sensor update.
I think i need the an analog read in a lamda that runs all the time?
logic is simple, if voltage is above 100v increase pwm duty, if it’s below 80v reduce it.
This is where im at with it atm it’s getting messy as im fiddling with it and getting tired.
I’ve tidied it up, now all it does on the first time it goes over the 100 it sets it to 10% duty but even if the voltage remains above 100 it doesn’t do it again, and even if it did I think it’d only do it at the update interval, what happens if i set my update interval too short ? flood wifi/ database?? seems the wront way to do it.
This gives an error “component not found: lambda”
I’m guessing I can’t use a lambda that just runs all the time it has to be inside a sensor or some othe block of yaml??
Maybe i need to read the custom sensor component?