Aqara Opple 无线场景开关6键版一直呆在收藏夹里都快忘记了,前两天群里有人晒图,我就又想起了这货,正好感觉床头的米家小圆饼按键太少了不方便,就买了一个回来。通过多模网关Xiaomi Gateway 3插件接入HA,每个按键比米家里多了长按释放和三击两个动作,总共可用的触发动作就是6x5=30个,当然一般人也用不了这么多。个人很不喜欢长按这个动作,因为效率太低了,三击是个很好的替代,按键时间会缩短很多。
分享一个刚设置好的自动化,用到了7.0正式引入的trigger id,简单说就是可以给触发条件自定义一个标签,触发动作时可以根据标签指定是由哪个条件触发的,挺实用的新特性,可以很方便的将以前分开设置的几个自动化合为一个。
id: '1626237442875'
alias: 老婆床头 - 六键开关
description: ''
trigger:
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_1_single
to: button_1_single
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_1_double
to: button_1_double
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_1_triple
to: button_1_triple
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_1_hold
to: button_1_hold
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_1_release
to: button_1_release
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_2_single
to: button_2_single
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_2_double
to: button_2_double
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_2_triple
to: button_2_triple
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_2_hold
to: button_2_hold
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_2_release
to: button_2_release
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_3_single
to: button_3_single
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_3_double
to: button_3_double
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_3_triple
to: button_3_triple
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_3_hold
to: button_3_hold
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_3_release
to: button_3_release
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_4_single
to: button_4_single
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_4_double
to: button_4_double
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_4_triple
to: button_4_triple
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_4_hold
to: button_4_hold
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_4_release
to: button_4_release
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_5_single
to: button_5_single
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_5_double
to: button_5_double
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_5_triple
to: button_5_triple
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_5_hold
to: button_5_hold
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_5_release
to: button_5_release
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_6_single
to: button_6_single
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_6_double
to: button_6_double
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_6_triple
to: button_6_triple
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_6_hold
to: button_6_hold
- platform: state
entity_id: sensor.0x4cf8cdf3c7d9f83_action
id: button_6_release
to: button_6_release
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: button_1_single
sequence:
- type: toggle
device_id: 333e3744be9987bf045145947720dcdf
entity_id: light.yeelight_moon
domain: light
- conditions:
- condition: trigger
id: button_1_double
sequence:
- service: homeassistant.toggle
target:
entity_id: input_boolean.yeelink_moon_nightlight
- conditions:
- condition: trigger
id: button_1_hold
sequence:
- service: xiaomi_miot_raw.speak_text
data:
entity_id: media_player.21_cloud_143935
text: 单击开关月亮灯,双击开关月光模式
- conditions:
- condition: trigger
id: button_2_single
sequence:
- type: toggle
device_id: d45ccad6506724b0369c7fea90a95d65
entity_id: light.mi_jia_tai_deng
domain: light
- conditions:
- condition: trigger
id: button_2_hold
sequence:
- service: xiaomi_miot_raw.speak_text
data:
entity_id: media_player.21_cloud_143935
text: 单击开关台灯
- conditions:
- condition: trigger
id: button_3_single
sequence:
- device_id: 333e3744be9987bf045145947720dcdf
domain: light
entity_id: light.yeelight_moon
type: brightness_decrease
- conditions:
- condition: trigger
id: button_3_hold
sequence:
- service: xiaomi_miot_raw.speak_text
data:
entity_id: media_player.21_cloud_143935
text: 单击降低月亮灯亮度
- conditions:
- condition: trigger
id: button_4_single
sequence:
- device_id: 333e3744be9987bf045145947720dcdf
domain: light
entity_id: light.yeelight_moon
type: brightness_increase
- conditions:
- condition: trigger
id: button_4_hold
sequence:
- service: xiaomi_miot_raw.speak_text
data:
entity_id: media_player.21_cloud_143935
text: 单击增加月亮灯亮度
- conditions:
- condition: trigger
id: button_5_single
sequence:
- device_id: d45ccad6506724b0369c7fea90a95d65
domain: light
entity_id: light.mi_jia_tai_deng
type: brightness_decrease
- conditions:
- condition: trigger
id: button_5_hold
sequence:
- service: xiaomi_miot_raw.speak_text
data:
entity_id: media_player.21_cloud_143935
text: 单击降低台灯亮度
- conditions:
- condition: trigger
id: button_6_single
sequence:
- device_id: d45ccad6506724b0369c7fea90a95d65
domain: light
entity_id: light.mi_jia_tai_deng
type: brightness_increase
- conditions:
- condition: trigger
id: button_6_hold
sequence:
- service: xiaomi_miot_raw.speak_text
data:
entity_id: media_player.21_cloud_143935
text: 单击增加台灯亮度
default: []
mode: single
给老婆用的,所以只有第一个按键设置了单击、双击具体功能,其他按键只有单击有具体功能,所有按键长按小爱音箱会tts播报该按键的功能。等后面再买一个自己用,给它设个24个动作,
|