ДЦ
Size: a a a
ДЦ
Z
s
IS
fan:
- platform: template
fans:
breather_lr:
friendly_name: "Breather LR"
value_template: "{{ states('binary_sensor.breather_lr') }}"
speed_template: "{{ states('input_select.breather_lr_speed') }}"
turn_on:
service: script.breather_lr_on
turn_off:
service: script.breather_lr_off
set_speed:
service: script.breather_lr_speed
data:
speed: "{{ speed }}"
speeds:
- '1'
- '2'
- '3'
- '4'
binary_sensor:
- platform: template
sensors:
breather_lr:
friendly_name: Breather LR Status
icon_template: mdi:power
value_template: "{{ state_attr('sensor.0x00158d0004733458_power','power')|float > 11}}"
input_select:
breather_lr_speed:
options:
- 1
- 2
- 3
- 4
icon: mdi:target
sensor:
- platform: mqtt
name: breather_lr_speed
state_topic: "tele/breather_lr/speed"
script:
breather_lr_toggle:
alias: breather_lr_toggle
sequence:
- service: mqtt.publish
data:
topic: "cmnd/tasmota_7A92D3/IRSend"
payload: '{"Protocol":"NEC","Bits":32,"Data":"0x00FF20DF","DataLSB":"0x00FF04FB","Repeat":0}'
breather_lr_speed_up:
alias: breather_lr_speed_up
sequence:
- service: mqtt.publish
data:
topic: "cmnd/tasmota_7A92D3/IRSend"
payload: '{"Protocol":"NEC","Bits":32,"Data":"0x00FF30CF","DataLSB":"0x00FF0CF3","Repeat":0}'
- delay: 2
breather_lr_speed_down:
alias: breather_lr_speed_down
sequence:
- service: mqtt.publish
data:
topic: "cmnd/tasmota_7A92D3/IRSend"
payload: '{"Protocol":"NEC","Bits":32,"Data":"0x00FF00FF","DataLSB":"0x00FF00FF","Repeat":0}'
- delay: 2
breather_lr_speed_publish:
alias: breather_lr_speed_publish
sequence:
- service: mqtt.publish
data:
topic: "tele/breather_lr/speed"
payload: "{{ states('input_select.breather_lr_speed') | int }}"
retain: true
breather_lr_on:
alias: breather_lr_on
sequence:
- service: input_select.select_option
data_template:
entity_id: input_select.breather_lr_speed
option: 4
- service: script.breather_lr_toggle
- delay: 2
- service: fan.set_speed
data:
entity_id: fan.breather_lr
speed: 1
breather_lr_off:
alias: breather_lr_off
sequence:
- service: fan.set_speed
data:
entity_id: fan.breather_lr
speed: 1
- delay: 2
- service: script.breather_lr_toggle
breather_lr_speed:
alias: breather_lr_speed
sequence:
- service: input_select.select_option
data_template:
entity_id: input_select.breather_lr_speed
option: "{{ speed }}"
- choose:
- conditions:
- condition: template
value_template: "{{ states('sensor.breather_lr_speed') | int - states('input_select.breather_lr_speed') | int > 0 }}"
sequence:
- repeat:
count: "{{ states('sensor.breather_lr_speed') | int - states('input_select.breather_lr_speed') | int }}"
sequence:
- service: script.breather_lr_speed_down
- service: script.breather_lr_speed_publish
- conditions:
- condition: template
value_template: "{{ states('sensor.breather_lr_speed') | int - states('input_select.breather_lr_speed') | int < 0 }}"
sequence:
- repeat:
count: "{{ states('input_select.breather_lr_speed') | int - states('sensor.breather_lr_speed') | int }}"
sequence:
- service: script.breather_lr_speed_up
- service: script.breather_lr_speed_publish
IS
IB
IS
IS
RO
VS
VS
VS
VS
М
VS
М
RO
VS
RO
VS