Private/Convert-Current.ps1

filter Convert-Current
{
    [PSCustomObject]@{
        PSTypeName         = 'UncommonSense.Weather.Current'
        DateTime           = Get-Date -UnixTimeSeconds $_.dt
        Sunrise            = Get-Date -UnixTimeSeconds $_.sunrise
        Sunset             = Get-Date -UnixTimeSeconds $_.sunset
        Temperature        = $_.temp
        FeelsLike          = $_.feels_like
        Pressure           = $_.pressure
        Humidity           = $_.humidity
        DewPoint           = $_.dew_point
        CloudinessPercent  = $_.clouds
        UVIndex            = $_.uvi
        Visibility         = $_.visibility
        WindSpeed          = $_.wind_speed
        WindGust           = $_.wind_gust
        WindDirection      = $_.wind_deg
        RainVolumeLastHour = $_.rain.'1h'
        SnowVolumeLastHour = $_.snow.'1h'
        Weather            = $_.weather | Convert-Weather
    }
}