Temperature Alert messaging using Telegram

I am facing issue in LM35 temperature alert in telegram project . output showing in ubuntu terminal is
ashin@ubuntu:"/temp_alert$ sudo python3 telegram_alert.py
File “telegran_alert.py”, line 55 print(“Request was unseccessful. Skipping.”)

IndentationError: expected an indented block
ashin@ubuntu:"/temp_alert$





@jisanali96

In your #step 2 part, you have not provided an indent below the if condition. The correct method to write an if condition on python,

if sensor_value = -999:
   print("Request was unsucessful. Skipping. ")
   time.sleep(10)
   continue

if sensor_value > ...

Make sure to provide the tab/ space on providing the condition statement inside the if block.

Do let me know if you have any other queries.

1 Like

It’s working
I,m sorry for this little mistake.

thank you !:slightly_smiling_face: