Get the visible home(s) power production.
Get-TibberProduction [-Resolution <String>] [-From <DateTime>] [-To <DateTime>] [-Last <Int32>]
[-FilterEmptyNodes] [-Fields <String[]>] [-PersonalAccessToken <String>] [-UserAgent <String>] [-Force]
[-DebugResponse] [<CommonParameters>]
Get-TibberProduction -HomeId <String> [-Resolution <String>] [-From <DateTime>] [-To <DateTime>]
[-Last <Int32>] [-FilterEmptyNodes] [-Fields <String[]>] [-PersonalAccessToken <String>] [-UserAgent <String>]
[-Force] [-DebugResponse] [<CommonParameters>]
Get-TibberProduction [-Resolution <String>] [-From <DateTime>] [-To <DateTime>] [-Last <Int32>]
[-FilterEmptyNodes] [-Fields <String[]>] [-URI <Uri>] [-PersonalAccessToken <String>] [-UserAgent <String>]
[-Force] [-DebugResponse] [<CommonParameters>]
Calling this function will return the visible home(s) power production.
$response = Get-TibberProduction -Last 10
$maxProd = $response | Sort-Object -Property production -Descending | Select-Object -First 1
Write-Host "Max power production $($maxProd.profit) $($maxProd.currency) ($($maxProd.production) $($maxProd.productionUnit) at $($maxProd.unitPrice)): $(([DateTime]$maxProd.from).ToString('HH:mm')) - $(([DateTime]$maxProd.to).ToString('HH:mm on yyyy-MM-dd'))"
Get-TibberProduction -From ([DateTime]::Now).AddHours(-10)
Specifies the home Id, e.g. '96a14971-525a-4420-aae9-e5aedaa129ff'.
Type: String
Parameter Sets: HomeId
Aliases: Id
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the resoluton of the results.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: HOURLY
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the start date for nodes to include in results.
Type: DateTime
Parameter Sets: (All)
Aliases: After, Start
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the end date for nodes to include in results. Providing a date only, e.g. '2023-10-31', will set the time to 23:59:59.
Type: DateTime
Parameter Sets: (All)
Aliases: End
Required: False
Position: Named
Default value: [DateTime]::Now
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the number of nodes to include in results, counting from the latest entry.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 1
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Switch to filter out empty nodes (i.e. production is '0') from results.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specifies the fields to return.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: @(
'from'
'to'
'unitPrice'
'unitPriceVAT'
'production'
'productionUnit'
'profit'
'currency'
)
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
{{ Fill DebugResponse Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill Force Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill PersonalAccessToken Description }}
Type: String
Parameter Sets: (All)
Aliases: PAT, AccessToken, Token
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill URI Description }}
Type: Uri
Parameter Sets: URI
Aliases: URL
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill UserAgent Description }}
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.