mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 17:45:19 +02:00
MySensors: Absolute imports and cosmetic changes
This commit is contained in:
@@ -5,14 +5,14 @@ from typing import Callable, Dict, List, Optional, Tuple, Type, Union
|
|||||||
from mysensors import BaseAsyncGateway
|
from mysensors import BaseAsyncGateway
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.mqtt import valid_publish_topic, valid_subscribe_topic
|
from homeassistant.components.mqtt import valid_publish_topic, valid_subscribe_topic
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.const import CONF_OPTIMISTIC
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
|
||||||
|
|
||||||
from ... import config_entries
|
|
||||||
from ...config_entries import ConfigEntry
|
|
||||||
from ...const import CONF_OPTIMISTIC
|
|
||||||
from ...helpers.typing import ConfigType, HomeAssistantType
|
|
||||||
from .const import (
|
from .const import (
|
||||||
ATTR_DEVICES,
|
ATTR_DEVICES,
|
||||||
CONF_BAUD_RATE,
|
CONF_BAUD_RATE,
|
||||||
|
@@ -85,12 +85,11 @@ async def try_connect(hass: HomeAssistantType, user_input: Dict[str, str]) -> bo
|
|||||||
|
|
||||||
def _get_schema_common() -> dict:
|
def _get_schema_common() -> dict:
|
||||||
"""Create a schema with options common to all gateway types."""
|
"""Create a schema with options common to all gateway types."""
|
||||||
schema = dict()
|
schema = {
|
||||||
schema[
|
|
||||||
vol.Required(
|
vol.Required(
|
||||||
CONF_VERSION, default="", description={"suggested_value": DEFAULT_VERSION}
|
CONF_VERSION, default="", description={"suggested_value": DEFAULT_VERSION}
|
||||||
)
|
): str
|
||||||
] = str
|
}
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
|
|
||||||
|
@@ -10,12 +10,12 @@ import async_timeout
|
|||||||
from mysensors import BaseAsyncGateway, Message, Sensor, mysensors
|
from mysensors import BaseAsyncGateway, Message, Sensor, mysensors
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.typing import HomeAssistantType
|
||||||
|
|
||||||
from ...config_entries import ConfigEntry
|
|
||||||
from ...helpers.typing import HomeAssistantType
|
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_BAUD_RATE,
|
CONF_BAUD_RATE,
|
||||||
CONF_DEVICE,
|
CONF_DEVICE,
|
||||||
|
Reference in New Issue
Block a user