I am trying to create two different Automations that seems like they should be very easy to do, but I lack the understanding of how to implement them in Home Assistant. I am using a “workaround” with many individual automations right now, but this is neither elegant nor practical…
What am I trying to do:
1 (the easy one):
I have a home Ventilation system, controlled by a 0-10V Dimmer switch. This means I can set the Ventilation from 0-100% reliably, smoothly and easily in Lovelace. I even created a “Helper” that turns the Dimmer into a Fan and that also works.
I am controlling this Dimmer based on a couple of CO2 and Humidity Sensors. Currently I use seperate Automations for 20,30,40,50,60,70 and 80% once ONE of the Sensors exceeds a certain value or if ALL of the Sensors drop below a certain threshold. This works, but it’s a whole bunch of Automations and it works in 10% Steps instead of seamlessly.
I would like to “simplfiy” this by making the “Fan” scale seamlessly up when on of the Sensors rises and seamlessly down when they all fall again based on a scale of 20-80% for the Fan and 400-1400ppm of CO2 for the Sensors.
From my Research this would mean using a “PID” integration, but what I have found on them is so far beyond my understanding that I simply don’t know where to start…
Any tips?
2 and this is the tricky one:
I want to charge my Tesla based on excess Solar energy. There are already ideas on how to do that out there and I am using one of them now, but they are very convoluted and have many points of failure since they rely on multiple Sensors.
My idea:
1 Amp of 3 Phase Charging is equal to about 700W of Power. So, once my Power Sensor reads “-700” I could start charging at 1 Amp. That’s the easy part. Now I want the process to always start with 1 Amp, then wait a Minute and keep monitoring the excess. If there is still at least “-700W” of Power available, then it should add another Amp, going to 2 Amps…and so on. If it runs out of excess and instead sees the excess energy going about 0 then it should reverse the Process and start doing “-1” to the Amps until it either reaches 0 (at which Point the Charging is done) or slips below 0 again where it then waits for more or less Power to appear.
My main trouble with this is, that I can’t figure out how to do the “±1” on top of an existing value. I can set the Amps to whatever I want, but I can’t figure out how to “increase” or “decrease” a value…
Thank you. I will try to implement this and report back if it works as expected…
One thing I can see right off the bat is, that I will have to find a new way to make it work with my sensors, because I work with three Sensors (one for each floor) and I need the Automation to always trigger based on the highest of those, which is not always the same one. For now I will base it on the “Lounge” sensor and learn from there.
So…looks like the calculation works perfectly, but for some reason my flush dimmer which is recognised as a fan is not playing nice with this… working on that now…
Edit:
Ok then…got it working for one sensor…will work on adding the others later or in the next days.
I had to go back to using the “light” domain for the flush dimmer because…well…whatever. But it works on the same logic, so no problem. I can’t thank you enough for this, since it makes a long list of convoluted Automations into one simple and compact solution. I will have to see how well it behaves in “real life conditions” but right now everything is looking great.
Yep…was easier than expected with the Min/Max integration.