2024年11月24日星期日 上午12:42:02

input_select

7 个月 前
#30861 引用
input_select
0
7 个月 前
#30862 引用
script:

# Starta radion i köket
  turn_on_radio:
    alias: "Alexa: Starta radion i köket"
    sequence:
      - service: input_select.select_option
        data_template:
          entity_id: input_select.chromecast_audio_kitchen
          option: >
            {% if (now().weekday() == 6 and now().hour <= 11) or ( now().weekday() in [ 0,1,2,3,4 ] ) %}
               Sveriges Radio P1
            {% elif (now().weekday() == 6 and now().hour >= 11) or now().weekday() == 5 %}
               Sveriges Radio P4 Stockholm
            {% else %}
               tyst
            {% endif %}


https://community.home-assistant.io/t/script-with-multiple-conditions-and-multiple-actions/54192/11?u=msly
0