Use DEVICE_CLASS_MOTION in various integrations (#39962)
This commit is contained in:
parent
02cb592917
commit
e55035b2f9
15 changed files with 59 additions and 31 deletions
|
@ -1,5 +1,8 @@
|
|||
"""Demo platform that has two fake binary sensors."""
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_MOTION,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
|
||||
from . import DOMAIN
|
||||
|
||||
|
@ -9,7 +12,9 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||
async_add_entities(
|
||||
[
|
||||
DemoBinarySensor("binary_1", "Basement Floor Wet", False, "moisture"),
|
||||
DemoBinarySensor("binary_2", "Movement Backyard", True, "motion"),
|
||||
DemoBinarySensor(
|
||||
"binary_2", "Movement Backyard", True, DEVICE_CLASS_MOTION
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue