How to automate to turn off a Z-wave switch after 2 seconds if it is on?

I have a “Aeotec ZW090 Z-Stick Gen5 EU” and a “Qubino ZMNHND1 Flush 1D relay”.
If the “Qubino ZMNHND1 Flush 1D relay” is turned on I would like to turn itself off after 2 seconds it has been on.

I have try to make an automatisation but until now it never worked.

Can somebody help me?

So You posted a big image, presumably from the automation editor…
Not sure I can help you with that but the code you need will look something like : -

automation:
    #switch off delay
  - alias: au_switch_off_delay
    trigger:
      - platform: state
        entity_id: switch.switch_my_switch
        to: 'on'
    action:
      - delay: "00:00:02"
      - service: switch.turn_off
        entity_id: switch.switch_my_switch

Depends where you implemented it as to what spacing you require.
Please read up on yaml to get an idea about this, it pays dividends.

Look carefully at the last line in your automation, where you indicate the entity_id of the light to be turned off. There is an extra : in it that should be removed.

Screenshot%20from%202019-10-02%2010-49-16

Change this:

"entity_id:":"Livingplafond2"

to this:

"entity_id":"light.livingplafond2"

In addition, if Livingplafond2 is a light, then the service you are using is incorrect.
Change this:

automation.turn_off

to this:

light.turn_off

If it is an automation, then leave it as automation.turn_off.

Finally (I think), replace friendly_name with entity_id here:
Screenshot%20from%202019-10-02%2010-57-03

Thanks, this solved everything.
:+1::facepunch:

1 Like

Err ???

"Face Punch "I hope I don’t get one of them !

I meant fistbump. overall I am very glad :laughing:

That’s good news! Please mark my post as the Solution so that other people, with similar issues, can find it more readily. Only you, the author, of this topic can tag a post with Solution. It will automatically appear as a link under your first post and a checkmark will appear next to the topic’s title (indicating it has an accepted solution).