MySensors: Absolute imports and cosmetic changes

This commit is contained in:
functionpointer
2021-01-23 14:02:21 +01:00
parent 5bc2039890
commit 8338aadf8c
3 changed files with 9 additions and 10 deletions

View File

@@ -5,14 +5,14 @@ from typing import Callable, Dict, List, Optional, Tuple, Type, Union
from mysensors import BaseAsyncGateway
import voluptuous as vol
from homeassistant import config_entries
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
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 (
ATTR_DEVICES,
CONF_BAUD_RATE,

View File

@@ -85,12 +85,11 @@ async def try_connect(hass: HomeAssistantType, user_input: Dict[str, str]) -> bo
def _get_schema_common() -> dict:
"""Create a schema with options common to all gateway types."""
schema = dict()
schema[
schema = {
vol.Required(
CONF_VERSION, default="", description={"suggested_value": DEFAULT_VERSION}
)
] = str
): str
}
return schema

View File

@@ -10,12 +10,12 @@ import async_timeout
from mysensors import BaseAsyncGateway, Message, Sensor, mysensors
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.core import callback
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 (
CONF_BAUD_RATE,
CONF_DEVICE,