mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Additional device classes for binary sensors (#11280)
* Add additional device classes for binary sensor
This commit is contained in:
parent
fc3a8e4e79
commit
b2e9dc5c8f
@ -21,24 +21,27 @@ SCAN_INTERVAL = timedelta(seconds=30)
|
|||||||
ENTITY_ID_FORMAT = DOMAIN + '.{}'
|
ENTITY_ID_FORMAT = DOMAIN + '.{}'
|
||||||
DEVICE_CLASSES = [
|
DEVICE_CLASSES = [
|
||||||
'battery', # On means low, Off means normal
|
'battery', # On means low, Off means normal
|
||||||
'cold', # On means cold (or too cold)
|
'cold', # On means cold, Off means normal
|
||||||
'connectivity', # On means connection present, Off = no connection
|
'connectivity', # On means connected, Off means disconnected
|
||||||
'gas', # CO, CO2, etc.
|
'door', # On means open, Off means closed
|
||||||
'heat', # On means hot (or too hot)
|
'garage_door', # On means open, Off means closed
|
||||||
'light', # Lightness threshold
|
'gas', # On means gas detected, Off means no gas (clear)
|
||||||
'moisture', # Specifically a wetness sensor
|
'heat', # On means hot, Off means normal
|
||||||
'motion', # Motion sensor
|
'light', # On means light detected, Off means no light
|
||||||
'moving', # On means moving, Off means stopped
|
'moisture', # On means wet, Off means dry
|
||||||
'occupancy', # On means occupied, Off means not occupied
|
'motion', # On means motion detected, Off means no motion (clear)
|
||||||
'opening', # Door, window, etc.
|
'moving', # On means moving, Off means not moving (stopped)
|
||||||
|
'occupancy', # On means occupied, Off means not occupied (clear)
|
||||||
|
'opening', # On means open, Off means closed
|
||||||
'plug', # On means plugged in, Off means unplugged
|
'plug', # On means plugged in, Off means unplugged
|
||||||
'power', # Power, over-current, etc
|
'power', # On means power detected, Off means no power
|
||||||
'presence', # On means home, Off means away
|
'presence', # On means home, Off means away
|
||||||
'problem', # On means there is a problem, Off means the status is OK
|
'problem', # On means problem detected, Off means no problem (OK)
|
||||||
'safety', # Generic on=unsafe, off=safe
|
'safety', # On means unsafe, Off means safe
|
||||||
'smoke', # Smoke detector
|
'smoke', # On means smoke detected, Off means no smoke (clear)
|
||||||
'sound', # On means sound detected, Off means no sound
|
'sound', # On means sound detected, Off means no sound (clear)
|
||||||
'vibration', # On means vibration detected, Off means no vibration
|
'vibration', # On means vibration detected, Off means no vibration
|
||||||
|
'window', # On means open, Off means closed
|
||||||
]
|
]
|
||||||
|
|
||||||
DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.In(DEVICE_CLASSES))
|
DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.In(DEVICE_CLASSES))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user