[SOLVED] Motion sensor helper

Hi everyone,

I simply want to create a motion sensor helper which displays like a regula motion sensor created by integrations (e.g. z-wave). This should be set externally via REST later.
However, I can only create a toggle which I cannot customize to be a motion sensor from the UI.
I also tried various things within the configuration.yaml like the following, whereas the input_boolean is already in place via the UI:

# Lupus wohnzimmer motion helper
    input_boolean.bewegung_wohnzimmer:
      device_class: motion

This still shows like a switch.

I also tried to create the helper manually by:

- platform: template
  sensors:
    motion_wohnzimmer:
      friendly_name: "Bewegung (Wohnzimmer)"
      device_class: motion

but a value template is needed and I just wanted this helper to be switched externally from my alarm system (Lupus).

Any suggestion if I can create a binary_sensor to be switched externally would be appreciated.

Create a rest binary sensor.

Customize it manually using YAML if you have to:

Hi Tom,
thank you!
I will look into the RESTful binary sensor approach.
Much appreciated!

Hi Tom,

I have looked into this and have some questions.
I am pretty new to HA - so please be patient with me :wink:

  1. Do I need to define both the restful binary sensor’s resource in configurations.yaml like
binary_sensor:
  - platform: rest
    resource: http://192.168.68.70/bewegung_wohnzimmer
    method: POST
  1. Do I need to create the Helper for the Motion sensor entity as well? (and later mapping both).
    Or is the motion sensor entity created automatically through the definition in 1?
  2. if 2 is true, what kind of Helper do I need to create to get a binary_sensor?
    Using a toggle creates a input_boolean

Thank you.

Quite a while ago… :wink:
I finally managed to get the state of my motion sensor into HA (using webhooks).

However, I cannot display the input_boolean as motion like all the other motion sensors.
On the other hand I cannot create a binary_sensor as a helper and even if so, I cannot turn it on, because there is no service to turn on a binary sensor.

So what kind of helper would be the best to use for the integration of an external motion sensor?

I have solved this issue with a yaml sensor:

- trigger:
    - platform: webhook
      webhook_id: HorstSchimanski
  binary_sensor:
    - name: "Bewegung (Wohnzimmer)"
      unique_id: bewegung_wohnzimmer_webhook_lupus
      state: "on"
      device_class: motion
      auto_off: 0:00:05