forked from home-assistant/core
Deprecate onewire YAML configuration (#50151)
This commit is contained in:
@@ -236,6 +236,11 @@ def get_sensor_types(device_sub_type):
|
|||||||
|
|
||||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up 1-Wire platform."""
|
"""Old way of setting up 1-Wire platform."""
|
||||||
|
_LOGGER.warning(
|
||||||
|
"Loading 1-Wire via platform setup is deprecated. "
|
||||||
|
"Please remove it from your configuration"
|
||||||
|
)
|
||||||
|
|
||||||
if config.get(CONF_HOST):
|
if config.get(CONF_HOST):
|
||||||
config[CONF_TYPE] = CONF_TYPE_OWSERVER
|
config[CONF_TYPE] = CONF_TYPE_OWSERVER
|
||||||
elif config[CONF_MOUNT_DIR] == DEFAULT_SYSBUS_MOUNT_DIR:
|
elif config[CONF_MOUNT_DIR] == DEFAULT_SYSBUS_MOUNT_DIR:
|
||||||
|
Reference in New Issue
Block a user