Code quality Local IP (#82050)
This commit is contained in:
parent
815dfe9134
commit
3b0a42f8f4
2 changed files with 2 additions and 4 deletions
|
@ -12,8 +12,6 @@ from .const import DOMAIN
|
||||||
class SimpleConfigFlow(ConfigFlow, domain=DOMAIN):
|
class SimpleConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
"""Handle a config flow for local_ip."""
|
"""Handle a config flow for local_ip."""
|
||||||
|
|
||||||
VERSION = 1
|
|
||||||
|
|
||||||
async def async_step_user(
|
async def async_step_user(
|
||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> FlowResult:
|
) -> FlowResult:
|
||||||
|
|
|
@ -7,7 +7,7 @@ from homeassistant.const import CONF_NAME
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import DOMAIN, SENSOR
|
from .const import SENSOR
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
|
@ -16,7 +16,7 @@ async def async_setup_entry(
|
||||||
async_add_entities: AddEntitiesCallback,
|
async_add_entities: AddEntitiesCallback,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the platform from config_entry."""
|
"""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)
|
async_add_entities([IPSensor(name)], True)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue