mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use BinarySensorDeviceClass in ffmpeg (#61436)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
f1979f8b68
commit
25838e97e0
@ -3,8 +3,8 @@ import haffmpeg.sensor as ffmpeg_sensor
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_MOTION,
|
||||
PLATFORM_SCHEMA,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.components.ffmpeg import (
|
||||
@ -115,4 +115,4 @@ class FFmpegMotion(FFmpegBinarySensor):
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the class of this sensor, from DEVICE_CLASSES."""
|
||||
return DEVICE_CLASS_MOTION
|
||||
return BinarySensorDeviceClass.MOTION
|
||||
|
@ -2,7 +2,10 @@
|
||||
import haffmpeg.sensor as ffmpeg_sensor
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import DEVICE_CLASS_SOUND, PLATFORM_SCHEMA
|
||||
from homeassistant.components.binary_sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
BinarySensorDeviceClass,
|
||||
)
|
||||
from homeassistant.components.ffmpeg import (
|
||||
CONF_EXTRA_ARGUMENTS,
|
||||
CONF_INITIAL_STATE,
|
||||
@ -78,4 +81,4 @@ class FFmpegNoise(FFmpegBinarySensor):
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the class of this sensor, from DEVICE_CLASSES."""
|
||||
return DEVICE_CLASS_SOUND
|
||||
return BinarySensorDeviceClass.SOUND
|
||||
|
Loading…
x
Reference in New Issue
Block a user