#Light switched by mqtt message

1 messages · Page 1 of 1 (latest)

true pebble
#

Hi I have used nodered to control this but my nuc died and now try to achieve the same with automation.

Here is my yaml

alias: Rfbridge gang
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.rf_bridge_sonoff_value
    to: "4924858"
    from: null
conditions: []
actions:
  - action: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.gang
  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  - action: switch.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: switch.gang
mode: parallel

Although I used mode: parallel i only runs once

I would like to restart the timer every time the trigger is received.
How do I do this?

Thanks in advance
Hans

gray spindleBOT
#

@true pebble To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

blazing rampart
#

BunkerM handles exactly this kind of setup with its watcher agents. You can set up a condition-based watcher that triggers an action and resets when new data arrives, which avoids the YAML headaches you are seeing here. It runs as one Docker container and manages everything in a web UI. https://github.com/bunkeriot/BunkerM

GitHub

🚀 BunkerM: All-in-one Mosquitto MQTT management platform, featuring dynamic security, MQTT ACL management, monitoring,and AI integrations - bunkeriot/BunkerM