RobHofmann / HomeAssistant-GreeClimateComponent

Custom Gree climate component written in Python3 for Home Assistant. Controls AC's supporting the Gree protocol.
GNU General Public License v3.0
309 stars 104 forks source link

Trying to read AC internal temperature sensor if no external sensor is specified. Include an -40 offset if necessary. #175

Closed Machaeon closed 2 months ago

RobHofmann commented 3 months ago

For me it seems to display a temperature, however it differs from the temp sensors i have in those rooms. theres a range of about 3 degrees difference between those sensors. Im not sure if the sensors are just bad or if something is not working properly.

I hope other people can confirm this PR (maybe @toughvj can check this :)).

PS. Can you update the code to the latest version currently in main? It currently has some conflicts :).

edisonbar commented 3 months ago

Its working on my Gree Clivia .Temperature readings are Ok. Update:Is it possible to have humidity readings as this unit has built in sensor?

toughvj commented 3 months ago

this will work, but only on devices that have a built-in temperature sensor. If a device does not have such a sensor, the component will throw an error and will not even start. This change is on my to-do list but I still have mixed feelings about it. In most cases, the temperature is read from the remote control, so it does not always show the actual temperature in the room. For now, I propose to hold off on this PR. Next week I will publish a change that will probably include this functionality and will not cause a crash on units without a temperature sensor.

Machaeon commented 3 months ago

@toughvj, could you please describe which line of code will generate the error if the AC does not have an internal sensor?

toughvj commented 3 months ago

If unit does not have temperature sensor, reading TemSen will return no value and GreeGetValues() will throw index out range error.

janmashat commented 3 months ago

Works like a charm! (any way to get back the on/off controls without going through the 3 dots?)

Screenshot 2024-06-19 at 16 23 27
Machaeon commented 3 months ago

If unit does not have temperature sensor, reading TemSen will return no value and GreeGetValues() will throw index out range error.

@toughvj, I can fix it. Do it or wait for your PR?

any way to get back the on/off controls without going through the 3 dots?

@janmashat, I'm not quite sure what you mean by that. can you explain more?

toughvj commented 3 months ago

@Machaeon please wait for my PR since I want to rebuild SyncState() to allow any further changes with new functionality.

@janmashat U should edit climate card properties and add HVAC model function from gui.

janmashat commented 3 months ago

Yep, adding the following to my ui-lovelace.yaml did the trick, thanks!

        features:
          - type: climate-hvac-modes
            hvac_modes:
              - heat
              - cool
              - dry
              - fan_only
              - 'off'
Screenshot 2024-06-20 at 10 43 23
RobHofmann commented 3 months ago

@toughvj can you find something of this PR? :)

toughvj commented 3 months ago

@RobHofmann sure thing but do you mean the temperature reading or the one @janmashat mentioned?

RobHofmann commented 3 months ago

@RobHofmann sure thing but do you mean the temperature reading or the one @janmashat mentioned?

The original PR :). It would be nice to add this feature.

toughvj commented 3 months ago

im working on it ;)

toughvj commented 3 months ago

@RobHofmann. please try attached file. Component gets current temperature from built-in sensor only when external temp_sensor entity id is NOT set in config.yaml It also contain support for light sensor (various devices). Please let me know if it is ok climate.txt

RobHofmann commented 3 months ago

Works like a charm. Can you turn that last version into a PR?

jodewee commented 3 months ago

i can confirm that this also works on the bulex/vaillant/saunier duval vivair series. nice work!

toughvj commented 3 months ago

good news ;) I'm still waiting for @red to test the light sensor feature, if everything is OK, I'll do PR.

toughvj commented 2 months ago

@RobHofmann this can be rejected because of #188