Lwr01 Google Home Automations Illumination (Lux)

Hi, trying to use the LWR01 to trigger an automation when the brightness sensor is below 100 lux. IE turn something on when it gets dark.

Can anyone confirm the YAML script syntax? Specifically what is the X in the below? Is it Illuminance? Lux? etc

Thank you!

- type: device.state.SensorState
  device: My Device - Room Name
  state: currentSensorStateData.X.rawValue
  greaterThan: 200

Hi,

We checked the Google Home Automation Script documentation. The format currentSensorStateData.X.rawValue is correct, but the value of X depends on the sensor state name exposed by the device to Google Home.

For LWR01, since the ambient light sensor reports the illuminance value (lux), you may try using LightLevel as the sensor state name in the script:

automations:
  - starters:
      - type: device.state.SensorState
        device: LWR01 - Living Room
        state: currentSensorStateData.LightLevel.rawValue
        lessThan: 100

The exact sensor state name may depend on how LWR01 is mapped in Google Home.

Brilliant this works! Is it possible to trigger when presence is detected AND it is low light levels?

Hi,

Great to hear that the LightLevel configuration works!

You can combine the LWR01 occupancy detection and the light level condition.

The following script is based on the Google Home Automation Script example for occupancy sensor lighting:
This automation will work as follows:

  1. When LWR01 detects someone → check the current light level.
  2. If the light level is below 100 lux → turn on the light.
metadata:
  name: "LWR01 Presence and Low Light"
  description: "Turn on light when presence is detected and light level is low"

automations:
  - starters:
      - type: device.state.OccupancySensing
        device: LWR01 - Room Name
        state: occupancy
        is: OCCUPIED

    condition:
      type: device.state.SensorState
      device: LWR01 - Room Name
      state: currentSensorStateData.LightLevel.rawValue
      lessThan: 100

    actions:
      - type: device.command.OnOff
        devices:
          - Light Device Name
        on: true

Please replace the device names with your actual Google Home device names.

You can also refer to the official Google Home examples for more automation script formats.

If the script cannot be saved or the occupancy condition does not work, please let us know the error message or screenshot. The exact occupancy state may depend on how LWR01 is exposed in Google Home.

THANK YOU Charles - testing it now