41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
- alias: '[Living Room Air Purifier] mode change'
|
|
trigger:
|
|
entity_id: input_select.xiaomi_airpurifier_mode
|
|
platform: state
|
|
action:
|
|
service: fan.set_speed
|
|
data_template:
|
|
entity_id: fan.xiaomi_miio_device
|
|
speed: '{{ states.input_select.xiaomi_airpurifier_mode.state }}'
|
|
id: xiaomi_airpurifier_mode_change
|
|
- alias: '[Living Room Air Purifier] mode changed'
|
|
trigger:
|
|
platform: state
|
|
entity_id: fan.xiaomi_miio_device
|
|
action:
|
|
service: input_select.select_option
|
|
entity_id: input_select.xiaomi_airpurifier_mode
|
|
data_template:
|
|
option: '{{ states.fan.xiaomi_miio_device.attributes.speed }}'
|
|
id: xiaomi_airpurifier_mode_changed
|
|
- alias: '[Living Room Air Purifier] favorite level change'
|
|
trigger:
|
|
entity_id: input_number.xiaomi_airpurifier_favorite_level
|
|
platform: state
|
|
action:
|
|
service: xiaomi_miio.fan_set_favorite_level
|
|
data_template:
|
|
entity_id: fan.xiaomi_miio_device
|
|
level: '{{ states.input_number.xiaomi_airpurifier_favorite_level.state | int
|
|
}}'
|
|
id: xiaomi_airpurifier_favorite_level
|
|
- alias: '[Living Room Air Purifier] favorite level changed'
|
|
trigger:
|
|
platform: state
|
|
entity_id: fan.xiaomi_miio_device
|
|
action:
|
|
service: input_number.set_value
|
|
entity_id: input_number.xiaomi_airpurifier_favorite_level
|
|
data_template:
|
|
value: '{{ states.fan.xiaomi_miio_device.attributes.favorite_level }}'
|
|
id: xiaomi_airpurifier_favorite_level_changed |