mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Code quality Local IP (#82050)
This commit is contained in:
parent
815dfe9134
commit
3b0a42f8f4
@ -12,8 +12,6 @@ from .const import DOMAIN
|
||||
class SimpleConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for local_ip."""
|
||||
|
||||
VERSION = 1
|
||||
|
||||
async def async_step_user(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> FlowResult:
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user