From 2db49ebca56ec1780e670dd38797a69723dc61ca Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 27 Mar 2016 11:48:48 +0200 Subject: [PATCH] Add connectivity to sensor classes --- .../components/binary_sensor/__init__.py | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/binary_sensor/__init__.py b/homeassistant/components/binary_sensor/__init__.py index 777974905b8..0fed26bd710 100644 --- a/homeassistant/components/binary_sensor/__init__.py +++ b/homeassistant/components/binary_sensor/__init__.py @@ -17,20 +17,21 @@ SCAN_INTERVAL = 30 ENTITY_ID_FORMAT = DOMAIN + '.{}' SENSOR_CLASSES = [ - None, # Generic on/off - 'opening', # Door, window, etc - 'motion', # Motion sensor - 'gas', # CO, CO2, etc - 'smoke', # Smoke detector - 'moisture', # Specifically a wetness sensor - 'light', # Lightness threshold - 'power', # Power, over-current, etc - 'safety', # Generic on=unsafe, off=safe - 'heat', # On means hot (or too hot) - 'cold', # On means cold (or too cold) - 'moving', # On means moving, Off means stopped - 'sound', # On means sound detected, Off means no sound - 'vibration', # On means vibration detected, Off means no vibration + None, # Generic on/off + 'cold', # On means cold (or too cold) + 'connectivity', # On means connection present, Off = no connection + 'gas', # CO, CO2, etc. + 'heat', # On means hot (or too hot) + 'light', # Lightness threshold + 'moisture', # Specifically a wetness sensor + 'motion', # Motion sensor + 'moving', # On means moving, Off means stopped + 'opening', # Door, window, etc. + 'power', # Power, over-current, etc + 'safety', # Generic on=unsafe, off=safe + 'smoke', # Smoke detector + 'sound', # On means sound detected, Off means no sound + 'vibration', # On means vibration detected, Off means no vibration ] # Maps discovered services to their platforms