Add POWER device class to goodwe number (#84232)
This commit is contained in:
parent
429dbd4215
commit
b4274e4a26
1 changed files with 8 additions and 3 deletions
|
@ -7,9 +7,13 @@ import logging
|
|||
|
||||
from goodwe import Inverter, InverterError
|
||||
|
||||
from homeassistant.components.number import NumberEntity, NumberEntityDescription
|
||||
from homeassistant.components.number import (
|
||||
NumberDeviceClass,
|
||||
NumberEntity,
|
||||
NumberEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import PERCENTAGE, POWER_WATT
|
||||
from homeassistant.const import PERCENTAGE, UnitOfPower
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import DeviceInfo, EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -42,7 +46,8 @@ NUMBERS = (
|
|||
name="Grid export limit",
|
||||
icon="mdi:transmission-tower",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
native_unit_of_measurement=POWER_WATT,
|
||||
device_class=NumberDeviceClass.POWER,
|
||||
native_unit_of_measurement=UnitOfPower.WATT,
|
||||
native_step=100,
|
||||
native_min_value=0,
|
||||
native_max_value=10000,
|
||||
|
|
Loading…
Add table
Reference in a new issue