Temperature alert

In the telegram message code there are lines:

response = mybolt.analogRead(pin)
data = json.loads(response)
if data["success"] != 1:
            print("Request not successfull")
            print("This is the response->", data)
            return -999

It says it checks for the valid response. But how?
What is the value of success?
Like what does data[“success”] do?
Data is the temperature right? So how is it 1?

value of success is either 1 or 0
if the execution of code succeeds then the value returned will be 1 and if the execution of code fails then it will return 0.
This is response returned on executing my device_status.py
{“value”: “offline”, “time”: null, “success”: 1}
Here the value of success is “1” since the code executed successfully despite the device being “offline”

After seeing your code ,data stores the response which it gets from the pin ,data consists of two parts first is value and second is success by data[‘success’] means that if the success value is 1 then our program will run successfully otherwise it will return -999.
data can have only 2 values 1 or 0 which means that 1 is success and 0 is fail.
A s I am sharing my code you can see the output as well.