Skip to content

Commit

Permalink
feat: set SOC levels as number instead of slider (Hyundai-Kia-Connect…
Browse files Browse the repository at this point in the history
  • Loading branch information
bouwew authored Jan 7, 2023
1 parent 805d7b9 commit fe78a33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/kia_uvo/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

from hyundai_kia_connect_api import Vehicle, VehicleManager

from homeassistant.components.number import NumberEntity, NumberEntityDescription
from homeassistant.components.number import (
NumberEntity,
NumberEntityDescription,
NumberMode,
)
from homeassistant.const import PERCENTAGE
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -74,6 +78,7 @@ def __init__(
self._key = self._description.key
self._attr_unique_id = f"{DOMAIN}_{vehicle.id}_{self._key}"
self._attr_icon = self._description.icon
self._attr_mode = NumberMode.BOX
self._attr_name = f"{vehicle.name} {self._description.name}"
self._attr_device_class = self._description.device_class

Expand Down

0 comments on commit fe78a33

Please sign in to comment.