Skip to content

Commit 6a16217

Browse files
authored
Merge pull request #8 from PepperDash/friendly-scene-name
fix: uses the id now instead of the name to recall scene
2 parents be151d7 + 2b89711 commit 6a16217

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/LightingGatewayConfig.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Collections.Generic;
2-
using PepperDash.Essentials.Core.Lighting;
32

43
namespace PoeTexasCorTap
54
{
@@ -14,10 +13,4 @@ public LightingGatewayConfig()
1413
Scenes = new List<LightingSceneConfig>();
1514
}
1615
}
17-
18-
public class LightingSceneConfig
19-
{
20-
public string Name { get; set; }
21-
public string Id { get; set; }
22-
}
2316
}

src/LightingSceneConfig.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace PoeTexasCorTap
2+
{
3+
public class LightingSceneConfig
4+
{
5+
public string Name { get; set; }
6+
public string Id { get; set; }
7+
}
8+
}

src/LightingSceneExt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static HttpClientRequest GetRequestForScene(this LightingScene scene, str
1111
{
1212
var request = new HttpClientRequest { RequestType = RequestType.Put };
1313
request.Header.SetHeaderValue("Content-Type", "application/json");
14-
request.Url.Parse("http://" + hostname + "/v2/scenes/invoke?name=" + scene.Name);
14+
request.Url.Parse("http://" + hostname + "/v2/scenes/invoke?name=" + scene.ID);
1515

1616
Debug.Console(2, "PoeTexasCorTap {0}", new String('-', 80));
1717
Debug.Console(2, "PoeTexasCorTap:LightingSceneExt:HttpClientRequest: RequestType = {0}", request.RequestType);

src/PoeTexasCorTap.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
<Compile Include="LightingGatewayFactory.cs" />
9494
<Compile Include="LightingGatewayJoinMap.cs" />
9595
<Compile Include="LightingGatewayStatusMonitor.cs" />
96+
<Compile Include="LightingSceneConfig.cs" />
9697
<Compile Include="LightingSceneExt.cs" />
9798
<Compile Include="Properties\AssemblyInfo.cs" />
9899
<None Include="Properties\ControlSystem.cfg" />

0 commit comments

Comments
 (0)