Hi,
I have an idea for a fairly complicated automation, and I don’t know how to get started. So I thought, let’s ask around, maybe someone else has solved a similar problem already.
Here’s what I have in mind:
- I have a dishwasher that is “smart”, i.e. it has a WiFi connection and I have integrated it in HA with help of a custom HACS integration. (Open Source community FTW!)
- I have dynamic electricity pricing, the price is different every hour. I know the prices for the next day at least at noon. I have the prices available in HA already.
- I have a template that calculates the cheapest block of n consecutive hours before a given end time.
- I usually turn on my dishwasher when I go to sleep, I want it to be ready when I wake up, and use the cheapest hours to run.
- The dishwasher has a button to put it in the “start with app” state. It then waits for a signal to start, the signal can be given from the app. I’ve also already tested that this can be done from HA.
So, what I need is an automation that gets triggered by the dishwasher coming online and in the “wait for app” state. Then it should see what the expected duration is for the selected program. With that, it should calculate the best moment to start the program, given the prices for the night hours. When calculated, it should of course also trigger the dishwasher to start.
Let me know if you have solved a similar problem and how you did that. Partial answers are also appreciated! I’ll keep thinking and fiddling myself too, of course. I’ll post a follow up when I have figured it out.