大神请过目~~谢谢啦
intent_script:
TurnOnmi_light:
speech:
text: 已打开书房台灯
card:
type: simple
title: 已打开书房台灯
content: 已打开书房台灯
action:
service: light.turn_on
data_template:
entity_id: light.mi_light
TurnOffmi_light:
speech:
text: 已关闭书房台灯
card:
type: simple
title: 已关闭书房台灯
content: 已关闭书房台灯
action:
service: light.turn_off
data_template:
entity_id: light.mi_light
TurnOnlight:
speech:
text: 已打开{{ item }}灯
card:
type: simple
title: 已打开{{ item }}灯
content: 已打开{{ item }}灯
action:
service: switch.turn_on
data_template:
entity_id: >
{% if item=="客厅" %}
switch.light_living_room1_3
{% elif item=="门" %}
switch.light_living_room1_1
{% elif item=="厨房" %}
switch.light_kitchen
{% elif item=="餐厅" %}
switch.light_dining_room1
{% elif item=="走廊" %}
switch.light_hallway_1
{% elif item=="书房" %}
switch.light_study_room_1
{% elif item=="客房" %}
switch.light_study_room_2
{% elif item=="儿童房" %}
switch.light_babyroom1_2
{% elif item=="卧室" %}
switch.light_bedroom2_2
{% elif item=="床前" %}
switch.light_bedroom1_1
{% elif item=="床后" %}
switch.light_bedroom3_1
{% endif %}
TurnOfflight:
speech:
text: 已关闭{{ item }}灯
card:
type: simple
title: 已关闭{{ item }}灯
content: 已关闭{{ item }}灯
action:
service: switch.turn_off
data_template:
entity_id: >
{% if item=="客厅" %}
switch.light_living_room1_3
{% elif item=="门" %}
switch.light_living_room1_1
{% elif item=="厨房" %}
switch.light_kitchen
{% elif item=="餐厅" %}
switch.light_dining_room1
{% elif item=="走廊" %}
switch.light_hallway_1
{% elif item=="书房" %}
switch.light_study_room_1
{% elif item=="客房" %}
switch.light_study_room_2
{% elif item=="儿童房" %}
switch.light_babyroom1_2
{% elif item=="卧室" %}
switch.light_bedroom2_2
{% elif item=="床前" %}
switch.light_bedroom1_1
{% elif item=="床后" %}
switch.light_bedroom3_1
{% endif %}
TurnOnDevice:
speech:
text: 已打开{{ item }}
card:
type: simple
title: 已打开{{ item }}
content: 已打开{{ item }}
action:
service: switch.turn_on
data_template:
entity_id: >
{% if item=="客厅电视" %}
switch.watch_stb
{% elif item=="客厅盒子" %}
switch.watch_box
{% elif item=="客厅电脑" %}
switch.watch_htpc
{% elif item=="客厅音乐" %}
switch.listen_htpc
{% elif item=="卧室电视" %}
switch.watch_stb_bedroom
{% elif item=="卧室盒子" %}
switch.watch_box_bedroom
{% elif item=="客厅空调" %}
switch.daikin1
{% elif item=="卧室空调" %}
switch.daikin4
{% elif item=="书房电脑" %}
switch.use_pc
{% elif item=="群晖" %}
switch.nas_power
{% elif item=="客厅窗帘" %}
switch.cover_living
{% elif item=="卧室窗帘" %}
switch.cover_bedroom
{% elif item=="客厅风扇" %}
switch.fan_gree
{% elif item=="卧室风扇" %}
switch.fan_airmate
{% endif %}
TurnOffDevice:
speech:
text: 已关闭{{ item }}
card:
type: simple
title: 已关闭{{ item }}
content: 已关闭{{ item }}
action:
service: switch.turn_off
data_template:
entity_id: >
{% if item=="客厅电视" %}
switch.watch_stb
{% elif item=="客厅盒子" %}
switch.watch_box
{% elif item=="客厅电脑" %}
switch.watch_htpc
{% elif item=="客厅音乐" %}
switch.listen_htpc
{% elif item=="卧室电视" %}
switch.watch_stb_bedroom
{% elif item=="卧室盒子" %}
switch.watch_box_bedroom
{% elif item=="客厅空调" %}
switch.daikin1
{% elif item=="卧室空调" %}
switch.daikin4
{% elif item=="书房电脑" %}
switch.use_pc
{% elif item=="群晖" %}
switch.nas_power
{% elif item=="客厅窗帘" %}
switch.cover_living
{% elif item=="卧室窗帘" %}
switch.cover_bedroom
{% elif item=="客厅风扇" %}
switch.fan_gree
{% elif item=="卧室风扇" %}
switch.fan_airmate
{% endif %}
conversation:
intents:
TurnOnmi_light:
- 打开书房台灯
- 把书房台灯打开
TurnOffmi_light:
- 关闭书房台灯
- 把书房台灯关上
TurnOnlight:
- 打开{item}灯
- 把{item}灯打开
TurnOfflight:
- 关闭{item}灯
- 把{item}灯关闭
TurnOnDevice:
- 打开{item}
- 把{item}打开
TurnOffDevice:
- 关闭{item}
- 把{item}关上
|