Skip to content
Snippets Groups Projects
Commit 57e6dc3f authored by chriscla's avatar chriscla Committed by Paulus Schoutsen
Browse files

Fixing nzbget units display (#27521)

parent 17c3efa5
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
name = discovery_info["client_name"]
devices = []
for sensor_type, sensor_config in SENSOR_TYPES.items():
for sensor_config in SENSOR_TYPES.values():
new_sensor = NZBGetSensor(
nzbget_data, sensor_type, name, sensor_config[0], sensor_config[1]
nzbget_data, sensor_config[0], name, sensor_config[1], sensor_config[2]
)
devices.append(new_sensor)
......@@ -50,8 +50,8 @@ class NZBGetSensor(Entity):
self, nzbget_data, sensor_type, client_name, sensor_name, unit_of_measurement
):
"""Initialize a new NZBGet sensor."""
self._name = f"{client_name} {sensor_type}"
self.type = sensor_name
self._name = f"{client_name} {sensor_name}"
self.type = sensor_type
self.client_name = client_name
self.nzbget_data = nzbget_data
self._state = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment