Skip to content

Commit ff17d61

Browse files
Merge pull request #24 from StartAutomating/LightScriptImprovements
Light script improvements
2 parents 6f3dd18 + 3fcc673 commit ff17d61

14 files changed

+126
-31
lines changed

Add-HueLight.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
function Add-HueLight {
2+
<#
3+
.SYNOPSIS
4+
Adds lights to Hue
5+
.DESCRIPTION
6+
Adds new lights to a Hue Bridge.
7+
.EXAMPLE
8+
Add-HueLight # Search for new lights
9+
.EXAMPLE
10+
Add-HueLight -DeviceID $serialNumber # Add a new light by serial number.
11+
.EXAMPLE
12+
Add-HueLight # Search for new lights
13+
Get-HueLight -New # Get-HueLight -New will return the new lights
14+
.LINK
15+
Get-HueLight
16+
.LINK
17+
Set-HueLight
18+
#>
219

320
[CmdletBinding(SupportsShouldProcess)]
421

Add-HueLight.ps1.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
function Add-HueLight
22
{
3+
<#
4+
.SYNOPSIS
5+
Adds lights to Hue
6+
.DESCRIPTION
7+
Adds new lights to a Hue Bridge.
8+
.EXAMPLE
9+
Add-HueLight # Search for new lights
10+
.EXAMPLE
11+
Add-HueLight -DeviceID $serialNumber # Add a new light by serial number.
12+
.EXAMPLE
13+
Add-HueLight # Search for new lights
14+
Get-HueLight -New # Get-HueLight -New will return the new lights
15+
.LINK
16+
Get-HueLight
17+
.LINK
18+
Set-HueLight
19+
#>
320
[Rest("lights",
421
Invoker="Send-HueBridge",
522
Method='POST',

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.2.4.1
2+
* Adding help for Add-HueLight (#23)
3+
* Fixing other markdown documentation layout issues
4+
---
5+
6+
17
## 0.2.4
28
* Adding Add-HueLight (#18)
39
* Adding Get-HueLight -New (#21)

LightScript.HelpOut.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ if ($LightScriptLoaded) {
88
"::error:: LightScript not loaded" |Out-Host
99
}
1010
if ($LightScriptLoaded) {
11-
Save-MarkdownHelp -Module $LightScriptLoaded.Name -PassThru |
12-
Add-Member ScriptProperty CommitMessage { "Updating $($this.Name)" } -Force -PassThru
11+
Save-MarkdownHelp -Module $LightScriptLoaded.Name -PassThru
1312
}

LightScript.psd1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
ModuleVersion = '0.2.4'
2+
ModuleVersion = '0.2.4.1'
33
RootModule = 'LightScript.psm1'
44
Description = 'Smarter Lighting with PowerShell'
55
FormatsToProcess = 'LightScript.format.ps1xml'
@@ -14,6 +14,11 @@
1414
LicenseURI = 'https://github.com/StartAutomating/LightScript/blob/main/LICENSE'
1515
IconURI = 'https://github.com/StartAutomating/LightScript/blob/main/Assets/LightScript.png'
1616
ReleaseNotes = @'
17+
## 0.2.4.1
18+
* Adding help for Add-HueLight (#23)
19+
* Fixing other markdown documentation layout issues
20+
---
21+
1722
## 0.2.4
1823
* Adding Add-HueLight (#18)
1924
* Adding Get-HueLight -New (#21)

docs/Add-HueLight.md

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,64 @@
22
Add-HueLight
33
------------
44
### Synopsis
5+
Adds lights to Hue
56

6-
Add-HueLight [[-DeviceID] <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
7+
---
8+
### Description
79

10+
Adds new lights to a Hue Bridge.
811

912
---
10-
### Description
13+
### Related Links
14+
* [Get-HueLight](Get-HueLight.md)
15+
* [Set-HueLight](Set-HueLight.md)
1116
---
12-
### Parameters
13-
#### **Confirm**
14-
-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
15-
-Confirm is used to -Confirm each operation.
16-
17-
If you pass ```-Confirm:$false``` you will not be prompted.
18-
19-
20-
If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed.
17+
### Examples
18+
#### EXAMPLE 1
19+
```PowerShell
20+
Add-HueLight # Search for new lights
21+
```
22+
23+
#### EXAMPLE 2
24+
```PowerShell
25+
Add-HueLight -DeviceID $serialNumber # Add a new light by serial number.
26+
```
2127

28+
#### EXAMPLE 3
29+
```PowerShell
30+
Add-HueLight # Search for new lights
31+
Get-HueLight -New # Get-HueLight -New will return the new lights
32+
```
33+
34+
---
35+
### Parameters
2236
#### **DeviceID**
2337

38+
One or more Device Identifiers (serial numbers ).
39+
Use this parameter when adding lights that have already been assigned to another bridge.
40+
41+
42+
2443
|Type |Requried|Postion|PipelineInput|
2544
|----------------|--------|-------|-------------|
26-
|```[string[]]```|false |0 |false |
45+
|```[String[]]```|false |1 |false |
2746
---
2847
#### **WhatIf**
2948
-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
3049
-WhatIf is used to see what would happen, or return operations without executing them
31-
---
32-
### Inputs
33-
None
34-
35-
36-
---
37-
### Outputs
38-
System.Object
39-
50+
#### **Confirm**
51+
-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
52+
-Confirm is used to -Confirm each operation.
53+
54+
If you pass ```-Confirm:$false``` you will not be prompted.
55+
56+
57+
If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed.
4058

4159
---
4260
### Syntax
4361
```PowerShell
44-
syntaxItem
45-
```
46-
```PowerShell
47-
----------
48-
```
49-
```PowerShell
50-
{@{name=Add-HueLight; CommonParameters=True; parameter=System.Object[]}}
62+
Add-HueLight [[-DeviceID] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
5163
```
5264
---
5365

docs/Add-HueRoom.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ Valid Values:
8989
* Recreation
9090
* Terrace
9191
* Toilet
92+
93+
94+
9295
|Type |Requried|Postion|PipelineInput |
9396
|--------------|--------|-------|---------------------|
9497
|```[String]```|false |named |true (ByPropertyName)|
@@ -106,6 +109,9 @@ Valid Values:
106109
* LightGroup
107110
* Entertainment
108111
* Zone
112+
113+
114+
109115
|Type |Requried|Postion|PipelineInput |
110116
|--------------|--------|-------|---------------------|
111117
|```[String]```|false |named |true (ByPropertyName)|

docs/Add-HueSensor.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ Valid Values:
5959
* LightLevel
6060
* GenericFlag
6161
* GenericStatus
62+
63+
64+
6265
|Type |Requried|Postion|PipelineInput |
6366
|--------------|--------|-------|---------------------|
6467
|```[String]```|true |2 |true (ByPropertyName)|

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.2.4.1
2+
* Adding help for Add-HueLight (#23)
3+
* Fixing other markdown documentation layout issues
4+
---
5+
6+
17
## 0.2.4
28
* Adding Add-HueLight (#18)
39
* Adding Get-HueLight -New (#21)

docs/Get-NanoLeaf.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ Valid Values:
9595

9696
* Rhythm
9797
* Color
98+
99+
100+
98101
|Type |Requried|Postion|PipelineInput|
99102
|--------------|--------|-------|-------------|
100103
|```[String]```|false |named |false |

0 commit comments

Comments
 (0)