2024年11月23日星期六 下午6:51:10

Using Choose instead of multi if else

5 个月 前
#39340 引用
Using  Choose instead of multi if else


Using multiple Choose actions allows the automation to evaluate each option (or group of options) and execute their sequences of actions independently:



https://zhuanlan.zhihu.com/p/704572062




https://community.home-assistant.io/t/multiple-actions-with-different-conditions/411892/6?u=msly
0
5 个月 前
#39341 引用


alias: >-
  global | A - every 1 minute time-pattern-trigger - auto turn off light when
  Using Choose instead of multi if else
description: >-
  https://www.home-assistant.io/docs/automation/trigger/#time-pattern-trigger
  https://community.home-assistant.io/t/difference-choose-and-if/536425
  http://localhost:4999/boards/topic/29089/global-a-every-1-minute-time-pattern-trigger-auto-turn-off-light-when-only-if-else#39331
trigger:
  - platform: time_pattern
    minutes: /1
condition: []
action:
  - choose:
      - conditions: []
        sequence: []
        alias: ooo
      - conditions: []
        sequence: []
        alias: ooo2
      - conditions: []
        sequence: []
        alias: ooo3
mode: single


0