mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove Modbus legacy code (#33407)
* Modbus: remove legacy code flexit and stiebel_el are updated to import modbus.const, therefore legacy code can be removed. * Flexit: update const reference from modbus climate.py imports from modbus direct, this is legacy and will result in errors. update import to be modbus.const. * Stiebel_el: update reference to modbus __init.py references modbus directly, this is legacy and will give errors. Update import to be modbus.const.
This commit is contained in:
parent
fe0db80fb8
commit
ad8cf2d0d0
@ -11,11 +11,7 @@ from homeassistant.components.climate.const import (
|
||||
SUPPORT_FAN_MODE,
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
)
|
||||
from homeassistant.components.modbus import (
|
||||
CONF_HUB,
|
||||
DEFAULT_HUB,
|
||||
DOMAIN as MODBUS_DOMAIN,
|
||||
)
|
||||
from homeassistant.components.modbus.const import CONF_HUB, DEFAULT_HUB, MODBUS_DOMAIN
|
||||
from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
CONF_NAME,
|
||||
|
@ -25,7 +25,7 @@ from homeassistant.const import (
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from .const import ( # DEFAULT_HUB,
|
||||
from .const import (
|
||||
ATTR_ADDRESS,
|
||||
ATTR_HUB,
|
||||
ATTR_UNIT,
|
||||
@ -34,16 +34,12 @@ from .const import ( # DEFAULT_HUB,
|
||||
CONF_BYTESIZE,
|
||||
CONF_PARITY,
|
||||
CONF_STOPBITS,
|
||||
DEFAULT_HUB,
|
||||
MODBUS_DOMAIN,
|
||||
SERVICE_WRITE_COIL,
|
||||
SERVICE_WRITE_REGISTER,
|
||||
)
|
||||
|
||||
# Kept for compatibility with other integrations, TO BE REMOVED
|
||||
CONF_HUB = "hub"
|
||||
DEFAULT_HUB = "default"
|
||||
DOMAIN = MODBUS_DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BASE_SCHEMA = vol.Schema({vol.Optional(CONF_NAME, default=DEFAULT_HUB): cv.string})
|
||||
|
@ -5,11 +5,7 @@ import logging
|
||||
from pystiebeleltron import pystiebeleltron
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.modbus import (
|
||||
CONF_HUB,
|
||||
DEFAULT_HUB,
|
||||
DOMAIN as MODBUS_DOMAIN,
|
||||
)
|
||||
from homeassistant.components.modbus.const import CONF_HUB, DEFAULT_HUB, MODBUS_DOMAIN
|
||||
from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME
|
||||
from homeassistant.helpers import discovery
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
Loading…
x
Reference in New Issue
Block a user