def get_weather_icon(weather_id):
    ' Get weather icon based on weather condition '
    day_night_status = get_day_or_night()
    weather = {'thunderstorm': (200 <= weather_id <= 232), 'rain': (300 <= weather_id <= 531), 'snow': (600 <= weather_id <= 622), 'atmosphere': (701 <= weather_id <= 781), 'squall': (weather_id == 771), 'tornado': ((weather_id == 781) or (weather_id == 900)), 'clear_day': ((weather_id == 800) and (day_night_status == 'day')), 'clear_night': ((weather_id == 800) and (day_night_status == 'night')), 'tropical storm': (weather_id == 901), 'hurricane': (weather_id == 902), 'cold': (weather_id == 903), 'hot': (weather_id == 904), 'windy': (weather_id == 905), 'cloudy': (801 <= weather_id <= 804), 'hail': (weather_id == 906)}
    if weather['thunderstorm']:
        return '\uf0e7'
    elif weather['rain']:
        return '\uf043'
    elif (weather['snow'] or weather['cold']):
        return '\uf2dc'
    elif (weather['atmosphere'] or weather['windy']):
        return '\ue8de'
    elif (weather['squall'] or weather['tornado'] or weather['tropical storm'] or weather['hurricane']):
        return '\uf2dd'
    elif (weather['clear_day'] or weather['hot']):
        return '\ue430'
    elif weather['clear_night']:
        return '\uf186'
    elif weather['cloudy']:
        return '\uf0c2'
    elif weather['hail']:
        return '\ue3ea'
Get weather icon based on weather condition
def get_weather_icon(weather_id):
    '  '
    day_night_status = get_day_or_night()
    weather = {'thunderstorm': (200 <= weather_id <= 232), 'rain': (300 <= weather_id <= 531), 'snow': (600 <= weather_id <= 622), 'atmosphere': (701 <= weather_id <= 781), 'squall': (weather_id == 771), 'tornado': ((weather_id == 781) or (weather_id == 900)), 'clear_day': ((weather_id == 800) and (day_night_status == 'day')), 'clear_night': ((weather_id == 800) and (day_night_status == 'night')), 'tropical storm': (weather_id == 901), 'hurricane': (weather_id == 902), 'cold': (weather_id == 903), 'hot': (weather_id == 904), 'windy': (weather_id == 905), 'cloudy': (801 <= weather_id <= 804), 'hail': (weather_id == 906)}
    if weather['thunderstorm']:
        return '\uf0e7'
    elif weather['rain']:
        return '\uf043'
    elif (weather['snow'] or weather['cold']):
        return '\uf2dc'
    elif (weather['atmosphere'] or weather['windy']):
        return '\ue8de'
    elif (weather['squall'] or weather['tornado'] or weather['tropical storm'] or weather['hurricane']):
        return '\uf2dd'
    elif (weather['clear_day'] or weather['hot']):
        return '\ue430'
    elif weather['clear_night']:
        return '\uf186'
    elif weather['cloudy']:
        return '\uf0c2'
    elif weather['hail']:
        return '\ue3ea'