Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95445

Repeating a service (or script)?

$
0
0

@alexmo wrote:

Hello,
There is an option to run a service (or script) in loop ?
Means, can the service repeat 10 times (without a delay) ?

The following is my automation that play a shot sound, and I wants to repeat this sound for 10 times.

- alias: 'The house was flooded with water notification'
  trigger:
    platform: state
    entity_id:
      - binary_sensor.storage_water_sensor
    from: 'off'
    to: 'on'
  action:
    - service: media_player.play_media
      data:
        entity_id: media_player.alex_s_echo_dot
        media_content_type: sound
        media_content_id: amzn_sfx_church_bell_1x_02

Please advice.

Thanks.

Posts: 12

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 95445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>