LightScript.ps1.psm1
[include("*-*.ps1")]$PSScriptRoot if ($home) { $Script:KnownResources = @( Get-HueLight Get-HueRoom Get-NanoLeaf ) foreach ($resource in $Script:KnownResources) { if ($resource.pstypenames -contains 'Hue.Light') { Set-Alias -Name ($resource.Name -replace '\s') -Value Set-HueLight } if ($resource.pstypenames -contains 'Hue.Group' -or $resource.pstypenames -contains 'Hue.LightGroup') { Set-Alias -Name ($resource.Name -replace '\s') -Value Set-HueLight } } } |