Преглед на файлове

Merge pull request #39 from IndyJoeA/patch-1

Replace int with float in get_sensor_value()
tags/3.1_alpha
Manuel83 GitHub преди 8 години
родител
ревизия
0749c55478
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      modules/core/core.py

+ 1
- 1
modules/core/core.py Целия файл

@@ -171,7 +171,7 @@ class SensorAPI(object):
def get_sensor_value(self, id):
try:
id = int(id)
return int(self.cache.get("sensors")[id].instance.last_value)
return float(self.cache.get("sensors")[id].instance.last_value)
except Exception as e:

return None


Loading…
Отказ
Запис