Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
developer:python_tips_and_tricks [2025/10/23 22:41] – [Allowing a method definition to collect an unspecified number of arguments] davel17developer:python_tips_and_tricks [2025/10/23 22:42] (current) – [Execute actions in a Trigger only on certain days of the week] davel17
Line 300: Line 300:
 # Here's an example of executing actions only on a weekend # Here's an example of executing actions only on a weekend
 if date.today().weekday() in WEEKEND: if date.today().weekday() in WEEKEND:
-    # It's a week day, so execute actions here+    # It's a weekend day, so execute actions here
     # You could directly execute actions if they're simple:     # You could directly execute actions if they're simple:
     indigo.device.turnOn(12345)  # 12345 is the ID of some on/off device     indigo.device.turnOn(12345)  # 12345 is the ID of some on/off device
  • /www/perceptive/wiki/data/attic/developer/python_tips_and_tricks.1761259301.txt.gz
  • Last modified: 2025/10/23 22:41
  • by davel17