Code quality Local IP (#82050)

This commit is contained in:
G Johansson 2022-11-24 20:39:14 +01:00 committed by GitHub
parent 815dfe9134
commit 3b0a42f8f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -7,7 +7,7 @@ from homeassistant.const import CONF_NAME
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN, SENSOR
from .const import SENSOR
async def async_setup_entry(
@ -16,7 +16,7 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the platform from config_entry."""
name = entry.data.get(CONF_NAME) or DOMAIN
name = entry.data.get(CONF_NAME) or "Local IP"
async_add_entities([IPSensor(name)], True)