Differences
This shows you the differences between two versions of the page.
| 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] davel17 | developer: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 |
| # You could directly execute actions if they' | # You could directly execute actions if they' | ||
| indigo.device.turnOn(12345) | indigo.device.turnOn(12345) | ||