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

[gree] Not all GREE models support currentTemperature #8452

Closed
markus7017 opened this issue Sep 11, 2020 · 2 comments · Fixed by #8472
Closed

[gree] Not all GREE models support currentTemperature #8452

markus7017 opened this issue Sep 11, 2020 · 2 comments · Fixed by #8472
Assignees
Labels
enhancement An enhancement or new feature for an existing add-on work in progress A PR that is not yet ready to be merged

Comments

@markus7017
Copy link
Contributor

@taboneclayton I tried the new build with the merged PR and current temp is reported with -40°C
Bildschirmfoto 2020-09-11 um 11 33 12

I verified with the debugger that the device returns current temp = 0.0. Therefore you should change updateCurrentTemp to provide NaN in this case:

  private @Nullable State updateCurrentTemp() throws GreeException {
        if (device.hasStatusValChanged(GREE_PROP_CURRENT_TEMP_SENSOR)) {
            double temp = device.getIntStatusVal(GREE_PROP_CURRENT_TEMP_SENSOR);
            return temp != 0 ? new DecimalType(temp + INTERNAL_TEMP_SENSOR_OFFSET + config.currentTemperatureOffset.doubleValue()) : UnDefType.UNDEF;
        }
        return null;
    }

The channel description in the README should outline the fact that this channel is not supported for all device types

@markus7017 markus7017 added the enhancement An enhancement or new feature for an existing add-on label Sep 11, 2020
@taboneclayton
Copy link

Thanks for testing and reporting. Will work on the suggested fix and documentation changes.

@markus7017 markus7017 self-assigned this Sep 11, 2020
@markus7017 markus7017 added the work in progress A PR that is not yet ready to be merged label Sep 11, 2020
@markus7017
Copy link
Contributor Author

@taboneclayton fyi: I'm already working on this issue as part of a new PR including improved timeout handling (when UDP packets gets lost)

@markus7017 markus7017 linked a pull request Sep 15, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on work in progress A PR that is not yet ready to be merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants