From aed9ab027154b0921ad3400b9297105ad9c3f379 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Wed, 20 Jul 2016 16:21:09 +0200 Subject: [PATCH] Added more binary sensor and switch classes. Ref.Pepper1 database (#2573) --- homeassistant/components/zwave.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/zwave.py b/homeassistant/components/zwave.py index f5d6e597406..ff9e9195d35 100644 --- a/homeassistant/components/zwave.py +++ b/homeassistant/components/zwave.py @@ -54,9 +54,13 @@ COMMAND_CLASS_BATTERY = 128 COMMAND_CLASS_SENSOR_ALARM = 156 GENERIC_COMMAND_CLASS_WHATEVER = None -GENERIC_COMMAND_CLASS_NOTIFICATION_SENSOR = 7 +GENERIC_COMMAND_CLASS_REMOTE_CONTROLLER = 1 +GENERIC_COMMAND_CLASS_NOTIFICATION = 7 +GENERIC_COMMAND_CLASS_REMOTE_SWITCH = 12 +GENERIC_COMMAND_CLASS_REPEATER_SLAVE = 15 GENERIC_COMMAND_CLASS_MULTILEVEL_SWITCH = 17 GENERIC_COMMAND_CLASS_BINARY_SWITCH = 16 +GENERIC_COMMAND_CLASS_WALL_CONTROLLER = 24 GENERIC_COMMAND_CLASS_ENTRY_CONTROL = 64 GENERIC_COMMAND_CLASS_BINARY_SENSOR = 32 GENERIC_COMMAND_CLASS_MULTILEVEL_SENSOR = 33 @@ -106,15 +110,31 @@ DISCOVERY_COMPONENTS = [ TYPE_BYTE, GENRE_USER), ('switch', - [GENERIC_COMMAND_CLASS_BINARY_SWITCH], + [GENERIC_COMMAND_CLASS_ALARM_SENSOR, + GENERIC_COMMAND_CLASS_BINARY_SENSOR, + GENERIC_COMMAND_CLASS_BINARY_SWITCH, + GENERIC_COMMAND_CLASS_ENTRY_CONTROL, + GENERIC_COMMAND_CLASS_MULTILEVEL_SENSOR, + GENERIC_COMMAND_CLASS_MULTILEVEL_SWITCH, + GENERIC_COMMAND_CLASS_NOTIFICATION, + GENERIC_COMMAND_CLASS_REMOTE_CONTROLLER, + GENERIC_COMMAND_CLASS_REMOTE_SWITCH, + GENERIC_COMMAND_CLASS_REPEATER_SLAVE, + GENERIC_COMMAND_CLASS_THERMOSTAT, + GENERIC_COMMAND_CLASS_WALL_CONTROLLER], [SPECIFIC_DEVICE_CLASS_WHATEVER], [COMMAND_CLASS_SWITCH_BINARY], TYPE_BOOL, GENRE_USER), ('binary_sensor', - [GENERIC_COMMAND_CLASS_BINARY_SENSOR, + [GENERIC_COMMAND_CLASS_ALARM_SENSOR, + GENERIC_COMMAND_CLASS_BINARY_SENSOR, + GENERIC_COMMAND_CLASS_BINARY_SWITCH, + GENERIC_COMMAND_CLASS_METER, GENERIC_COMMAND_CLASS_MULTILEVEL_SENSOR, - GENERIC_COMMAND_CLASS_NOTIFICATION_SENSOR], + GENERIC_COMMAND_CLASS_MULTILEVEL_SWITCH, + GENERIC_COMMAND_CLASS_NOTIFICATION, + GENERIC_COMMAND_CLASS_THERMOSTAT], [SPECIFIC_DEVICE_CLASS_WHATEVER], [COMMAND_CLASS_SENSOR_BINARY], TYPE_BOOL,