Add device class update to binary sensor (#2170)

This commit is contained in:
Franck Nijhof 2021-08-17 11:44:05 +02:00 committed by GitHub
parent ebabf0e7d8
commit 8eb18995cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -48,6 +48,7 @@ from esphome.const import (
DEVICE_CLASS_SAFETY, DEVICE_CLASS_SAFETY,
DEVICE_CLASS_SMOKE, DEVICE_CLASS_SMOKE,
DEVICE_CLASS_SOUND, DEVICE_CLASS_SOUND,
DEVICE_CLASS_UPDATE,
DEVICE_CLASS_VIBRATION, DEVICE_CLASS_VIBRATION,
DEVICE_CLASS_WINDOW, DEVICE_CLASS_WINDOW,
) )
@ -79,6 +80,7 @@ DEVICE_CLASSES = [
DEVICE_CLASS_SAFETY, DEVICE_CLASS_SAFETY,
DEVICE_CLASS_SMOKE, DEVICE_CLASS_SMOKE,
DEVICE_CLASS_SOUND, DEVICE_CLASS_SOUND,
DEVICE_CLASS_UPDATE,
DEVICE_CLASS_VIBRATION, DEVICE_CLASS_VIBRATION,
DEVICE_CLASS_WINDOW, DEVICE_CLASS_WINDOW,
] ]

View file

@ -813,6 +813,7 @@ DEVICE_CLASS_PROBLEM = "problem"
DEVICE_CLASS_SAFETY = "safety" DEVICE_CLASS_SAFETY = "safety"
DEVICE_CLASS_SMOKE = "smoke" DEVICE_CLASS_SMOKE = "smoke"
DEVICE_CLASS_SOUND = "sound" DEVICE_CLASS_SOUND = "sound"
DEVICE_CLASS_UPDATE = "update"
DEVICE_CLASS_VIBRATION = "vibration" DEVICE_CLASS_VIBRATION = "vibration"
DEVICE_CLASS_WINDOW = "window" DEVICE_CLASS_WINDOW = "window"
# device classes of both binary_sensor and sensor component # device classes of both binary_sensor and sensor component