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

Commit

Permalink
Fix typo, add device class for plugged in
Browse files Browse the repository at this point in the history
  • Loading branch information
cgarwood committed May 19, 2020
1 parent 50ef0b9 commit c7342c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/fullykiosk/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging

from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.const import DEVICE_CLASS_BATTERY
from homeassistant.const import DEVICE_CLASS_PLUG
from homeassistant.helpers.dispatcher import async_dispatcher_connect

from .const import DOMAIN, COORDINATOR, CONTROLLER
Expand All @@ -12,7 +12,7 @@
SENSOR_TYPES = {
"kioskMode": "Kiosk Mode",
"kioskLocked": "Kiosk Locked",
"plugged": "Pluggin In",
"plugged": "Plugged In",
"isDeviceAdmin": "Device Admin",
}

Expand Down Expand Up @@ -46,8 +46,8 @@ def is_on(self):

@property
def device_class(self):
if self._sensor == "batteryLevel":
return DEVICE_CLASS_BATTERY
if self._sensor == "plugged":
return DEVICE_CLASS_PLUG
return None

@property
Expand Down

0 comments on commit c7342c7

Please sign in to comment.