Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##### WERSJA 1 #####
- vacuum_change_mode:
- sequence:
- - service: vacuum.set_fan_speed
- data_template:
- entity_id: vacuum.xiaomi_vacuum_cleaner
- fan_speed: |
- {% if is_state_attr('vacuum.xiaomi_vacuum_cleaner', 'fan_speed', 105) %}
- 101
- {% else %}
- {{ state_attr('vacuum.xiaomi_vacuum_cleaner', 'fan_speed') | int +1 }}
- {% endif %}
- ##### WERSJA 2 #####
- vacuum_change_mode:
- sequence:
- - service: vacuum.set_fan_speed
- data_template:
- entity_id: vacuum.xiaomi_vacuum_cleaner
- fan_speed: "{{ (state_attr('vacuum.xiaomi_vacuum_cleaner', 'fan_speed') | int - 100) % 5 + 101 }}"
- ##### WERSJA 3 #####
- vacuum_change_mode:
- sequence:
- - service: vacuum.set_fan_speed
- data_template:
- entity_id: vacuum.xiaomi_vacuum_cleaner
- fan_speed: "{{ state_attr('vacuum.xiaomi_vacuum_cleaner', 'fan_speed_list')[(state_attr('vacuum.xiaomi_vacuum_cleaner', 'fan_speed') | int - 100 ) % 5] }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement