Some zwave cleanup (#6203)

This commit is contained in:
Andrey 2017-02-24 16:17:27 +02:00 committed by GitHub
parent 9f04b55572
commit b27ba9660b
8 changed files with 2 additions and 33 deletions

View file

@ -14,15 +14,8 @@ from homeassistant.components.zwave import async_setup_platform # noqa # pylint
_LOGGER = logging.getLogger(__name__)
# pylint: disable=unused-argument
def get_device(node, value, **kwargs):
def get_device(value, **kwargs):
"""Create zwave entity device."""
if not node.has_command_class(zwave.const.COMMAND_CLASS_SWITCH_BINARY):
return None
if value.type != zwave.const.TYPE_BOOL or value.genre != \
zwave.const.GENRE_USER:
return None
value.set_change_verified(False)
return ZwaveSwitch(value)