Private/Convert-Daily.ps1
filter Convert-Daily { [PSCustomObject]@{ DateTime = Get-Date -UnixTimeSeconds $_.dt Sunrise = Get-Date -UnixTimeSeconds $_.sunrise Sunset = Get-Date -UnixTimeSeconds $_.sunset Moonrise = Get-Date -UnixTimeSeconds $_.moonrise Moonset = Get-Date -UnixTimeSeconds $_.moonset MoonPhase = $_.moon_phase MoonPhaseDescription = Convert-MoonPhase -MoonPhase $_.moon_phase MorningTemperature = $_.temp.morn MorningFeelsLike = $_.feels_like.morn DayTemperature = $_.temp.day DayFeelsLike = $_.feels_like.day EveningTemperature = $_.temp.eve EveningFeelsLike = $_.feels_like.eve NightTemperature = $_.temp.night NightFeelsLike = $_.feels_like.night MinDailyTemperature = $_.temp.min MaxDailyTemperature = $_.temp.max Pressure = $_.pressure Humidity = $_.humidity DewPoint = $_.dew_point WindSpeed = $_.wind_speed WindGust = $_.wind_gust WindDirection = $_.wind_deg CloudinessPercent = $_.clouds UVIndex = $_.uvi ProbabilityOfPrecipitation = $_.pop RainVolume = $_.rain SnowVolume = $_.snow Weather = $_.weather | Convert-Weather } } |