UncommonSense.Weather.Format.ps1xml

<Configuration>
    <ViewDefinitions>
        <View>
            <Name>Default</Name>
            <ViewSelectedBy>
                <TypeName>UncommonSense.Weather</TypeName>
            </ViewSelectedBy>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <ExpressionBinding>
                                <ScriptBlock>$_ | Format-List -Property Latitude, Longitude, @{n='DateTime'; e={$_.Current.DateTime}}, TimeZone, @{n='Weather'; e={$_.Current.Weather.Description}}, @{n='Temperature'; e={"$([decimal]::Round($_.Current.Temperature,1))$($_.TemperatureUnit); feels like $([decimal]::Round($_.Current.FeelsLike,1))$($_.TemperatureUnit)"}}, @{n='Sunrise'; e={$_.Current.Sunrise.TimeOfDay}}, @{n='Sunset'; e={$_.Current.SunSet.TimeOfDay}}| Out-String</ScriptBlock>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ScriptBlock>$_.Alerts | Format-Table | Out-String</ScriptBlock>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ScriptBlock>$_.Hourly | Select-Object -First 8 | Format-Table | Out-String</ScriptBlock>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ScriptBlock>$_.Daily | Select-Object -First 3 | Format-Table | Out-String</ScriptBlock>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </View>
        <View>
            <Name>Default</Name>
            <ViewSelectedBy>
                <TypeName>UncommonSense.Weather.Hourly</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>Hour</Label>
                        <Width>6</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>WeatherLabel</Label>
                        <Width>18</Width>
                        <Alignment>Left</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Temperature</Label>
                        <Width>12</Width>
                        <Alignment>Right</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>FeelsLike</Label>
                        <Width>12</Width>
                        <Alignment>Right</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Clouds</Label>
                        <Width>12</Width>
                        <Alignment>Right</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Probability of Precipitation</Label>
                        <Width>16</Width>
                        <Alignment>Right</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>10</Width>
                        <Alignment>Right</Alignment>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>DateTime</PropertyName>
                                <FormatString>{0:HH}:{0:mm}</FormatString>
                            </TableColumnItem>
                            <TableColumnItem>
                                <Alignment>Left</Alignment>
                                <ScriptBlock>$_.Weather.Description</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <Alignment>Right</Alignment>
                                <ScriptBlock>"$([decimal]::Round($_.Temperature,1))$($_.TemperatureUnit)"</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <Alignment>Right</Alignment>
                                <ScriptBlock>"$([decimal]::Round($_.FeelsLike,1))$($_.TemperatureUnit)"</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <Alignment>Right</Alignment>
                                <ScriptBlock>"$($_.CloudinessPercent)%"</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <Alignment>Right</Alignment>
                                <ScriptBlock>"$($_.ProbabilityOfPrecipitation * 100)%"</ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <Alignment>Right</Alignment>
                                <PropertyName>WindSpeed</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>