Can I aggregate data from one sensor to a device's state?

So I have a gree air-con climate.9424b82b08c2 with the following states:

hvac_modes:
  - auto
  - cool
  - dry
  - fan_only
  - heat
  - 'off'
min_temp: 8
max_temp: 30
target_temp_step: 1
fan_modes:
  - auto
  - low
  - medium low
  - medium
  - medium high
  - high
preset_modes:
  - eco
  - away
  - boost
  - none
  - sleep
swing_modes:
  - 'off'
  - vertical
  - horizontal
  - both
current_temperature: 8
temperature: 27
fan_mode: low
preset_mode: none
swing_mode: horizontal
friendly_name: Air Conditioner
supported_features: 57

The problem is the states are wrong.

  • min_temp should be 16 not 8
  • current_temperature is not 8.
  • it does not have vertical swing mode
  • no medium-low and medium-high fan speed

I can deal with the last 2, but I want to do sth with the temperatures.

Luckily I have another temperature sensor in the same room. The sensor has entity id sensor.miaomiaoce_t2_a10e_temperature_humidity_sensor_4, can I somehow use the temperature from that instead? It is now showing 28.2 C which is much more reasonable.

Have you tried Generic Thermostat?

You could use sensor.miaomiaoce_t2_a10e_temperature_humidity_sensor_4 as your sensor and climate.9424b82b08c2 as your “heater” entity.

Thats a aircon but hope that works! Does not realize i was dealing w/ a thermostat and got a lot of sensors aggregation results in my research

Now that I think of it, it won’t really work. The air-con is a smart air-con, and I dont want it to be switched off. It will regulate itself. I dont want the air-con to be on-and-off that often

Looking into home assistant customizing entities config section… If i never comes back that would probably solve my issue…

Ok. I have managed to pull that off with a bit of effort.

First you need to use customization to remove the wrong states and functions that it claimed to have. For example, the swing modes and minimum temperatures. This tackles 3 of the 4 issues I mentioned before. But the problem is, customizing does not support templates, so the current temperature is still wrong.

So I had to use custom-ui to pull data from another sensor. If you have HACS, just search “custom ui” in Frontend section. If not, go to their github repo for install instructions.

After tinkling around, I found the following solution:

configuration.yaml

homeassistant:                                                            
  customize: !include customize.yaml
 ...

customize.yaml

climate.bedroom_aircon:
  hvac_modes:
    - auto
    - cool
    - dry
    - fan_only
    - 'off'
  min_temp: 16
  max_temp: 30
  target_temp_step: 1
  fan_modes:
    - auto
    - low
    - medium
    - high
  preset_modes:
    - eco
    - away
    - boost
    - none
    - sleep
  swing_modes:
    - 'off'
    - horizontal
  templates:
    current_temperature: >
      var temperatureBedroom = String(Math.round(Number(entities["sensor.bedroom_temperature"].state)));
      if (temperatureBedroom > 15.9) return temperatureBedroom;
      return 15;

Obviously replacing climate.bedroom_aircon and sensor.bedroom_temperature with yout aircon’s entity ID and sensor’s entity ID respectively.

Edit: Image of final result