Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit c7342c7

Browse files
committed
Fix typo, add device class for plugged in
1 parent 50ef0b9 commit c7342c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

custom_components/fullykiosk/binary_sensor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33

44
from homeassistant.components.binary_sensor import BinarySensorDevice
5-
from homeassistant.const import DEVICE_CLASS_BATTERY
5+
from homeassistant.const import DEVICE_CLASS_PLUG
66
from homeassistant.helpers.dispatcher import async_dispatcher_connect
77

88
from .const import DOMAIN, COORDINATOR, CONTROLLER
@@ -12,7 +12,7 @@
1212
SENSOR_TYPES = {
1313
"kioskMode": "Kiosk Mode",
1414
"kioskLocked": "Kiosk Locked",
15-
"plugged": "Pluggin In",
15+
"plugged": "Plugged In",
1616
"isDeviceAdmin": "Device Admin",
1717
}
1818

@@ -46,8 +46,8 @@ def is_on(self):
4646

4747
@property
4848
def device_class(self):
49-
if self._sensor == "batteryLevel":
50-
return DEVICE_CLASS_BATTERY
49+
if self._sensor == "plugged":
50+
return DEVICE_CLASS_PLUG
5151
return None
5252

5353
@property

0 commit comments

Comments
 (0)