Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions homeassistant/components/elgato/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.aiohttp_client import async_get_clientsession

from .const import CONF_SERIAL_NUMBER, DOMAIN
from .const import DOMAIN


class ElgatoFlowHandler(ConfigFlow, domain=DOMAIN):
Expand Down Expand Up @@ -89,7 +89,6 @@ def _async_create_entry(self) -> FlowResult:
data={
CONF_HOST: self.host,
CONF_PORT: self.port,
CONF_SERIAL_NUMBER: self.serial_number,
},
)

Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/elgato/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@
# Attributes
ATTR_ON = "on"

CONF_SERIAL_NUMBER = "serial_number"

# Services
SERVICE_IDENTIFY = "identify"
3 changes: 1 addition & 2 deletions tests/components/elgato/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for the Elgato Key Light integration."""

from homeassistant.components.elgato.const import CONF_SERIAL_NUMBER, DOMAIN
from homeassistant.components.elgato.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_PORT, CONTENT_TYPE_JSON
from homeassistant.core import HomeAssistant

Expand Down Expand Up @@ -60,7 +60,6 @@ async def init_integration(
data={
CONF_HOST: "127.0.0.1",
CONF_PORT: 9123,
CONF_SERIAL_NUMBER: "CN11A1A00001",
},
)

Expand Down
6 changes: 2 additions & 4 deletions tests/components/elgato/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from homeassistant import data_entry_flow
from homeassistant.components import zeroconf
from homeassistant.components.elgato.const import CONF_SERIAL_NUMBER, DOMAIN
from homeassistant.components.elgato.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER, SOURCE_ZEROCONF
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SOURCE, CONTENT_TYPE_JSON
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -52,7 +52,6 @@ async def test_full_user_flow_implementation(

assert result["data"][CONF_HOST] == "127.0.0.1"
assert result["data"][CONF_PORT] == 9123
assert result["data"][CONF_SERIAL_NUMBER] == "CN11A1A00001"
assert result["title"] == "CN11A1A00001"
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY

Expand Down Expand Up @@ -83,7 +82,7 @@ async def test_full_zeroconf_flow_implementation(
),
)

assert result["description_placeholders"] == {CONF_SERIAL_NUMBER: "CN11A1A00001"}
assert result["description_placeholders"] == {"serial_number": "CN11A1A00001"}
assert result["step_id"] == "zeroconf_confirm"
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM

Expand All @@ -97,7 +96,6 @@ async def test_full_zeroconf_flow_implementation(
)
assert result["data"][CONF_HOST] == "127.0.0.1"
assert result["data"][CONF_PORT] == 9123
assert result["data"][CONF_SERIAL_NUMBER] == "CN11A1A00001"
assert result["title"] == "CN11A1A00001"
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY

Expand Down