Hi, I have Gree air conditioners with a heating function. I control them using the Gree Climate integration. I am not satisfied with the built-in temperature sensors. I was wondering if I could change the behavior of this integration and instead of the built-in sensors, use my own sensors that are already integrated with HA? Like “target_sensor:” in generic_thermostat ?
I wanted to do the same thing as the internal sensor is nigh useless in heating mode, but haven’t found a solution. I wonder if it can even be accomplished without modifying the firmware, which is probably impossible or at least impractical. The workaround I came up with was to make an automation and a couple of helpers to create a custom thermostat, basically. The idea is that HA turns the AC on and off and sets the temp to its min or max depending on whether the mode is heating or cooling (set using an input) and whether the temp is below/above target temp +/- hysteresis (another input). It probably has a negative impact on overall efficiency, but I hope it’s not too bad… Probably could be tuned somehow by testing what actual (external setting) temperature a given internat sensor temperature corresponds to, but I don’t think it would be very reliable. Here is my automation:
alias: AC Parter Heat/Cool
description: ""
trigger:
- platform: state
entity_id:
- sensor.ble_temperature_a4c13887fe05
- input_number.parter_ac_temperature_setpoint
- input_select.parter_ac_mode
action:
- choose:
- conditions:
- condition: template
value_template: >
{{ states('sensor.ble_temperature_a4c13887fe05')|float <
states('input_number.parter_ac_temperature_setpoint')|float - 1
}}
- condition: state
entity_id: input_select.parter_ac_mode
state: Heat
sequence:
- service: climate.set_hvac_mode
target:
entity_id: climate.1e8a1d91
data:
hvac_mode: heat
- service: climate.set_temperature
target:
entity_id: climate.1e8a1d91
data:
temperature: 30
- conditions:
- condition: template
value_template: >
{{ states('sensor.ble_temperature_a4c13887fe05')|float >
states('input_number.parter_ac_temperature_setpoint')|float + 1
}}
- condition: state
entity_id: input_select.parter_ac_mode
state: Heat
sequence:
- service: climate.turn_off
target:
entity_id: climate.1e8a1d91
data: {}
- conditions:
- condition: template
value_template: >
{{ states('sensor.ble_temperature_a4c13887fe05')|float >
states('input_number.parter_ac_temperature_setpoint')|float + 1
}}
- condition: state
entity_id: input_select.parter_ac_mode
state: Cool
sequence:
- service: climate.set_hvac_mode
target:
entity_id: climate.1e8a1d91
data:
hvac_mode: cool
- service: climate.set_temperature
target:
entity_id: climate.1e8a1d91
data:
temperature: 16
- conditions:
- condition: template
value_template: >
{{ states('sensor.ble_temperature_a4c13887fe05')|float <
states('input_number.parter_ac_temperature_setpoint')|float - 1
}}
- condition: state
entity_id: input_select.parter_ac_mode
state: Cool
sequence:
- service: climate.turn_off
target:
entity_id: climate.1e8a1d91
data: {}
- conditions:
- condition: state
entity_id: input_select.parter_ac_mode
state: "Off"
sequence:
- service: climate.turn_off
target:
entity_id: climate.1e8a1d91
data: {}
And this is what it looks like in my UI:
Świetna robota Łukaszu!
I also thought about taking the control into my own hands. Additionally, I see two unused connectors on the motherboard: “Dry Contact” (I guess it allows the device to stop working when the window is open) and “Wired controller”, about which I haven’t found any information yet. I thought maybe it could be used for better control. I found charts somewhere on the Internet which showed that the factory hysteresis of such devices is 3 degrees Celsius - it’s not very comfortable, but it may be due to the specificity of this solution (the compressor needs time to start?) and maybe it has to be that way. Anyway, I’ll try to start with your automation. I’m glad you shared it here.
EDIT:
I forgot to mention: in my device, the ambient temperature sensor is located on the right side under the housing. The indoor unit can be connected to an outdoor unit on both sides. If you have a connection on the right side, it is possible that the installer did not fill the hole through which the pipes go outside with foam (like mine) and then the sensor reading will be distorted by the cold air that enters there from the outside.
In my case the problem is that the internal sensor reports very high values in heating mode. Here is a comparison of the two:
In this particular situation, it seems to be about 6C above what the external sensor is showing (granted, it is on the opposite side of the room and much lower). A wired controller would be a good solution, I think, as it would act as an external sensor, most likely. Some models can also use the remote this way, so you could hang it on the wall somewhere. It’s not really an ideal solution for me, because my units are in a cottage I’m renting and I want to have control over things like the min and max temp that can be set, which is why I implemented my crude solution. I will have to experiment a bit and see if it’ll work consistency if I tell the automation to set the AC target temp to +5/6 of the target temp selected in the UI. If that works somewhat reliably, then the unit could manage it’s operation on its own, which would probably increase efficiency a bit.
Yes, wired controllers usually have a built-in temperature sensor. You can also try to extend the cables of the indoor unit sensor to place it in a better place. The only drawback is the cables on the wall. Can your guests use a wireless remote controller, or have you installed a home assistant panel to set the temperature? Because if they use a remote control, if they click any button, all your settings from the HA are replaced with the current settings from the remote controller.
Been awhile since there was activity on this thread, but I too am looking to modify the Gree climate entity to use a different temperature sensor instead of the built in one. I have several Shelly HTs around and would love to use those. Any updates or new ideas on this?
Not sure if a solution but could you just
- Change the max temp for AC by 6C for the internal sensor so to speak so that it just doesn’t turn off by itself.
- Code external sensor
- Write automation that if External sensor temp => internal sensor then turn off AC ?
I am not there yet though, just had it turned on and muddling to write the sensor to get data to chart
Initially I want to also use external temperature, for that I would either use just temperature or consider wind and humidity. I would probably not want to run AC below 0C, and wait for Gas heater to turn on, but got to research some on the efficiency below 0C on our particular AC.
odczuwalna_temperatura_zewn:
friendly_name: "Feels Like Outside"
value_template: >
{% set temperature = state_attr('weather.forecast_dom_bb', 'temperature') %}
{% set humidity = state_attr('weather.forecast_dom_bb', 'humidity') %}
{% set windspeedmps = state_attr('weather.forecast_dom_bb', 'wind_speed') / 3.6 %}
{% set wvp = (humidity/100) * 6.105 * e**((17.27*temperature) / (237.7 + temperature))%}
{{(temperature + 0.33 * wvp - 0.70 * windspeedmps - 4.00)|round(2)}}
unit_of_measurement: "°C"
Blockquote
Hi guys, so I sort of finished what I think I want, I have 4 automations in total
2 ON and 2 OFF
1 On is regular 7:30-23:59PM
1 ON is evening heating (a 1-2C more allowed)
1 OFF is regular
1 OFF is evening automation for 1-2C higher temp allowed and max 1 PM.
Added seasons there so it should work during autumn and winter.
I had to switch to tomorrow.io for some reason to get temperature outside forecast (no outside sensor as of now).
If someone has better idea I will adjust, my thinking was (having gas heater):
- want to use AC when COP is highest so don’t want to use it well below 0C (set limit to -4C)
- usually its the coldest during the night and morning so late evening session to overheat a bit should help start after 7:30 AM
- should work in Autumn and winter if days are <17C, actually I would need to adjust it looking for highest forecast temp during the day or average rather than using temperature now to disable running on a sunny hot autumn day…
So ON looks like below:
alias: Klima_1P_przedpokoj_on
description: <17C i > -4C grzanie od 20C w górę
triggers:
- trigger: time_pattern
minutes: /5
conditions:
- condition: and
conditions:
- condition: template
value_template: >-
{{ float(state_attr('weather.tomorrow_io_dom_bb_daily', 'temperature')
or -20.00) > -4.00 }}
- condition: template
value_template: >-
{{ float(state_attr('weather.tomorrow_io_dom_bb_daily', 'temperature')
or 19.00) < 17.00 }}
- condition: time
after: "07:30:00"
before: "23:59:00"
- condition: numeric_state
entity_id: climate.502cc6b4cfaf
attribute: current_temperature
below: 21
- condition: state
entity_id: climate.502cc6b4cfaf
state: "off"
- condition: or
conditions:
- condition: state
entity_id: sensor.season
state: autumn
- condition: state
entity_id: sensor.season
state: winter
EDIT:
Even today I had some issues due to WIFI/internet provider.
Working around weather provider data to not be null if can’t be get due to connection issues. To do that likely binary sensor (not my idea just copying) and some more work to do automation for forecasts…
- platform: ping
name: Internet
host: 8.8.8.8
scan_interval: 15