Simplify esphome#22868
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
36aa79c to
7cc3dd0
Compare
Member
|
Can you rebase so we can merge? |
balloob
approved these changes
Apr 15, 2019
# Conflicts: # homeassistant/components/esphome/climate.py
Member
Author
|
It appears like codecov doesn't like merge commits - manual output checking reveals the coverage has actually not changed at all. (Probably codecov is just not calculating the merge base correctly). Still ok to merge @balloob ? btw, can we disable codecov comments please? They are just so spammy and take up so much space in the comments. Plus I don't see any added value over just a simple CI check in the "merge" box at the bottom of the PR. Even g suite (correctly) moves these e-mails in the spam folder automatically :D |
Member
|
Yeah, probably better to disable them. Don't think many people are looking at them. |
Member
|
Want to open a PR for that? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Merge #22859 first - see 94f8c4f for changes made for this PR
Simplify the esphome integration code by refactoring common patterns into decorators.
esphome_state_property- Wrap a state property (that accessesself._state) by checking for None state and NAN values.esphome_map_enum- Cleans up some code in FAN/CLIMATE where enums need to be converted between HA str and esphome int representation. Prevents declaring the same constants twice each time.Also adds some more type hints in places.
Checklist:
tox. Your PR cannot be merged unless tests pass