|
# -*- coding: utf-8 -*-
from utils.redis.connect import r
from utils.redis.rkeys import TWJC_OLD_TEMPERATURE_HASH
def set_old_temperature(point_id, macid, temperature):
r.hset(TWJC_OLD_TEMPERATURE_HASH, f'{point_id}:{macid}', temperature)
def get_old_temperature(point_id, macid):
return r.hgetfloat(TWJC_OLD_TEMPERATURE_HASH, f'{point_id}:{macid}')
|