def min_max_temp(temp: str, unit: str = 'C') -> str:
    """
    Format the Min and Max temp elemets into a readable string

    Ex: Maximum temperature of 23°C (73°F) at 18-15:00Z
    """
    if not temp or len(temp) < 7:
        return ''
    if temp[:2] == 'TX':
        temp_type = 'Maximum'
    elif temp[:2] == 'TN':
        temp_type = 'Minimum'
    else:
        return ''
    temp = temp[2:].replace('M', '-').replace('Z', '').split('/')  # type: ignore
    if len(temp[1]) > 2:
        temp[1] = temp[1][:2] + '-' + temp[1][2:]  # type: ignore
    temp_value = temperature(core.make_number(temp[0]), unit)
    return f'{temp_type} temperature of {temp_value} at {temp[1]}:00Z'
def min_max_temp ( temp : str , unit : str = 'C' ) -> str : if not temp or len ( temp ) < 7 : return '' if temp [ : 2 ] == 'TX' : temp_type = 'Maximum' elif temp [ : 2 ] == 'TN' : temp_type = 'Minimum' else : return '' temp = temp [ 2 : ] . replace ( 'M' , '-' ) . replace ( 'Z' , '' ) . split ( '/' ) if len ( temp [ 1 ] ) > 2 : temp [ 1 ] = temp [ 1 ] [ : 2 ] + '-' + temp [ 1 ] [ 2 : ] temp_value = temperature ( core . make_number ( temp [ 0 ] ) , unit ) return f'{temp_type} temperature of {temp_value} at {temp[1]}:00Z'
Format the Min and Max temp elemets into a readable string

    Ex: Maximum temperature of 23°C (73°F) at 18-15:00Z