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

Aeotec HEM Gen5 (2 Phase) Driver attributes should be numbers not strings #6

Open
idallen opened this issue Dec 3, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@idallen
Copy link

idallen commented Dec 3, 2022

Describe the bug
If you want to use Rule Machine with this device, change all the attribute declarations from string to number or else Rule Machine will generate errors trying to compare numbers to strings.

To Reproduce
In Rule Machine, under Manage or Create Conditions I choose Aeotek Energy Meter Gen5. I set an Energy level of 0.5 to compare with and try different Comparison operators to see what happens; some of the results don't make sense, e.g.

Energy level of 22 Oak Aeotec Energy Meter Gen5(18.571) is > 0.5 FALSE
Energy level of 22 Oak Aeotec Energy Meter Gen5(18.571) is >= 0.5 FALSE

In the log file I see the errors, e.g.:

error invalid operand type for 18.571(string) > 0.5(number)

Expected behavior
If you change the declaration of all the attributes from string to number, things work as expected in Rule Machine.

Hub:

  • Hardware Rev: C7
  • Software Version: 2.3.4.116
  • Driver/App Version: 0.1.4
  • Device Firmware Version (if driver): any
@idallen idallen added the bug Something isn't working label Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant