Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DEVICE_CLASS_DOOR and DEVICE_CLASS_SMOKE in various integrations #39950

Merged
merged 3 commits into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'dev' of https://github.com/home-assistant/core into use…
…-device-class-smoke-door
  • Loading branch information
springstan committed Sep 12, 2020
commit b7d8550275396a64a55e8098b1fa900602a178e0
1 change: 1 addition & 0 deletions homeassistant/components/concord232/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import voluptuous as vol

from homeassistant.components.binary_sensor import (
DEVICE_CLASS_SAFETY,
DEVICE_CLASS_SMOKE,
DEVICE_CLASSES,
PLATFORM_SCHEMA,
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/fibaro/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_DOOR,
DEVICE_CLASS_SMOKE,
DEVICE_CLASS_WINDOW,
DOMAIN,
BinarySensorEntity,
)
Expand All @@ -17,7 +18,7 @@
"com.fibaro.floodSensor": ["Flood", "mdi:water", "flood"],
"com.fibaro.motionSensor": ["Motion", "mdi:run", "motion"],
"com.fibaro.doorSensor": ["Door", "mdi:window-open", DEVICE_CLASS_DOOR],
"com.fibaro.windowSensor": ["Window", "mdi:window-open", "window"],
"com.fibaro.windowSensor": ["Window", "mdi:window-open", DEVICE_CLASS_WINDOW],
"com.fibaro.smokeSensor": ["Smoke", "mdi:smoking", DEVICE_CLASS_SMOKE],
"com.fibaro.FGMS001": ["Motion", "mdi:run", "motion"],
"com.fibaro.heatDetector": ["Heat", "mdi:fire", "heat"],
Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/notion/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_DOOR,
DEVICE_CLASS_SMOKE,
DEVICE_CLASS_WINDOW,
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
Expand Down Expand Up @@ -37,8 +38,8 @@
SENSOR_SAFE: ("Safe", DEVICE_CLASS_DOOR),
SENSOR_SLIDING: ("Sliding Door/Window", DEVICE_CLASS_DOOR),
SENSOR_SMOKE_CO: ("Smoke/Carbon Monoxide Detector", DEVICE_CLASS_SMOKE),
SENSOR_WINDOW_HINGED_HORIZONTAL: ("Hinged Window", "window"),
SENSOR_WINDOW_HINGED_VERTICAL: ("Hinged Window", "window"),
SENSOR_WINDOW_HINGED_HORIZONTAL: ("Hinged Window", DEVICE_CLASS_WINDOW),
SENSOR_WINDOW_HINGED_VERTICAL: ("Hinged Window", DEVICE_CLASS_WINDOW),
}


Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/wink/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

from homeassistant.components.binary_sensor import (
DEVICE_CLASS_SMOKE,
DEVICE_CLASS_SOUND,
DEVICE_CLASS_VIBRATION,
BinarySensorEntity,
)

Expand All @@ -25,7 +27,7 @@
"opened": "opening",
"presence": "occupancy",
"smoke_detected": DEVICE_CLASS_SMOKE,
"vibration": "vibration",
"vibration": DEVICE_CLASS_VIBRATION,
}


Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.