Skip to content

Commit

Permalink
Use the user provided label instead of the machine generated name
Browse files Browse the repository at this point in the history
for creating graphs when it is available (especially useful for zwave,
since the name then contains long numbers for the value id's)
  • Loading branch information
woudt committed Jan 1, 2013
1 parent 2561233 commit 2f45f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion houseagent/core/database.py
Expand Up @@ -560,7 +560,7 @@ def query_values(self):
"LEFT OUTER JOIN history_periods ON (current_values.history_period_id = history_periods.id)")

def query_values_light(self):
return self.dbpool.runQuery("SELECT id, name, history_period_id, history_type_id FROM current_values;")
return self.dbpool.runQuery("SELECT id, IFNULL(label, name), history_period_id, history_type_id FROM current_values;")

def query_devices(self):
return self.dbpool.runQuery("SELECT devices.id, devices.name, devices.address, plugins.name, locations.name from devices " +
Expand Down

0 comments on commit 2f45f83

Please sign in to comment.