Fix small issue on Autarco integration (#121723)

pull/121731/head
Klaas Schoute 2024-07-10 23:37:32 +02:00 committed by GitHub
parent d87bbaa67a
commit 664c4e6189
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View File

@ -60,6 +60,7 @@ SENSORS_SOLAR: tuple[AutarcoSolarSensorEntityDescription, ...] = (
translation_key="energy_production_total",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
state=lambda solar: solar.energy_production_total,
),
)

View File

@ -33,7 +33,7 @@
"name": "Energy production month"
},
"energy_production_total": {
"name": "ENergy production total"
"name": "Energy production total"
}
}
}

View File

@ -100,7 +100,9 @@
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
@ -119,7 +121,7 @@
}),
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
'original_icon': None,
'original_name': 'ENergy production total',
'original_name': 'Energy production total',
'platform': 'autarco',
'previous_unique_id': None,
'supported_features': 0,
@ -132,7 +134,8 @@
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Solar ENergy production total',
'friendly_name': 'Solar Energy production total',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,