Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions homeassistant/components/solarlog/sensor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Platform for solarlog sensors."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.helpers import update_coordinator
from homeassistant.helpers.entity import StateType
from homeassistant.helpers.entity import DeviceInfo, StateType

from . import SolarlogData
from .const import DOMAIN, SENSOR_TYPES, SolarLogSensorEntityDescription
Expand Down Expand Up @@ -30,11 +30,11 @@ def __init__(
self.entity_description = description
self._attr_name = f"{coordinator.name} {description.name}"
self._attr_unique_id = f"{coordinator.unique_id}_{description.key}"
self._attr_device_info = {
"identifiers": {(DOMAIN, coordinator.unique_id)},
"name": coordinator.name,
"manufacturer": "Solar-Log",
}
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, coordinator.unique_id)},
manufacturer="Solar-Log",
name=coordinator.name,
)

@property
def native_value(self) -> StateType:
Expand Down