Unit of Measures - Number:Illuminance: % instead lx?

Hi all,

hope you can help me!

  • Platform information:
    • Hardware: Raspberry PI 3+
    • OS: openhabian 1.4
    • Java Runtime Environment:
      openjdk version “1.8.0_152”
      OpenJDK Runtime Environment (Zulu Embedded (build 1.8.0_152-b76)
      OpenJDK Client VM (Zulu Embedded (build 25.152-b76, mixed mode, Evaluation)
    • openHAB version: 2.5 M1
  • Issue of the topic: Setting item to Number:Illuminance leads to % instead of lx

This leads to such states:
2019-04-30 17:18:03.422 [vent.ItemStateChangedEvent] - FibEye_4_SensorLuminance changed from 1072 % to 1.08E+3 %

And such more normal states:
2019-04-30 17:18:45.365 [vent.ItemStateChangedEvent] - FibEye_3_SensorLuminance changed from 107 % to 108 %

Because of the former example my rules are not triggered because they expect a pure numeric value.

So I want to ask you, is this a bug or do I something wrong?

Thanks in advance for illuminating me! :slight_smile:

What is making changes to your Item? Is it supplying any unit to qualify that?

Has your Item got any formatting in its label text, to give openHAB some clue about what is expected?

Well, you’ve defined the item to be a QuantityType, so you have to adapt your triggers, too.
(you can cast types, but I never tried using QuantityType values in triggers, dunno if that’s supposed to work)
Rethink if you really need the item to be of that type (or if a dimensionless number would do as well).

1 Like