Closed RicoSuter closed 6 months ago
Thanks for letting me know. It's fixed.
The documentation on the Hue site indicates the temperature.temperature
property is deprecated. So I removed it completely.
The temperature value can be found in Temperature.TemperatureReport.Temperature
.
This change is in version 1.5.2 which is being published to NuGet right now.
With the update I'm no longer able to access the temperature at all:
How is the report supposed to be used? Is temperature only available via push data now?
The temperature value can be found in Temperature.TemperatureReport.Temperature.
Yes, but how do I get the TemperatureReport from a TemperatureResource?
So the Temperature class should have a "TemperatureReport" property:
public class Temperature
{
[JsonPropertyName("temperature_report")]
public bool TemperatureReport { get; set; }
}
Yes, looks like the TemperatureReport was not added with the last update. I fixed it and it's being pushed to NuGet right now.
Btw, would also be nice if the ButtonResource would have the report property:
(repeat interval and event values also missing)
Just did another update with support for the new Button properties, also added support for CameraMotion, TamperSensor and ContactSensor 👍
The serialization for temperature is broken:
https://github.com/michielpost/Q42.HueApi/blob/310a8ba773eaf18c38a69d1fc00332b71b38b776/src/HueApi/Models/Sensors/TemperatureResource.cs#L15
should be "temperature" and not "motion".
Also the temperature value should be a double and not an int: