Sonoff Presence Sensor - SNZB-06P - No Light Level

Hi Guys,

I was trying to set one of these up today in the folks house and it is connecting in fine but it is not showing any light level in the sensors.

All it is showing is Motion & Occupancy.

I was looking on the Sonoff website and they say that light level is available but perhaps this isn’t being sent over to Home Assistant?

I have the Sonoff Universal Zigbee 3.0 Dongle attached to HA to connect my devices and have several light switches connected so far and working fine.

This is my HA versions:

  • Core 2024.1.5
  • Supervisor 2023.12.1
  • Operating System 11.4
  • Frontend 20240104.0

Anyone else used these devices and have an available light level?

Cheers,
Mac

Hi guys,

The bearded tinkerer replied to me on this in YT.

Currently the light level is only available in Z2M but not yet ZHA, and obviously via the Sonoff hub if you’re connected that way.

I didn’t realise that Z2M offered extra sensor data for these newer devices, I might have to read up on how to set it up and access this extra sensor data.

Thanks

1 Like

Hi guys,

I updated the setup to use Z2M and added all the devices again.

I can now see the luminance, albeit very limited as it appears to only give bright & dim.

However, I was still trying to use this in an automation to turn on the light if occupancy was detected and the illuminance was dim.

For some reason I cannot access the illuminance value within the automation, it’s really odd.

Has anyone seen this before?


Cheers,
Mac

Hi Mac, et al.

I find myself in the same situation as you, I’m trying to use the ‘brightness’ and ‘presence’ of the SNZB-06P in an a light automation, it would be a really neat automation.

The documentatioin I reviewed

states that the brightness is only updated when presence is detected so using it in an automation will not be straightforward

If I find a way round this I’ll share it

regards
Chris

1 Like

Were you able to use it in an automation when also presence is detected?

I found that i could use {"illumination": ""} and bright / dim in the link you posted, but i don’t know yaml well enough to use this info.

greetings

Anyone facing the issue where the Occupied to Unoccupied just doesn’t change? It either takes forever or it doesn’t happen at all.

1 Like

Yes, this is happening to me. It usually involves me having to plug it out and in again.

I am currently running Z2M with the Sky Connect adapter and having lots of issues, this being one of them.

The same problem was happening in the folks house so I switched out the Sky Connect adapter for the Sonoff Dongle E and the issues were resolved… Switching the adapter in my own house is my next approach.

What adapter are you using?

Can confirm the exact same issues using HA green, sky connect via Z2M. The luminance detection hasn’t been very accurate. Had an issue with the occupancy status being stuck and had to manually reconnect for it to work.

I too am disappointed with the performance of this sensor. I did not expect that with a constant connection to the network it would be less functional than the Acuara sensor that is powered by batteries.

I have this presence sensor in my kitchen. If the ceiling fan is on it shows Occupied. Once the fan is turned off, it works normally. The luminance detection has not been at all useful.

I just set this sensor up in my house with an almost identical configuration, though my OS is version 13.2 (I didn’t check the other versions), and I don’t have Z2M installed.

I stumbled upon the same issue of the luminance value not being accessible from the automations ‘Devices’ dropdown.
However, I did find it under ‘Entities’ as ‘SONOFF SNZB-06P Last illumination state’, and I could use it as a condition to check for turning a LED strip on when presence is detected.
I just tested this, and everything works as intended: the light turns on when entering the room if it is dark, and doesn’t turn on otherwise.
I wish the light level measurement was more refined than simply dark and light, but this seems to work well enough for the room it is in.

Here’s a screenshot of the working condition (forgive the italian titles, for the life of me I couldn’t manage to switch the app to english):

Should it be useful for anyone, this is the YAML view of that:

condition: state
entity_id: sensor.sonoff_snzb_06p_last_illumination_state
state: Dark

Grazie mille, Francesco! This works. However the light state of the sensor is only updated when the presence sensor changes state, so using this entity in the conditions of the automation does not work as intended for me as the light state is incorrect when the automation is started. Did you find a solution to this issue?

For now I’m using this workaround:

My use case is as follows: when someone enters the bathroom, I want a LED strip under my sink to dimly turn on only if the room is dark (eg. at night time). If the room is lit (be it by the sun or by the ceiling lamp, which is not smart… yet), nothing should happen.

By simply setting the light state as a condition for the automation (as shown in my screenshot above), this works flawlessly for me. I can only assume that the sensor effectively updates the light state only when presence is detected, but fast enough to be picked up by the condition right after.
I’m dabbling with HA for the very first time, so everything I do is as bog standard and vanilla as it can be, I don’t think I set up anything in a way that makes it work differently from other setups.

Also, looking at your automation I’m not sure I uderstand what you’re trying to achieve: it looks to me like you want to turn on a lamp when presence is detected, then wait 1 second to check if the room is lit, in which case you turn the lamp back off? Again, total noob here, so I’ll be happy to be schooled!

I’m an absolute beginner in Home Assistant. I tried using a condition like your screenshot, but for me it did not work as the condition seems to be checked before the motion detection can update the light state. That is why I’m using this workaround, to wait a little while so the light state can be updated.

If the updated light state is ‘bright’ I turn off the lights again, as they are not needed. If it is ‘dark’ I need the lights so → do nothing (lights are already on).

I’ll update back if I find another solution to this/fix my setup, since it’s working for you.

I was able to improve my workaround by lots of trial and error.

The issue is, the light state is only updated when presence is detected. So if it says “dark” and you leave the room and outside its sunrise and enough light is coming in the window, the state changes to “light” and you enter the room again after the presence has been cleared, it will still trigger the lights. I was able to reproduce this reliably by turning on the conventional lights at night when leaving the room, waiting for the presence to clear and re-entering the room. 1 millisecond is enough for the light state to be updated, so here is my improved workaround for this issue:

I bought this sensor today, it has FW-version 1.0.6 and it seems the behavior has changed. The “Last Illumination State” is not updated when movement is detected. So, using it to switch on lamps appears useless as it will not check whether it is daylight or not…
Seems like a crappy device…

@epkulse I’m using the Ikea Vallhorn sensor to detect the light state for now (which it gives me in lux), about 10 bucks. Maybe you can try that one.

I have the same, I have been in dialogue with Sonoff and requested firmware change so that the Illumination State is reported frequently as it is anyway powered so no need to limit communication.
In the meantime I use the Ikea Vallhorn…