Drop deprecated CONF_NAMES from onewire (#61094)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
ebc8e19788
commit
24e27290b5
4 changed files with 4 additions and 17 deletions
|
@ -33,7 +33,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
from homeassistant.helpers.typing import StateType
|
||||
|
||||
from .const import (
|
||||
CONF_NAMES,
|
||||
CONF_TYPE_OWSERVER,
|
||||
CONF_TYPE_SYSBUS,
|
||||
DEVICE_KEYS_0_3,
|
||||
|
@ -333,10 +332,6 @@ def get_entities(
|
|||
return []
|
||||
|
||||
entities: list[SensorEntity] = []
|
||||
device_names = {}
|
||||
if CONF_NAMES in config and isinstance(config[CONF_NAMES], dict):
|
||||
device_names = config[CONF_NAMES]
|
||||
|
||||
conf_type = config[CONF_TYPE]
|
||||
# We have an owserver on a remote(or local) host/port
|
||||
if conf_type == CONF_TYPE_OWSERVER:
|
||||
|
@ -375,7 +370,7 @@ def get_entities(
|
|||
device_file = os.path.join(
|
||||
os.path.split(device.path)[0], description.key
|
||||
)
|
||||
name = f"{device_names.get(device_id, device_id)} {description.name}"
|
||||
name = f"{device_id} {description.name}"
|
||||
entities.append(
|
||||
OneWireProxySensor(
|
||||
description=description,
|
||||
|
@ -398,7 +393,7 @@ def get_entities(
|
|||
device_info = device.device_info
|
||||
description = SIMPLE_TEMPERATURE_SENSOR_DESCRIPTION
|
||||
device_file = f"/sys/bus/w1/devices/{device_id}/w1_slave"
|
||||
name = f"{device_names.get(device_id, device_id)} {description.name}"
|
||||
name = f"{device_id} {description.name}"
|
||||
entities.append(
|
||||
OneWireDirectSensor(
|
||||
description=description,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue