check_temperature - minor code reworking

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>