Pylint cleanups (#15626)

* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-07-23 10:16:05 +02:00
1 parent a38c0d6d15
commit b7c336a687
166 files changed
+425 -490

No files matched your search

+3 -3
View File
@@ -380,16 +380,16 @@ def _entry_message_from_state(domain, state):
return 'is away'
return 'is at {}'.format(state.state)
elif domain == 'sun':
if domain == 'sun':
if state.state == sun.STATE_ABOVE_HORIZON:
return 'has risen'
return 'has set'
elif state.state == STATE_ON:
if state.state == STATE_ON:
# Future: combine groups and its entity entries ?
return "turned on"
elif state.state == STATE_OFF:
if state.state == STATE_OFF:
return "turned off"
return "changed to {}".format(state.state)