diff options
author | pks <pks@pks.rocks> | 2021-05-01 06:17:55 +0200 |
---|---|---|
committer | pks <pks@pks.rocks> | 2021-05-01 06:17:55 +0200 |
commit | f461190e22a97bde985b067ce01c4ed9c74f7e62 (patch) | |
tree | 0c2c48d1933765f83d083241df2dd74c6603f2bc /get-temps.rb | |
parent | 63fbf0f3aadb4b6d037a8164b501fe836d9c361d (diff) |
v1
Diffstat (limited to 'get-temps.rb')
-rwxr-xr-x | get-temps.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/get-temps.rb b/get-temps.rb deleted file mode 100755 index f25540b..0000000 --- a/get-temps.rb +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env ruby - -$devices = { "f4:01" => "outside", "1f:01" => "inside" } - -while line = STDIN.gets - a = line.split - d = {} - a.each { |i| - name, val = i.split("::") - if name == "timestamp" - d["timestamp"] = val.to_f - end - if name == "temperature" - d["temperature"] = val.to_f - end - if name == "device_id" - d["dev"] = devices[val] - end - } - puts d.to_s -end |