8000 Bugfix slider by pvizeli · Pull Request #7047 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bugfix slider #7047

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

Merged
merged 3 commits into from
Apr 11, 2017
Merged

Bugfix slider #7047

merged 3 commits into from
Apr 11, 2017

Conversation

pvizeli
Copy link
Member
@pvizeli pvizeli commented Apr 11, 2017

Description:

Fix bug after last change on slider that he can not create without Initial value or restore value.

Related issue (if applicable): fixes #7006 #7044

@pvizeli pvizeli added this to the 0.42.3 mileston 8000 e Apr 11, 2017
@mention-bot
Copy link

@pvizeli, thanks for your PR! By analyzing the history of the files in this pull request, we identified @persandstrom, @balloob and @kellerza to be potential reviewers.

@@ -175,7 +175,7 @@ def async_added_to_hass(self):
value = state and float(state.state)

# Check against False because value can be 0
if value is not False and self._minimum < value < self._maximum:
if value and self._minimum <= value <= self._maximum:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On line 175, value is set to False if there is no last state. By not checking against False explicitly we will not restore a state when it's the number 0 (hence the comment above this line).

@balloob balloob merged commit 1112586 into home-assistant:dev Apr 11, 2017
balloob pushed a commit that referenced this pull request Apr 11, 2017
* Bugfix slider

* Update input_slider.py

* Update input_slider.py
@balloob balloob mentioned this pull request Apr 21, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.42.1 input_slider fails to initialize
4 participants
0