Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change int to decimal to support more sensors #1

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

oskary
Copy link
Contributor

@oskary oskary commented Feb 27, 2024

Using a decimal instead of int should make it compatible with non Ikea sensors too, for example the Aqare Temperature and umidity Sensor T1

@hagronnestad
Copy link
Owner

Thank you! I will double check that this works with my IKEA sensor and merge after.

@hagronnestad
Copy link
Owner

I haven't noticed that the IKEA sensor doesn't even support decimal points, that's kind of bad.

I think using double instead of decimal would be more appropriate though, would you mind updating the PR?

@@ -6,7 +6,7 @@ namespace Dirigera.Models
{
public class EnvironmentSensor : Device
{
public int CurrentTemperature { get; internal set; }
public decimal CurrentTemperature { get; internal set; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think double is a more appropriate type to use.

Dirigera.Lib/Dirigera.Lib/Models/EnvironmentSensor.cs Outdated Show resolved Hide resolved
@hagronnestad hagronnestad self-assigned this Mar 2, 2024
@hagronnestad hagronnestad merged commit 55da2d5 into hagronnestad:main Mar 2, 2024
@hagronnestad
Copy link
Owner

Thank you, a new version of the Nuget package has been released: https://www.nuget.org/packages/Dirigera.Lib/1.0.6

Here's the GitHub release: https://github.com/hagronnestad/dirigera/releases/tag/1.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants