Deprecate binary sensor device class constants (#105736)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Robert Resch 2023-12-19 12:45:32 +01:00 committed by GitHub
parent c64c1c8f08
commit a4ccd6e13b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 302 additions and 33 deletions

View file

@ -0,0 +1,7 @@
"""Test deprecated binary sensor device classes."""
from homeassistant.components import binary_sensor
def import_deprecated(device_class: binary_sensor.BinarySensorDeviceClass):
"""Import deprecated device class constant."""
getattr(binary_sensor, f"DEVICE_CLASS_{device_class.name}")