Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to receive current temperature from HVAC #60

Open
aivus opened this issue Jun 5, 2020 · 3 comments
Open

Add ability to receive current temperature from HVAC #60

aivus opened this issue Jun 5, 2020 · 3 comments

Comments

@aivus
Copy link

aivus commented Jun 5, 2020

Hey.

I've noticed that HVAC may return current room temperature in TemSen property.

It may be backported to this project from inwaar/gree-hvac-client#11

@k8ieone
Copy link

k8ieone commented Aug 9, 2021

I was able to get the current temperature back into HASS in my fork. I just don't know how to deal with the +40 offset yet.

I tried dealing with it in the publishIfChanged function like this, but it doesn't seem to work.

const publishIfChanged = function (stateProp, newValue, mqttTopic) {
  if (newValue !== deviceState[stateProp]) {
    // I have no idea where else to subtract 40 so I just do it here
    if (mqttTopic == '/curtemperature/get') {
      deviceState[stateProp] = newValue - 40
    }
    else {
      deviceState[stateProp] = newValue
    }
    client.publish(mqttTopicPrefix + mqttTopic, newValue)
  }
}

@k8ieone
Copy link

k8ieone commented Aug 10, 2021

Ok, I've actually fixed it now, I think I can make a PR.

@k8ieone
Copy link

k8ieone commented Apr 2, 2022

I made a PR for this now #78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants