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

Changed checking of cover state closed from 0 to closed_position vari… #18407

Merged
merged 1 commit into from Nov 12, 2018

Conversation

Projects
None yet
4 participants
@pszafer
Contributor

pszafer commented Nov 12, 2018

Change way of checking state of cover.
Change error message to avoid expression "get_position_topic".

Description:

Somehow didn't occured to me before that if close/open values are inverted ideally from 100-0 to 0-100 I won't calculate percentage. I deleted 'get_position_topic' text from logs as well as we named it finally just position_topic.

Anyway I think fix is pretty simple, just changed:

self._state = self._position == 0

to

self._state = self._position == self._position_closed

Getting position is working properly accorind to related issue.

**Related issue (if applicable): #18383

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
Changed checking of cover state closed from 0 to closed_position vari…
…able.

Change error message to avoid expression "get_position_topic".

@wafflebot wafflebot bot added the in progress label Nov 12, 2018

@dgomes dgomes removed the in progress label Nov 12, 2018

@dgomes dgomes added this to the 0.82.1 milestone Nov 12, 2018

@dgomes dgomes merged commit d046394 into home-assistant:dev Nov 12, 2018

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.047%
Details
@dgomes

This comment has been minimized.

Member

dgomes commented Nov 12, 2018

Thank you! 🎉

@pszafer

This comment has been minimized.

Contributor

pszafer commented Nov 13, 2018

@bruxy70 saying it's still don't working for him. I'll make extra tests after work, but for now I cannot see any other bugs. Should I make another PR in case I find something?

zxdavb added a commit to zxdavb/home-assistant that referenced this pull request Nov 13, 2018

Changed checking of cover state closed from 0 to closed_position vari…
…able. (home-assistant#18407)

Change error message to avoid expression "get_position_topic".
@dgomes

This comment has been minimized.

Member

dgomes commented Nov 13, 2018

Absolutely! You will need to make a new PR

balloob added a commit that referenced this pull request Nov 15, 2018

Changed checking of cover state closed from 0 to closed_position vari…
…able. (#18407)

Change error message to avoid expression "get_position_topic".

@balloob balloob referenced this pull request Nov 15, 2018

Merged

0.82.1 #18481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment