Skip to content

Commit

Permalink
Refine switch name
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonsm committed Aug 3, 2023
1 parent 9714b63 commit 7fe4542
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 18 deletions.
11 changes: 3 additions & 8 deletions automations/projector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d000201a73f
click_type: single
entity_id: binary_sensor.switch_158d00083a4207
click_type: long_click_press
action:
- service: zhimsg.ke_ting_yin_xiang
data_template:
Expand All @@ -74,13 +74,8 @@
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d000201a73f
entity_id: binary_sensor.switch_158d00083a4207
click_type: double
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d000201a73f
click_type: long_click_press
action:
- service_template: 'switch.turn_{% if is_state("media_player.shu_fang_tou_ying_yi", "on") %}off{% else %}on{% endif %}'
entity_id: switch.shu_fang_yin_xiang
Expand Down
2 changes: 1 addition & 1 deletion automations/sleeping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
- platform: time
at: '06:00:00'
action:
#- service: shell_command.magic_on
- service: shell_command.magic_on
- service: fan.oscillate
data:
entity_id: fan.ke_ting_xin_feng_ji
Expand Down
43 changes: 40 additions & 3 deletions automations/washer.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,46 @@
- alias: 浴室按钮单击—预约洗衣
- alias: 阳台按钮单击—预约洗衣
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0001e59b33
click_type: single
action:
- service: vacuum.send_command
data:
entity_id: vacuum.yang_tai_xi_yi_ji
command: turn_on;Mode=0;appoint

- alias: 阳台按钮长按—预约洗烘
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0001e59b33
click_type: long_click_press
action:
- service: vacuum.send_command
data:
entity_id: vacuum.yang_tai_xi_yi_ji
command: turn_on;Mode=2;appoint

- alias: 阳台按钮双击—取消预约
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0001e59b33
click_type: double
action:
- service: vacuum.stop
entity_id: vacuum.yang_tai_xi_yi_ji

- alias: 浴室按钮单击—预约洗衣
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d000201a73f
click_type: single
action:
- service: vacuum.send_command
Expand All @@ -16,7 +53,7 @@
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0001e59b33
entity_id: binary_sensor.switch_158d000201a73f
click_type: long_click_press
action:
- service: vacuum.send_command
Expand All @@ -29,7 +66,7 @@
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0001e59b33
entity_id: binary_sensor.switch_158d000201a73f
click_type: double
action:
- service: vacuum.stop
Expand Down
4 changes: 2 additions & 2 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ panel_iframe:

shell_command:
#station_off: 'ssh [email protected] shutdown -h now'
#magic_on: "adb connect magic && adb -s magic shell 'input keyevent 82; am start -n com.thanksmister.iot.wallpanel/.ui.activities.WelcomeActivity'"
#magic_off: "adb connect magic && adb -s magic shell 'input keyevent 82; input keyevent 26'"
magic_on: "adb connect magic && adb -s magic shell 'input keyevent 82; am start -n com.thanksmister.iot.wallpanel/.ui.activities.WelcomeActivity'"
magic_off: "adb connect magic && adb -s magic shell 'input keyevent 82; input keyevent 26'"
x9300d_off: 'adb connect x9300d && adb -s x9300d shell reboot -p'
x9400d_off: 'adb connect x9400e && adb -s x9400e shell reboot -p'
8 changes: 5 additions & 3 deletions customize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ binary_sensor.motion_sensor_158d0001f4a238:
binary_sensor.motion_sensor_158d0003d0d46e:
friendly_name: 浴室感应
binary_sensor.switch_158d0001e59b33:
friendly_name: 浴室按钮
friendly_name: 阳台按钮
binary_sensor.switch_158d000201a73f:
friendly_name: 书房按钮
friendly_name: 浴室按钮
binary_sensor.switch_158d00054e98b0:
friendly_name: 入户门按钮
friendly_name: 主卧按钮
binary_sensor.switch_158d00083a4207:
friendly_name: 书房按钮
camera.can_ting_she_xiang_ji:
dash_click: mihome://device?did=79750727&uid=8816080&server=cn
camera.er_tong_fang_she_xiang_ji:
Expand Down

0 comments on commit 7fe4542

Please sign in to comment.