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
9 changes: 5 additions & 4 deletions homeassistant/components/sms/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.const import DEVICE_CLASS_SIGNAL_STRENGTH, SIGNAL_STRENGTH_DECIBELS
from homeassistant.helpers.entity import DeviceInfo

from .const import DOMAIN, SMS_GATEWAY

Expand Down Expand Up @@ -39,10 +40,10 @@ class GSMSignalSensor(SensorEntity):

def __init__(self, hass, gateway, imei, description):
"""Initialize the GSM Signal sensor."""
self._attr_device_info = {
"identifiers": {(DOMAIN, str(imei))},
"name": "SMS Gateway",
}
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, str(imei))},
name="SMS Gateway",
)
self._attr_unique_id = str(imei)
self._hass = hass
self._gateway = gateway
Expand Down