Motion-activated LED light - use energy consumption as "motion detection sensor"

Hi!
I have some motion-activated LED floodlights outside my house.
These are powered via a Shelly Pro4PM between sunset and sunrise, to save on standby energy, which is 3.7W - measured by the Pro4PM.
If one or more of these get activated during the night, drawn power raises up to 12-50W, depending on the number of lights “ON”. This clearly indicates movement outside.

Now, for my question:

  • How can I transfer the power-level (ABOVE 4W) to a binary Sensor Signal similar to a Shelly Motion sensor (TRUE / FALSE) and have this being available as an entity?

Hi !
You could give a try with a template binary sensor.

I have a similar use case with a binary sensor to check if the washing machine is on or not with power consumption read from a zigbee plug.

Let’s say your 4PM power sensor has name : sensor.4PM_power

template:
  - binary_sensor:
    - name: outside_motion
      state: >-
        {{ states('sensor.4PM_power')|float(default=0) > 4 }}
      device_class: motion

This binary_sensor.outside_motion will go to on each time the power of the 4PM will be above 4W. And with the added device_class it will be seen as a motion sensor.

You can also add some delay_on/delay_off to “smooth” the states changes in case it’s flapping just around 4W.

  • delay_on is the delay that the condition will have to be true before the binary_sensor goes to ON/TRUE
  • delay_off is the delay that the condition will have to be false before the binary_sensor goes to OFF/FALSE

Some doc :

Works perfectly great - thanks a lot!

1 Like