Initiates (Probe) Outdoor Motion Detector

If you have the time I can install Teamviewer might be easier.

entities change when I move in front of the motion detectors trigger the devices _burglar _alarm_level

what does that mean?
“swave.represent…” and “sensor.everspring…” states pages showing the attributes too.

!

!
!

We can continue tomorrow, If you have time
Thank you Finity

i need to know what the values are for “_burglar” & “_alarm_level” for both conditions when the devices are triggered and not triggered (idle not detecting motion).

I think the easiest thing to do right now is to just create a new binary sensor with the entities that are actually changing when you trigger the device. Once we get the device to a state that you can actually use it in automations or see it working in the frontend then if you want to try further to get the binary sensor created by the device working that can be an option.

So if you can give me the values triggered and not-triggered then I can help you create a sensor you can use right now.

Thanks for the trust in me to offer to use Teamviewer but I think we can get you running without it for now. :grinning:

Hi again Finity,
detector burglar when the devices are triggered is 8 without 0 (only one that changes when the devices are triggered)
the others alarm_level happens nothing triggered 0 without 0

As a Eversprint SP816 (I go to sleep) :grinning:

try these sensors:

binary_sensor:
  - platform: template
    sensors:
      everspring_motion_1_template:
        friendly_name: "Everspring Sensor 1 Motion Template"
        device_class: motion
        value_template: "{{ states('sensor.everspring_sp816_outdoor_motion_detector_burglar') | float = 8 }}"
      everspring_motion_2_template:
        friendly_name: "Everspring Sensor 2 Motion Template"
        device_class: motion
        value_template: "{{ states('sensor.everspring_sp816_outdoor_motion_detector_burglar_2') | float = 8 }}"

these will create two binary sensors:

“binary_sensor. everspring_motion_1_template”
“binary_sensor. everspring_motion_2_template”

that will show “Detected” when the sensor triggers and “Clear” when there is no motion.

You can modify the details in the code as you see fit but at least try it the way I have it written first just to make sure I didn’t screw something up.

At least that will get you to a point that you can use the binary sensor that this creates to trigger an automation or whatever you want to use it for.

let me know if you have any troubles with the code above.

Something that is wrong in automation.yaml

you need to put the code above in the section for your binary_sensor’s not in your automation.yaml.

if you already have a binary_sensor: section in your configuration.yaml section add the code above to it but remove the first line (the “binary_sensor:” part). If you don’t already have a binary_sensor: section then just copy the whole thing into your configuration.yaml file.

Log error

Log Details (ERROR)

Fri Apr 19 2019 01:22:05 GMT+0200 (centraleuropeisk sommartid)

Invalid config for [binary_sensor.template]: invalid template (TemplateSyntaxError: expected token ‘end of print statement’, got ‘=’) for dictionary value @ data[‘sensors’][‘everspring_motion_1_template’][‘value_template’]. Got “{{ states(‘sensor.everspring_sp816_outdoor_motion_detector_burglar’) | float = 8 }}” invalid template (TemplateSyntaxError: expected token ‘end of print statement’, got ‘=’) for dictionary value @ data[‘sensors’][‘everspring_motion_2_template’][‘value_template’]. Got “{{ states(‘sensor.everspring_sp816_outdoor_motion_detector_burglar_2’) | float = 8 }}”. (See ?, line ?). Please check the docs at Template - Home Assistant

Anslutning tappad. Ansluter igen…


oops sorry:

binary_sensor:
  - platform: template
    sensors:
      everspring_motion_1_template:
        friendly_name: "Everspring Sensor 1 Motion Template"
        device_class: motion
        value_template: "{{ states('sensor.everspring_sp816_outdoor_motion_detector_burglar') | float == 8 }}"
      everspring_motion_2_template:
        friendly_name: "Everspring Sensor 2 Motion Template"
        device_class: motion
        value_template: "{{ states('sensor.everspring_sp816_outdoor_motion_detector_burglar_2') | float == 8 }}"

I needed to add another “=” in the template.

Now works

:tada::tada::tada::grinning:

2 trigger but not1

Finally good job Finity
can sleep well tonight :smiley:

has wake up sensor and both trigger

can we continue tomorrow? I’m tired .
thanks :slightly_smiling_face:

Hi again Finity,
I try to figure out how the templating works but it is difficult to understand how to works. Has read Template sensor but it is difficult.
How to configure templete sensor to trigger my switches. have tried a bit with HA Templates its correct?

- platform: template
 sensors:
   everspring_motion_1_template:
     friendly_name: "Everspring Sensor 1 Motion Template"
     device_class: motion
     value_template: "{{ states('sensor.everspring_sp816_outdoor_motion_detector_burglar') | float == 8 }}"
     turn_on:
          service: switch.turn_on
          data:
            entity_id: switch.telldus_tzwp_100_plug_in_switch_switch

You need to use the binary_sensor that was created in an automation to operate the switch.

Check out the “automating Home Assistant” section of the docs.

Thank you Finity for everything. I will try :grinning:

1 Like