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

[Q] Virtual/Boolean Units #131

Open
michelkaeser opened this issue Nov 15, 2018 · 1 comment
Open

[Q] Virtual/Boolean Units #131

michelkaeser opened this issue Nov 15, 2018 · 1 comment

Comments

@michelkaeser
Copy link

Hi all

I am currently evaluating concepts to represent measured sensor data and I came across JSR-385 which seems to address most topics. Great stuff!

As mentioned in the title, I am however struggling to find how (virtual) boolean data can/should be represented (#115 (comment)). Virtual values in general seem to be undefined, but I would have gone with annotated units where possible (i.e. phone battery level = Units.PERCENT annotated with battery_level (or the like)).

Played around with the DimensionLess AbstractUnit.ONE and transforming 0 to false and 1 to true, but I wasn't able to get a working POC.

Possible virtual boolean sensors:

  • Presence
  • Motion
  • Dark
  • Daylight
  • ...

How would one represent such values?

@keilw
Copy link
Member

keilw commented Nov 15, 2018

@htreu, @kaikreuzer, do you have any suggestions for that based on SmartHome?

@keilw keilw transferred this issue from unitsofmeasurement/indriya Jan 1, 2019
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

No branches or pull requests

2 participants