Changing temperature value on telegram(to give max and min values)

in telegram temperature message project,i want to make code to changing temperature value . i.e instead of threshold value i want to give two limit value of temperature in code,then what,how changes occur in that code to set 'max temp value and ‘min temp value’

In the cong.py file, instead of threshold, give two values i.e min and max. Assign the value to them accordingly.
In the telegram_alert.py file, make the following changes in step3 of while loop :

if sensor_value >= conf.max :
print(“Sensor value has exceeded the given temp requirement”)
message = "Alert! Sensor value has exceeded " + str(conf.max * 0.097) +
". The current value is " + str(sensor_value *0.097)
elif sensor_value <= conf.min:
print(“Sensor value has lowered from the given temp requirement”)
message = “Alert! Sensor value is less than”+ str(conf.min *0.097)+ ". The current value is "+ str(sensor_value +0.097)
telegram_status = send_telegram_message(message)
print(“This is the Telegram status:”, telegram_status)

1 Like