diff --git a/custom_components/myenergi/select.py b/custom_components/myenergi/select.py index 3d5ad2c..47598f0 100644 --- a/custom_components/myenergi/select.py +++ b/custom_components/myenergi/select.py @@ -3,11 +3,11 @@ from homeassistant.components.select import SelectEntity from homeassistant.helpers import entity_platform from pymyenergi.eddi import EDDI_MODES -from pymyenergi.zappi import CHARGE_MODES -from pymyenergi.libbi import LIBBI_MODES from pymyenergi.libbi import LIBBI_MODE_NAMES -from pymyenergi.libbi import MODE_STOPPED +from pymyenergi.libbi import LIBBI_MODES from pymyenergi.libbi import MODE_NORMAL +from pymyenergi.libbi import MODE_STOPPED +from pymyenergi.zappi import CHARGE_MODES from .const import DOMAIN from .entity import MyenergiEntity diff --git a/custom_components/myenergi/sensor.py b/custom_components/myenergi/sensor.py index dc5c909..5926fcd 100644 --- a/custom_components/myenergi/sensor.py +++ b/custom_components/myenergi/sensor.py @@ -4,11 +4,11 @@ from homeassistant.components.sensor import SensorEntity from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT from homeassistant.components.sensor import STATE_CLASS_TOTAL_INCREASING +from homeassistant.const import DEVICE_CLASS_BATTERY from homeassistant.const import DEVICE_CLASS_ENERGY from homeassistant.const import DEVICE_CLASS_POWER from homeassistant.const import DEVICE_CLASS_TEMPERATURE from homeassistant.const import DEVICE_CLASS_VOLTAGE -from homeassistant.const import DEVICE_CLASS_BATTERY from homeassistant.const import ELECTRIC_POTENTIAL_VOLT from homeassistant.const import ENERGY_KILO_WATT_HOUR from homeassistant.const import FREQUENCY_HERTZ @@ -20,8 +20,8 @@ from pymyenergi import CT_LOAD from pymyenergi import EDDI from pymyenergi import HARVI -from pymyenergi import ZAPPI from pymyenergi import LIBBI +from pymyenergi import ZAPPI from .const import DOMAIN from .entity import MyenergiEntity @@ -563,7 +563,7 @@ async def async_setup_entry(hass, entry, async_add_devices): ENERGY_KILO_WATT_HOUR, ENTITY_CATEGORY_DIAGNOSTIC, ICON_POWER, - ) + ), ) ) sensors.append( @@ -578,7 +578,7 @@ async def async_setup_entry(hass, entry, async_add_devices): None, None, ICON_HOME_BATTERY, - ) + ), ) ) sensors.append( @@ -594,7 +594,7 @@ async def async_setup_entry(hass, entry, async_add_devices): None, None, STATE_CLASS_TOTAL_INCREASING, - ) + ), ) ) sensors.append( @@ -610,7 +610,7 @@ async def async_setup_entry(hass, entry, async_add_devices): None, None, STATE_CLASS_TOTAL_INCREASING, - ) + ), ) ) sensors.append( @@ -626,7 +626,7 @@ async def async_setup_entry(hass, entry, async_add_devices): None, None, STATE_CLASS_TOTAL_INCREASING, - ) + ), ) ) sensors.append( @@ -642,7 +642,7 @@ async def async_setup_entry(hass, entry, async_add_devices): None, None, STATE_CLASS_TOTAL_INCREASING, - ) + ), ) ) sensors.append( @@ -658,7 +658,7 @@ async def async_setup_entry(hass, entry, async_add_devices): None, None, STATE_CLASS_TOTAL_INCREASING, - ) + ), ) ) async_add_devices(sensors)