0

I want to fully automate my Air Conditioner using Home Assistant. I have three temperature values:

  • outside temperature
  • inside temperature
  • desired temperature

I'm trying to find an algorithm that I will execute approximately every 2 hours (temp values are updated), depending on these temp values.

Something like this:

If (outside < inside) And (inside > desired) - turn AC ON

Can anyone help me, please? Thanks.

VC.One
  • 14,790
  • 4
  • 25
  • 57
  • I don't use Home Assistant (got a coding language?) but what's wrong with your logic? Did you try that `If ((outside < inside) && (inside > desired)) { AC = true; }`? – VC.One Aug 25 '20 at 20:56
  • I can make automations in Home Assistant very easily, but I want to fully automate my AC, so I need an algorithm for that. I want my AC to turn on/off based on (outside & inside & desired) temperatures. Thanks. – Hercules330121 Aug 26 '20 at 07:28
  • That `IF` statement is the algorithm... Y'know _`input X`_ (temps) gives _`output Y`_ (AC is on). If you want full code then just call it code. **(1)** So are you able to get these temps? **(2)** Does H.A do `IF / ELSE` statements? **(3)** Did you try anything and what is not working? PS: Maybe this might help you to get some ideas on coding: https://community.home-assistant.io/t/control-the-air-conditioner/121867/ – VC.One Aug 26 '20 at 09:23
  • PPS: One of the messages in that above link posted this example where at bottom (line **148** onwards) they use `IF/ELSE`... https://pastebin.com/q5MaXyMV .Maybe that will help you get started. Also [this one looks easy](https://pastebin.com/Y75VhTua). Post your code attempt and someone will help to correct it. Use the [**`EDIT`**](https://stackoverflow.com/posts/63561604/edit) option to update your Question. – VC.One Aug 26 '20 at 09:33
  • Thanks once again. – Hercules330121 Aug 26 '20 at 10:58

0 Answers0