Skip to content

Commit

Permalink
Merge pull request #297 from MitchBred/weather-standby-mode
Browse files Browse the repository at this point in the history
chore(weather-standby-mode): add clouds to payload
  • Loading branch information
MitchBred authored Dec 8, 2023
2 parents ccf2e38 + cee4d45 commit 91d2e14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions status.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

def run(clouds):
try:
clouds = f'The service is currently inactive. The sky is {clouds}% covered with clouds.'
clouds = f'The service is currently inactive.\nThe sky is {clouds}% covered with clouds.'
if clouds < os.getenv('WEATHER_CLOUD_PERCENTAGE'):
clouds = f"The service is active. The sky is {clouds}% covered with clouds."
clouds = f"The service is active.\nThe sky is {clouds}% covered with clouds."

payload = {
"status": 201,
"clouds": clouds
"clouds": {clouds}
}
response = requests.post(os.getenv('RASPBERRY_PI_STATUS'), data=payload)
except:
Expand Down

0 comments on commit 91d2e14

Please sign in to comment.