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

Revert "Fix number entity in 2022.1.0dev" #726

Merged
merged 2 commits into from
Jan 26, 2022
Merged

Conversation

tetienne
Copy link
Collaborator

@tetienne tetienne commented Jan 26, 2022

Reverts #667

This PR was merged too soon. Plus we will have to enfore the minimum required HA version.

@iMicknl
Copy link
Owner

iMicknl commented Jan 26, 2022

Can we perhaps try to fix this based on the current HA version?

@tetienne
Copy link
Collaborator Author

We added a new property, how can we make this backward compatible?

Comment on lines +84 to +92
@property
def min_value(self) -> float:
"""Return the minimum value."""
return self.entity_description.min_value or self._attr_min_value

@property
def max_value(self) -> float:
"""Return the maximum value."""
return self.entity_description.max_value or self._attr_max_value
Copy link
Owner

Choose a reason for hiding this comment

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

I think we could check here for the HA version and otherwise just call super?

@iMicknl iMicknl merged commit a033cf2 into master Jan 26, 2022
@iMicknl iMicknl deleted the revert-667-fix/665 branch January 26, 2022 16:26
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

Successfully merging this pull request may close these issues.

2 participants