Set properties on a specific Hive light.
Set-HiveLight [-Id] <Guid> [[-PowerState] <String>] [[-ColourMode] <String>] [[-Hue] <UInt16>]
[[-Brightness] <UInt16>] [[-ColourTemperature] <UInt16>] [-WhatIf] [-Confirm]
Update specified Hive light with new desired state that can include a combination of: Brightness, Hue, PowerState, ColourMode and ColourTemperature
# Simple script that increases the Brightness in increments of 5 until the maximum is reached and then reverses the direction and decreases the Brightness until minimum is reached and loops.
$light = Get-HiveLight | Select -First 1 $dir = $true $lux=5 while(1) { if ($lux -le 5){ $dir=$true }; if ($lux -ge 100){ $dir=$false } if ($dir){ $lux=$lux+5 } else { $lux=$lux-5 } Set-HiveLight -Id $light.id -Brightness $lux # 300ms updates, be kind to Hive API, should probably avoid lower than this! Sleep -m 300 }
Desired Brightness.
Type: UInt16
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: 5
Accept pipeline input: False
Accept wildcard characters: False
Desired mode of operation (Only for Hive ColourLight).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Desired Colour Temperature.
Type: UInt16
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: 2700
Accept pipeline input: False
Accept wildcard characters: False
Desired Hue (only for Hive ColourLight).
Type: UInt16
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Hive light node identifier.
Type: Guid
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Desired PowerState for the device.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False