Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_select:
- predkosc:
- name: "Tryb pracy"
- options:
- - "Cichy"
- - "Średni"
- - "Max"
- - "Auto"
- automation:
- - id: zmien_predkosc
- alias: "Zmiana prędkości"
- initial_state: "on"
- trigger:
- - platform: state
- entity_id: input_select.predkosc
- action:
- - service: fan.set_speed
- data_template:
- entity_id: fan.xiaomi_miio_device
- speed: >
- {% set temp_speed = {'Cichy':'Silent', 'Średni':'Medium', 'Max':'High', 'Auto':'Auto'} %}
- {% set temp_tryb = states('input_select.predkosc') %}
- {% if temp_tryb in temp_speed %}{{ temp_speed[temp_tryb] }}{% else %}Silent{% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement