mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Set correct state_class for battery_stored and increase timeout to prevent Imeon integration disconnections (#144925)
This commit is contained in:
parent
84305563ab
commit
9b9d4d7dab
@ -3,7 +3,7 @@
|
|||||||
from homeassistant.const import Platform
|
from homeassistant.const import Platform
|
||||||
|
|
||||||
DOMAIN = "imeon_inverter"
|
DOMAIN = "imeon_inverter"
|
||||||
TIMEOUT = 20
|
TIMEOUT = 30
|
||||||
PLATFORMS = [
|
PLATFORMS = [
|
||||||
Platform.SENSOR,
|
Platform.SENSOR,
|
||||||
]
|
]
|
||||||
|
@ -69,7 +69,7 @@ ENTITY_DESCRIPTIONS = (
|
|||||||
translation_key="battery_stored",
|
translation_key="battery_stored",
|
||||||
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
|
||||||
device_class=SensorDeviceClass.ENERGY_STORAGE,
|
device_class=SensorDeviceClass.ENERGY_STORAGE,
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
# Grid
|
# Grid
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
|
@ -282,7 +282,7 @@
|
|||||||
}),
|
}),
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
'capabilities': dict({
|
'capabilities': dict({
|
||||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||||
}),
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
'config_subentry_id': <ANY>,
|
'config_subentry_id': <ANY>,
|
||||||
@ -321,7 +321,7 @@
|
|||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'energy_storage',
|
'device_class': 'energy_storage',
|
||||||
'friendly_name': 'Imeon inverter Battery stored',
|
'friendly_name': 'Imeon inverter Battery stored',
|
||||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||||
'unit_of_measurement': <UnitOfEnergy.WATT_HOUR: 'Wh'>,
|
'unit_of_measurement': <UnitOfEnergy.WATT_HOUR: 'Wh'>,
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user