Fix duplicate unique id in System Monitor (again) (#107947)

Fix duplicate unique id in System Monitor
This commit is contained in:
G Johansson 2024-01-13 13:48:02 +01:00 committed by Franck Nijhof
parent 80387be061
commit 488acc3252
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -405,7 +405,7 @@ async def async_setup_entry(
is_enabled = check_legacy_resource(
f"{_type}_{argument}", legacy_resources
)
loaded_resources.add(f"{_type}_{slugify(argument)}")
loaded_resources.add(slugify(f"{_type}_{argument}"))
entities.append(
SystemMonitorSensor(
sensor_registry,
@ -425,7 +425,7 @@ async def async_setup_entry(
is_enabled = check_legacy_resource(
f"{_type}_{argument}", legacy_resources
)
loaded_resources.add(f"{_type}_{slugify(argument)}")
loaded_resources.add(slugify(f"{_type}_{argument}"))
entities.append(
SystemMonitorSensor(
sensor_registry,
@ -449,7 +449,7 @@ async def async_setup_entry(
sensor_registry[(_type, argument)] = SensorData(
argument, None, None, None, None
)
loaded_resources.add(f"{_type}_{slugify(argument)}")
loaded_resources.add(slugify(f"{_type}_{argument}"))
entities.append(
SystemMonitorSensor(
sensor_registry,