Skip to content

Commit

Permalink
Merge pull request #24 from StartAutomating/LightScriptImprovements
Browse files Browse the repository at this point in the history
Light script improvements
  • Loading branch information
StartAutomating authored Jul 31, 2022
2 parents 6f3dd18 + 3fcc673 commit ff17d61
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 31 deletions.
17 changes: 17 additions & 0 deletions Add-HueLight.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
function Add-HueLight {
<#
.SYNOPSIS
Adds lights to Hue
.DESCRIPTION
Adds new lights to a Hue Bridge.
.EXAMPLE
Add-HueLight # Search for new lights
.EXAMPLE
Add-HueLight -DeviceID $serialNumber # Add a new light by serial number.
.EXAMPLE
Add-HueLight # Search for new lights
Get-HueLight -New # Get-HueLight -New will return the new lights
.LINK
Get-HueLight
.LINK
Set-HueLight
#>

[CmdletBinding(SupportsShouldProcess)]

Expand Down
17 changes: 17 additions & 0 deletions Add-HueLight.ps1.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
function Add-HueLight
{
<#
.SYNOPSIS
Adds lights to Hue
.DESCRIPTION
Adds new lights to a Hue Bridge.
.EXAMPLE
Add-HueLight # Search for new lights
.EXAMPLE
Add-HueLight -DeviceID $serialNumber # Add a new light by serial number.
.EXAMPLE
Add-HueLight # Search for new lights
Get-HueLight -New # Get-HueLight -New will return the new lights
.LINK
Get-HueLight
.LINK
Set-HueLight
#>
[Rest("lights",
Invoker="Send-HueBridge",
Method='POST',
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.4.1
* Adding help for Add-HueLight (#23)
* Fixing other markdown documentation layout issues
---


## 0.2.4
* Adding Add-HueLight (#18)
* Adding Get-HueLight -New (#21)
Expand Down
3 changes: 1 addition & 2 deletions LightScript.HelpOut.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ if ($LightScriptLoaded) {
"::error:: LightScript not loaded" |Out-Host
}
if ($LightScriptLoaded) {
Save-MarkdownHelp -Module $LightScriptLoaded.Name -PassThru |
Add-Member ScriptProperty CommitMessage { "Updating $($this.Name)" } -Force -PassThru
Save-MarkdownHelp -Module $LightScriptLoaded.Name -PassThru
}
7 changes: 6 additions & 1 deletion LightScript.psd1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
ModuleVersion = '0.2.4'
ModuleVersion = '0.2.4.1'
RootModule = 'LightScript.psm1'
Description = 'Smarter Lighting with PowerShell'
FormatsToProcess = 'LightScript.format.ps1xml'
Expand All @@ -14,6 +14,11 @@
LicenseURI = 'https://github.com/StartAutomating/LightScript/blob/main/LICENSE'
IconURI = 'https://github.com/StartAutomating/LightScript/blob/main/Assets/LightScript.png'
ReleaseNotes = @'
## 0.2.4.1
* Adding help for Add-HueLight (#23)
* Fixing other markdown documentation layout issues
---
## 0.2.4
* Adding Add-HueLight (#18)
* Adding Get-HueLight -New (#21)
Expand Down
68 changes: 40 additions & 28 deletions docs/Add-HueLight.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,64 @@
Add-HueLight
------------
### Synopsis
Adds lights to Hue

Add-HueLight [[-DeviceID] <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
---
### Description

Adds new lights to a Hue Bridge.

---
### Description
### Related Links
* [Get-HueLight](Get-HueLight.md)
* [Set-HueLight](Set-HueLight.md)
---
### Parameters
#### **Confirm**
-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
-Confirm is used to -Confirm each operation.

If you pass ```-Confirm:$false``` you will not be prompted.


If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed.
### Examples
#### EXAMPLE 1
```PowerShell
Add-HueLight # Search for new lights
```

#### EXAMPLE 2
```PowerShell
Add-HueLight -DeviceID $serialNumber # Add a new light by serial number.
```

#### EXAMPLE 3
```PowerShell
Add-HueLight # Search for new lights
Get-HueLight -New # Get-HueLight -New will return the new lights
```

---
### Parameters
#### **DeviceID**

One or more Device Identifiers (serial numbers ).
Use this parameter when adding lights that have already been assigned to another bridge.



|Type |Requried|Postion|PipelineInput|
|----------------|--------|-------|-------------|
|```[string[]]```|false |0 |false |
|```[String[]]```|false |1 |false |
---
#### **WhatIf**
-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
-WhatIf is used to see what would happen, or return operations without executing them
---
### Inputs
None


---
### Outputs
System.Object

#### **Confirm**
-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
-Confirm is used to -Confirm each operation.

If you pass ```-Confirm:$false``` you will not be prompted.


If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed.

---
### Syntax
```PowerShell
syntaxItem
```
```PowerShell
----------
```
```PowerShell
{@{name=Add-HueLight; CommonParameters=True; parameter=System.Object[]}}
Add-HueLight [[-DeviceID] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
---

Expand Down
6 changes: 6 additions & 0 deletions docs/Add-HueRoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ Valid Values:
* Recreation
* Terrace
* Toilet



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |named |true (ByPropertyName)|
Expand All @@ -106,6 +109,9 @@ Valid Values:
* LightGroup
* Entertainment
* Zone



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |named |true (ByPropertyName)|
Expand Down
3 changes: 3 additions & 0 deletions docs/Add-HueSensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ Valid Values:
* LightLevel
* GenericFlag
* GenericStatus



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|true |2 |true (ByPropertyName)|
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.4.1
* Adding help for Add-HueLight (#23)
* Fixing other markdown documentation layout issues
---


## 0.2.4
* Adding Add-HueLight (#18)
* Adding Get-HueLight -New (#21)
Expand Down
3 changes: 3 additions & 0 deletions docs/Get-NanoLeaf.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ Valid Values:

* Rhythm
* Color



|Type |Requried|Postion|PipelineInput|
|--------------|--------|-------|-------------|
|```[String]```|false |named |false |
Expand Down
6 changes: 6 additions & 0 deletions docs/Set-HueLight.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ Valid Values:

* colorloop
* none



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |named |true (ByPropertyName)|
Expand All @@ -193,6 +196,9 @@ Valid Values:
* select
* lselect
* none



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |named |true (ByPropertyName)|
Expand Down
6 changes: 6 additions & 0 deletions docs/Set-NanoLeaf.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ Valid Values:
* Highlight
* Custom
* Static



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |11 |true (ByPropertyName)|
Expand All @@ -254,6 +257,9 @@ Valid Values:

* Rhythm
* Color



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |13 |true (ByPropertyName)|
Expand Down
6 changes: 6 additions & 0 deletions docs/Set-Pixoo.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ Valid Values:
* Cloud
* Visualizer
* Custom



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |8 |true (ByPropertyName)|
Expand All @@ -140,6 +143,9 @@ Valid Values:
* Stop
* Start
* Reset



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |9 |true (ByPropertyName)|
Expand Down
3 changes: 3 additions & 0 deletions docs/Set-Twinkly.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ Valid Values:
* movie
* playlist
* rt



|Type |Requried|Postion|PipelineInput |
|--------------|--------|-------|---------------------|
|```[String]```|false |9 |true (ByPropertyName)|
Expand Down

0 comments on commit ff17d61

Please sign in to comment.