1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Pylint cleanups (#15626)

* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
This commit is contained in:
Ville Skyttä
2018-07-23 11:16:05 +03:00
committed by Paulus Schoutsen
parent a38c0d6d15
commit b7c336a687
166 changed files with 425 additions and 490 deletions

View File

@@ -214,9 +214,9 @@ def state_as_number(state):
if state.state in (STATE_ON, STATE_LOCKED, STATE_ABOVE_HORIZON,
STATE_OPEN, STATE_HOME, STATE_HEAT, STATE_COOL):
return 1
elif state.state in (STATE_OFF, STATE_UNLOCKED, STATE_UNKNOWN,
STATE_BELOW_HORIZON, STATE_CLOSED, STATE_NOT_HOME,
STATE_IDLE):
if state.state in (STATE_OFF, STATE_UNLOCKED, STATE_UNKNOWN,
STATE_BELOW_HORIZON, STATE_CLOSED, STATE_NOT_HOME,
STATE_IDLE):
return 0
return float(state.state)