Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

fix: set temperature_unit in climate discovery #731 #732

Merged
merged 2 commits into from Sep 17, 2020
Merged

Conversation

robertsLando
Copy link
Member

@chilicheech Check out this please

@robertsLando robertsLando linked an issue Sep 17, 2020 that may be closed by this pull request
@robertsLando robertsLando linked an issue Sep 17, 2020 that may be closed by this pull request
@chilicheech
Copy link
Contributor

Ah, yes, this looks good. I forgot that we have the unit field that we can use. That's why I was thinking of using 49-1-256, but you're right, not every device has that.

Code looks good. I'm gonna test it on my setup. I'll do it as soon as I can. But don't wait for me to merge this.

@robertsLando robertsLando merged commit d6710fd into master Sep 17, 2020
@robertsLando robertsLando deleted the fix#731 branch September 17, 2020 16:02
@chilicheech
Copy link
Contributor

bah.. spoke too soon:

z2m     |   z2m:Gateway Error while discovering device climate_thermostat of node 31: currTemp.units.contains is not a function +0ms

@chilicheech
Copy link
Contributor

In my tests I replaced contains with includes and it worked:
I replaced payload.temperature_unit = currTemp.units.contains('C') ? 'C' : 'F'
with payload.temperature_unit = currTemp.units.includes('C') ? 'C' : 'F'

@robertsLando
Copy link
Member Author

Could you send a PR? Or I will do it tomorrow, not on my laptop right now :)

@chilicheech
Copy link
Contributor

Here's the PR #733
#733
Cheers

@robertsLando
Copy link
Member Author

Thanks @chilicheech !

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

Successfully merging this pull request may close these issues.

HASS CT32 thermostat C vs F [bug] [bug] temperature unit confusion
2 participants