Change the state of a device manually SNZB-03P

Hello I’ve got a SNZB-3P sonoff motion and light sensor. I’m using it via zbee2qtt, the issue I have with the zbee2mqtt is the light sensor only changes state once motion is detected.
So to put it in perspective I want a light to switch on in my wardrobe when its dark. So if the state of the sensor is in the “light” state and I walk into the room when its dark the light wont switch on because the state of the sensor is set to “light”. However it will work if I renter the room because now the state has changed to dim, but a the same time the light sensor now changes to light state because the light is on. I can get around it by adding a time delay but it feels weird walking into a room and there’s a delay. The native sonoff app works as it should but that means I need to purchase another hub for one sensor. Just wondering if I can change the value of the sensor manually or there is any creative way to get around this.
Thanks in advance
Here is my yaml file as reference:

alias: WIR Auto Light
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.front_sensor_illumination
    to: dim
conditions:
  - condition: state
    entity_id: binary_sensor.front_sensor_occupancy
    state: "on"
actions:
  - type: turn_on
    device_id: 33f729336c4fe71232ecb9c5083c6043
    entity_id: d635116d2c6292baaedc4cb9937300a7
    domain: switch
  - wait_for_trigger:
      - type: not_occupied
        device_id: ae157f23b5bc7183dec33d5bda1f7f8b
        entity_id: 062e3f62323f8ff39104cafef512f529
        domain: binary_sensor
        trigger: device
        for:
          hours: 0
          minutes: 0
          seconds: 5
  - type: turn_off
    device_id: 33f729336c4fe71232ecb9c5083c6043
    entity_id: d635116d2c6292baaedc4cb9937300a7
    domain: switch
mode: single

Have you considered triggering the light on motion instead?

Yes that what I did first…and that’s where i added a delay of 0.7s(the lowest) so that when it detected motion it would detect whether it was dim or light. I know 0.7secs is not long but still enough time for you to walk into room while it is black.

You should maybe do some experiments to understand what the response times are like. Use Development Tools → Template or write automations that generate output using {{ now() }}.

What you’re trying to do seems to me like it requires some understaning of what happens with the sensors. That’s what drives my suggestion above.

I will have to read up on how to do that, I’m still thumbling my way through…the actual zigbee documentation SONOFF SNZB-03P control via MQTT | Zigbee2MQTT says that’s the way it works. Don’t you think that’s quite strange?

I’m not sure what you mean when you ask if I think it’s strange. I read your original post in its entirety, and just did so again. Perhaps you can ask a more specific question?

Sorry what I meant to ask is what good is a sensor that detects light only when motion is detected.
It almost makes the light sensor irrelevant. The native integration works as it should the light sensor changes light state regardless whether motion is detected or not. My original request was is there a possibility to force the light sensor to the state of “bright” each time the light switches on. If the state is set to “bright” and when motion is detected and its dark the sensor will change to dim and the light will switch on. At that time the state should reset to “bright”. Cycle repeats if the room is dark. If the room is bright then the light wont switch on. Hope I explained it better.

Your sensor most likely reports each time it detects a change–whether that’s an illuminance change or a motion change.

I don’t think you need a hardware change–at least not based on what you’ve posted so far.

Have you tried to write targeted test automations that are based on illuminance and motion, separately, to understand what the sensor does? Or, alternatively (and more efficiently) to observe the same in Developer Tools → States?

Just checked states in development tools and wrote basic automation just using illumination and can confirm that illumination does not change state from bright to dark i.e. moved sensor into a dark room from a bright room and the illumination only changed state once it detected motion. From the zigbee documentation this is normal behavior.I’d like to force its state.

I hear you. I am still not sure what you want to accomplish?

For background, if it helps: I have a bunch of sensors that report both motion and illuminance.

I trust the motion values; the sensors correctly report when they detect motion. They are programmed to do so.

Illuminance is different. I don’t trust the sensor to have the right illuminance value when the sensor is triggered by motion. The sensors are programmed to report illuminance when they detect it changes.

Not sure if the above helps; but I doubt your original post will prompt useful responses unless someone else has had the same exact experience as you and can draw on additional information.

It sounds like you have individual sensors, one for motion and one for illuminance? mine is one sensor that does both.