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:
parent
c64c1c8f08
commit
a4ccd6e13b
5 changed files with 302 additions and 33 deletions
|
@ -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}")
|
Loading…
Add table
Add a link
Reference in a new issue