Skip to content

Commit

Permalink
support for ZHAThermostat
Browse files Browse the repository at this point in the history
  • Loading branch information
MadMonkey87 committed Nov 23, 2019
1 parent 2e3ef0b commit a36af3c
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion InnerCore.Api.DeConz/InnerCore.Api.DeConz.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Philippe Wechsler</Authors>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Company>InnerCore</Company>
<Version>1.2.1</Version>
<Version>1.2.2</Version>
<RepositoryUrl>https://github.com/MadMonkey87/InnerCore.Api.DeConz</RepositoryUrl>
<PackageProjectUrl>https://github.com/MadMonkey87/InnerCore.Api.DeConz</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/MadMonkey87/InnerCore.Api.DeConz/blob/master/LICENSE.txt</PackageLicenseUrl>
Expand Down
4 changes: 2 additions & 2 deletions InnerCore.Api.DeConz/InnerCore.Api.DeConz.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package >
<metadata>
<id>InnerCore.Api.DeConz</id>
<version>1.2.1</version>
<version>1.2.2</version>
<title>InnerCore.Api.DeConz</title>
<authors>Philippe Wechsler</authors>
<owners>Philippe Wechsler</owners>
<licenseUrl>https://github.com/MadMonkey87/InnerCore.Api.DeConz/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/MadMonkey87/InnerCore.Api.DeConz</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A simple library to communicate with DeConz Zigbee Gateway</description>
<releaseNotes>improved switch and vibration sensor handling</releaseNotes>
<releaseNotes>support for thermostats</releaseNotes>
<copyright>Copyright 2019 Philippe Wechsler</copyright>
<tags>deconz zigbee sensor</tags>
<repository type="GitHub" url="https://github.com/MadMonkey87/InnerCore.Api.DeConz" />
Expand Down
1 change: 1 addition & 0 deletions InnerCore.Api.DeConz/Models/Sensors/Sensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Sensor :
ZHAPresence,
ZHASwitch,
ZHATemperature,
ZHAThermostat,
ZHAPressure,
ZHAAlarm,
ZHACarbonMonoxide,
Expand Down
4 changes: 4 additions & 0 deletions InnerCore.Api.DeConz/Models/Sensors/SensorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class SensorConfig :
ZHAPresenceConfig,
ZHASwitchConfig,
ZHATemperatureConfig,
ZHAThermostatConfig,
ZHAPressureConfig,
ZHAAlarmConfig,
ZHACarbonMonoxideConfig,
Expand Down Expand Up @@ -88,5 +89,8 @@ public class SensorConfig :

[JsonProperty("temperature")]
public int? Temperature { get; set; }

[JsonProperty("heatsetpoint")]
public int? HeatSetPoint { get; set; }
}
}
4 changes: 4 additions & 0 deletions InnerCore.Api.DeConz/Models/Sensors/SensorState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class SensorState : ICommandBody,
ZHAPresenceState,
ZHASwitchState,
ZHATemperatureState,
ZHAThermostatState,
ZHAPressureState,
ZHAAlarmState,
ZHACarbonMonoxideState,
Expand Down Expand Up @@ -119,5 +120,8 @@ public class SensorState : ICommandBody,

[JsonProperty("current")]
public int? Current { get; set; }

[JsonProperty("on")]
public bool? On { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ public interface ZHATemperatureState : IGeneralSensorState
/// Current temperature in 0.01 degrees Celsius. (3000 is 30.00 degree) Bridge does not verify the range of the value.
/// </summary>
int? Temperature { get; set; }

bool? On { get; set; }
}
}
7 changes: 7 additions & 0 deletions InnerCore.Api.DeConz/Models/Sensors/Zigbee/ZHAThermostat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace InnerCore.Api.DeConz.Models.Sensors.Zigbee
{
public interface ZHAThermostat: IGeneralSensor
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace InnerCore.Api.DeConz.Models.Sensors.Zigbee
{
public interface ZHAThermostatConfig : IGeneralSensorConfig
{
/// <summary>
/// Target temperature in 0.01 degrees Celsius. (3000 is 30.00 degree)
int? HeatSetPoint { get; set; }
}
}
15 changes: 15 additions & 0 deletions InnerCore.Api.DeConz/Models/Sensors/Zigbee/ZHAThermostatState.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace InnerCore.Api.DeConz.Models.Sensors.Zigbee
{
public interface ZHAThermostatState : IGeneralSensorState
{
/// <summary>
/// Current temperature in 0.01 degrees Celsius. (3000 is 30.00 degree) Bridge does not verify the range of the value.
/// </summary>
int? Temperature { get; set; }

/// <summary>
/// Heating on/off
/// </summary>
bool? On { get; set; }
}
}

0 comments on commit a36af3c

Please sign in to comment.