Skip to content

Commit

Permalink
Add single line output code for WeatherCode chubin#995
Browse files Browse the repository at this point in the history
  • Loading branch information
ashafq committed May 23, 2024
1 parent 575908a commit 7f48e0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/view/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ def render_condition_plain(data, query):

return weather_condition

def render_condition_int(data, query):
"""Weather condition code as integer (i)
"""
return data['weatherCode']


def render_humidity(data, query):
"""
humidity (h)
Expand Down Expand Up @@ -284,6 +290,7 @@ def render_local_timezone(data, query, local_time_of):
'c': render_condition,
'C': render_condition_fullname,
'x': render_condition_plain,
'i': render_condition_int,
'h': render_humidity,
't': render_temperature,
'f': render_feel_like_temperature,
Expand Down

0 comments on commit 7f48e0d

Please sign in to comment.