Skip to content

Commit

Permalink
Send value as degrees (float)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed Mar 11, 2017
1 parent 400ec31 commit 252ae5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpu_temp.py
Expand Up @@ -28,13 +28,13 @@ def read_func():
with open(PATH, 'rb') as f:
temp = f.read().strip()

# Convert to integer
mdeg = int(temp)
# Convert to degrees celsius
deg = float(int(temp)) / 1000

# Dispatch value to collectd
val = collectd.Values(type='temperature')
val.plugin = 'cpu_temp'
val.dispatch(values=[mdeg])
val.dispatch(values=[deg])


collectd.register_config(config_func)
Expand Down

0 comments on commit 252ae5f

Please sign in to comment.