Skip to content

[Q] Virtual/Boolean Units #131

@michelkaeser

Description

@michelkaeser

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions