Create Simulated Device

I am looking for a way to create an Sensor which receive http events, like a http command.
the Background is, I have an doorbird and my doorbird send http events if motion is detected, now i want to create an motion sensor for using it in homekit, is this possible?

I hope this question is not duplicated.


If it can send POST requests then you can use a webhook trigger. HA doesn’t support GET though, so you’d need something that could intercept and rewrite that.

but webhook trigger is for automation isnt it?
I want to set an fake sensor device state.
for example,
create an fake sensor device called “Doorbell”.
if doorbell by doorbird is pressed, doorbird fire an http request to HA, now I want to set the “Doorbell” state to true,
is this possbile with webhook trigger?

Sure. That automation can turn on an input boolean, and then off again. You can use that boolean in your other automations, or wrap it in a template binary sensor.

Sorry Tinkerer, really really sorry, but I cant find any example or I don’t understand the How to, how can I realize it. :frowning: could you help me maybe, it was me a pleasure…

Heck, these days you could even use a template directly:

# Example configuration entry
  - trigger:
      - platform: webook
        webhook_id: "ding_dong_somebody_at_the_door"
      - name: doorbell_is_a_ringing
        state: on
        auto_off: '00:00:30'

That turns on binary_sensor.doorbell_is_a_ringing when something POSTs to that webhook, and then turns off 30 seconds later/


will the binary_sensor.doorbell_is_a_ringing created or have I create the sensor?

   - trigger:
       - platform: event
         event_type: "doorbird_haustur_klingelt"
       - name: doorbell_is_a_ringing
         state: on
         auto_off: '00:00:30'

I used an Event, sorry maybe i didn’t understand the complete basic,
thank your for your support and time…


What @Tinkerer showed is the definition of a (template) binary sensor.
That syntax (with a trigger) makes so that the value of the binary _sensor will change based upon an event (here,a webhook)

It’s not a “template” in the sense that you can use it in the developer tools, though.

1 Like

but where will I define this in automation yaml ? :frowning:

That goes in configuration.yaml - assuming you don’t already have a template: line there

1 Like

thank you for this information, this information I never read in the documentation I am sorry. I will now try, I will create an binary_sensor in the configuration.yml thanks

Sir Thank you thank you sooo much
Perfect now I can use it, it is awesome thank you
ahhhhh great awesome
very very awesome thank you!!!

Thanks for this great topic. I have tried it too.

When I press the doorbell button I get this message in the Log:

  • Shelly single click event for dorbell channel 1 Input was fired

The status of binary_sensor.doorbell_is_a_ringing does not change. It stays unknown.
What did I miss?

Thank you so much

can you show your configuration?