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

How to prevent running python_script if already running

$
0
0

@Mariusthvdb wrote:

HI,

Based on various triggers, I run a python script, to give me an overview of the triggering entities and their states. I do so for switches, lights, device_trckers, media_players, and some active threshold sensors.

they all end with:

  action:
    - delay:
        seconds: 2
    - service: python_script.summary

In a calm period in the HA system, this is no problem, but I suspect it to become an issue when several of the triggered automations pass their conditions, and run the action… with the possibility of simultaneous called actions. Which is no good of course.

Can we somehow test if a python_script is currently being run, and add that as a condition to the automations?
thanks for having a look.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95459

Trending Articles



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