diff --git a/README.md b/README.md index 5982bdf..dd0295c 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The bridge is designed to parse the following events. (If you are missing an eve | --- | --- | | `BUTTON` | This event is triggered when a button on a Hue Dimmer Switch, Hue Button or an other similar device is pressed. The button_state is `1` as long the as the button is pressed and `0` when released.

Note that for BUTTON events, the `{item_state}` has a format of `{button_number}/{button_state}`. This is because a single hue accessory can have multiple buttons.

Example: `hue_event/sensors/29/1/1`| | `MOTION` | This event is triggered when motion is detected by a Hue motion sensor. The state is `1` when motion is detected and `0` when no motion is detected.

Example: `hue_event/sensors/34/1`| -| `LIGHT_LEVEL` | This event is triggered when the light level changes on a Hue light sensor. The state represents the current light level. To get the actual brightness in Lux, use this formula: 2.718281828459^(value*0.00023034)-1

Example: `hue_event/sensors/35/10597`| +| `LIGHT_LEVEL` | This event is triggered when the light level measured by a Hue motion sensor changes. The state represents the current light level in Lux.

Example: `hue_event/sensors/35/230` = 230 Lux | | `TEMPERATURE` | This event is triggered when the temperature changes on a Hue motion sensor. The state represents the current temperature as a float value.

Example: `hue_event/sensors/36/25.36` = 25.36°C| | `LIGHT` | This event is triggered when the state of a light changes. The state is `1` when the light is on and `0` when the light is off.

Example: `hue_event/lights/4/1`| | `GROUPED_LIGHT` | This event is triggered when the state of a light group changes. The state is `1` when the group is on and `0` when the group is off.

Example: `hue_event/groups/3/0`| diff --git a/hue2lox.py b/hue2lox.py index 78b49fb..31ca4cd 100644 --- a/hue2lox.py +++ b/hue2lox.py @@ -43,7 +43,7 @@ def parse_event(event_type, item): item_id = item.id_v1 elif item.type.name == "LIGHT_LEVEL": - item_state = item.light.light_level + item_state = int(10 ** (item.light.light_level / 10000)) - 1 item_id = item.id_v1 elif item.type.name == "TEMPERATURE":