mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
Removed unused member variables.
This commit is contained in:
@@ -5,7 +5,7 @@ from __future__ import annotations
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||
from homeassistant.helpers.service_info.mqtt import MqttServiceInfo, ReceivePayloadType
|
||||
from homeassistant.helpers.service_info.mqtt import MqttServiceInfo
|
||||
|
||||
from .const import CONF_DISCOVERY_PREFIX, DISCOVERY_TOPIC, DOMAIN
|
||||
|
||||
@@ -15,11 +15,6 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
VERSION = 1
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initialize flow."""
|
||||
self._prefix = DISCOVERY_TOPIC
|
||||
self._payload: ReceivePayloadType = ""
|
||||
|
||||
async def async_step_mqtt(
|
||||
self, discovery_info: MqttServiceInfo
|
||||
) -> ConfigFlowResult:
|
||||
@@ -39,8 +34,6 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
# "pglab/discovery/#" is hardcoded in manifest.json
|
||||
assert discovery_info.subscribed_topic == "pglab/discovery/#"
|
||||
self._prefix = "pglab/discovery"
|
||||
self._payload = discovery_info.payload
|
||||
|
||||
return await self.async_step_confirm()
|
||||
|
||||
@@ -59,7 +52,7 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
"""Confirm the setup."""
|
||||
|
||||
data = {
|
||||
CONF_DISCOVERY_PREFIX: self._prefix,
|
||||
CONF_DISCOVERY_PREFIX: DISCOVERY_TOPIC,
|
||||
}
|
||||
|
||||
if user_input is not None:
|
||||
|
Reference in New Issue
Block a user