Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_select:
- bieg:
- name: "Tryb pracy wentylatora"
- options:
- - 0
- - 1
- - 2
- script:
- zmien_bieg:
- seqence:
- - service: script.turn_on
- data_template:
- entity_id >
- {% set temp_skrypty = {0:'bieg_0', 1:'bieg_1', 2:'bieg_2'} %}
- ###### te dwie linijki mozna zastapic jedna - ponizej
- ## {% set temp_bieg = states('input_select.bieg')|int %}
- ## {% if (temp_bieg < 2) %}{% set temp_bieg = temp_bieg + 1 %}{% else %}{% set temp_bieg = 0 %}{% endif %}
- {% set temp_bieg = (states('input_select.bieg')|int +1)%3 %}
- ## tutaj reszta już normalnie
- {% if temp_bieg in temp_skrypty %}script.{{ temp_skrypty[temp_bieg] }}{% else %}script.bieg_0{% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement