I have solar panels in Australia with no battery and no space to install batteries. I have a reverse cycle air conditioner running Airtouch 5 connected to home Assistant.
Here it costs up to 50 cents/kwh to use electricity and we get paid 5c/kwh for solar we send back to the grid. Therefore it makes sense to use as much of the soil as possible without going over.
To do that I have tried to create a system that varies air conditioning power according to how much solar we have.
The highest power usage items in our home would be:
- Air con, up to 5kw
- Microwave 1kw
- Oven 2kw
- Kettle 1kw (2min)
- Dishwasher 2kw (2x spikes about 5min)
here is what I have set up so far, and hope you can help me with advice and improvements:
Power Generation
I have power from the inverter and from solar analytics which is delayed:
sometimes one or the other is not available so I have an item Power Generation which takes the first value and if it’s not available takes the 2nd value.
Power consumption

I created a statistic to take 7 minute mean so it gets rid spikes caused by cloud cover
Temperature controls
I have some helpers to run everything
To help me find hottest and coolest zone in summer and winter for example
Auto AC Low Zone Temp
{% set zones = [
'kids_zone',
'living_zone',
'master_zone',
'office_zone',
'play_zone'
] %}
{% set ns = namespace(temps=[]) %}
{% for zone in zones %}
{% set status = states('climate.' ~ zone) %}
{% set temp = states('sensor.' ~ zone ~ '_temperature') %}
{% if status != 'off' and temp not in ['unknown', 'unavailable'] %}
{% set ns.temps = ns.temps + [temp | float(99)] %}
{% endif %}
{% endfor %}
{{ ns.temps | min if ns.temps else 'unknown' }}
Auto AC Generation Offset
this tries to guess how hard I can run the air con depending on how much solar I’m generating
{# How much change in temp based on solar generation #}
{% set solar = states('sensor.power_generation_trend_mean_7min')|float(0) %}
{{ 2.4 if solar > 3800 else 1.8 if solar > 3000 else 1.3 if solar > 2000 else 0.1 }}
it works OK but it’s not ideal
Auto AC Consumption Offset
this tries to work out if I’m running something else like the oven
{# Reduce usage if consumption already above generation #}
{% set generation = states('sensor.power_generation')|float(default=0) %}
{% set consumption = states('sensor.sa_consumption_power')|float(default=0) %}
{% if states('sensor.power_generation') not in ['unknown', 'unavailable', 'none', 'nan']
and states('sensor.sa_consumption_power') not in ['unknown', 'unavailable', 'none', 'nan']
and generation != 0 and consumption != 0 %}
{% if consumption >= generation %}
-0.5
{% else %}
0
{% endif %}
{% else %}
0
{% endif %}
Auto AC Manual Offset
this is just a number on my dashboard I can quickly adjust the overall temp
Auto AC Manual Target Temperature
this is a number on the dashboard For example in summer I set the lowest temperature I would want
this is all brought together using
Auto AC Cooling Target Temperature
{% set solar = states('sensor.power_generation_trend_mean_7min')|float(0) %}
{% set base_temp = states('sensor.auto_ac_high_zone_temp')|float %}
{% set target_temp = states('input_number.auto_ac_target_temperature')|float %}
{% set consumption_offset = states('sensor.auto_ac_consumption_offset')|float %}
{% set manual_offset = states('input_number.auto_ac_manual_offset')|float(0) %}
{# How much change in temp based on solar generation #}
{% set generation_offset = 2 if solar > 3800 else 1.5 if solar > 3000 else 1 if solar > 2000 else 0.1 %}
{# Do not go below the user target temperature #}
{% set new_temp = [base_temp - generation_offset - consumption_offset + manual_offset, target_temp] | max %}
{# Ensure not above 25 #}
{{ [new_temp, 25] | min }}
initially I used Auto AC Generation Offset in there, but I found that cooling seems to use more power than heating.
I’m not really sure whether I should use an external helper or just put it in the code
Dashboard
now I have target temperature based All the variables I’ve factored in
I have an automation that checks every three minutes and sets the air temp if it’s not already set
airtouch does not like small changes in temperature so I have to one degree away And then set it back.
the result is that my usage in blue tries to stay below generation in orange
that’s the best I’ve been able to do but because I don’t actually know the power usage of the it’s a bit of a guess
would love any suggestions to help me refine
I use three phase power so I can’t use the device that clips onto the air conditioner compressor power which is one phase




