Skip to content

Commit

Permalink
Disable many automations (Use MiHex)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonsm committed Jun 28, 2024
1 parent ef05a4c commit 173fcd3
Show file tree
Hide file tree
Showing 15 changed files with 330 additions and 422 deletions.
38 changes: 0 additions & 38 deletions automations/bathroom.yaml

This file was deleted.

File renamed without changes.
24 changes: 12 additions & 12 deletions automations/cover.yaml → automations/disabled/cover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@
entity_id: fan.zhu_wo_xin_feng_ji
oscillating: '{% if is_state("cover.curtain_158d000405d535", "closed") %}false{% else %}true{% endif %}'

# - alias: 儿童房窗帘开关-调整风扇
# initial_state: false
# trigger:
# - platform: state
# entity_id: cover.curtain_158d00042cf265
# to: closed
# - platform: state
# entity_id: cover.curtain_158d00042cf265
# to: open
# action:
# - service_template: 'fan.turn_{% if is_state("cover.curtain_158d00042cf265", "closed") %}on{% else %}off{% endif %}'
# entity_id: fan.er_tong_fang_feng_shan
- alias: 儿童房窗帘开关-调整风扇
initial_state: false
trigger:
- platform: state
entity_id: cover.curtain_158d00042cf265
to: closed
- platform: state
entity_id: cover.curtain_158d00042cf265
to: open
action:
- service_template: 'fan.turn_{% if is_state("cover.curtain_158d00042cf265", "closed") %}on{% else %}off{% endif %}'
entity_id: fan.er_tong_fang_feng_shan
32 changes: 16 additions & 16 deletions automations/cube.yaml → automations/disabled/cube.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# - alias: 儿童房魔方摇一摇-召唤神龙爸爸
# trigger:
# - platform: event
# event_type: xiaomi_aqara.cube_action
# event_data:
# entity_id: binary_sensor.cube_158d0002a66db1
# action_type: shake_air
# action:
# - service: zhimsg.ding
# data:
# message: 召唤神龙爸爸
# - service: xiaomi_aqara.play_ringtone
# data:
# gw_mac: 34CE0090901A
# ringtone_id: 10016
# ringtone_vol: 60
- alias: 儿童房魔方摇一摇-召唤神龙爸爸
trigger:
- platform: event
event_type: xiaomi_aqara.cube_action
event_data:
entity_id: binary_sensor.cube_158d0002a66db1
action_type: shake_air
action:
- service: zhimsg.ding
data:
message: 召唤神龙爸爸
- service: xiaomi_aqara.play_ringtone
data:
gw_mac: 34CE0090901A
ringtone_id: 10016
ringtone_vol: 60

# - alias: 儿童房魔方翻转九十度
# trigger:
Expand Down
51 changes: 22 additions & 29 deletions automations/door.yaml → automations/disabled/door.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@
- service: automation.trigger
entity_id: automation.ru_hu_men_ti_xing

# - alias: 阳台门感应
# trigger:
# - platform: state
# entity_id: binary_sensor.door_window_sensor_158d000228a52b
# from: 'off'
# to: 'on'
# - platform: state
# entity_id: binary_sensor.door_window_sensor_158d000228a52b
# from: 'on'
# to: 'off'
# condition:
# - condition: state
# entity_id: sun.sun
# state: below_horizon
# action:
# - service_template: '{% if trigger.to_state.state == "on" %}light.turn_on{% else %}light.turn_off{% endif %}'
# entity_id: light.balcony_light
- alias: 阳台门感应
trigger:
- platform: state
entity_id: binary_sensor.door_window_sensor_158d000228a52b
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.door_window_sensor_158d000228a52b
from: 'on'
to: 'off'
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- service_template: '{% if trigger.to_state.state == "on" %}light.turn_on{% else %}light.turn_off{% endif %}'
entity_id: light.balcony_light

- alias: 阳台门提醒
mode: restart
Expand All @@ -68,8 +68,6 @@
to: 'on'
for:
seconds: 60
- platform: time
at: '21:00:00'
condition:
- condition: state
entity_id: binary_sensor.door_window_sensor_158d000228a52b
Expand All @@ -80,22 +78,17 @@
action:
- service: zhimsg.ke_ting_yin_xiang
data_template:
message: '{% if now().hour >= 21 %}晚上请关好阳台门{% else %}阳台PM2.5为{% set PM25 = states("sensor.yang_tai_kong_qi_zhi_liang") | int %}{{ PM25 }},{% if PM25 < 20 %}空气很好{% elif PM25 < 40 %}空气不错{% elif PM25 < 60 %}空气一般{% elif PM25 < 80 %}空气不好,请关好阳台门{% else %}空气污染,请关好阳台门和其它门窗{% endif %}{% endif %}'
message: '阳台PM2.5为{% set PM25 = states("sensor.yang_tai_kong_qi_zhi_liang") | int %}{{ PM25 }},{% if PM25 < 20 %}空气很好{% elif PM25 < 40 %}空气不错{% elif PM25 < 60 %}空气一般{% elif PM25 < 80 %}空气不好,请关好阳台门{% else %}空气污染,请关好阳台门和其它门窗{% endif %}'
- delay: 120
- condition: state
entity_id: binary_sensor.door_window_sensor_158d000228a52b
state: 'on'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.yang_tai_kong_qi_zhi_liang
above: 60
- condition: time
after: '21:00'
before: '23:00'
- condition: numeric_state
entity_id: sensor.yang_tai_kong_qi_zhi_liang
above: 60
- service: automation.trigger
entity_id: automation.yang_tai_men_ti_xing

#
- alias: 厨房门提醒
mode: restart
trigger:
Expand Down
152 changes: 152 additions & 0 deletions automations/disabled/humidity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
- alias: 餐厅湿度高-开除湿机
trigger:
- platform: numeric_state
entity_id: sensor.can_ting_shi_du
above: 74
for:
minutes: 10
action:
- service: switch.turn_on
entity_id: switch.can_ting_chu_shi_ji

- alias: 餐厅湿度正常-关除湿机
trigger:
- platform: numeric_state
entity_id: sensor.can_ting_shi_du
below: 70
for:
minutes: 10
action:
- service: switch.turn_off
entity_id: switch.can_ting_chu_shi_ji

- alias: 儿童房湿度高-开除湿机
trigger:
- platform: numeric_state
entity_id: sensor.er_tong_fang_shi_du
above: 74
for:
minutes: 10
condition:
- condition: state
entity_id: sun.sun
state: above_horizon
action:
- service: switch.turn_on
entity_id: switch.yi_ju_chu_shi_ji

- alias: 儿童房湿度正常-开除湿机
trigger:
- platform: numeric_state
entity_id: sensor.er_tong_fang_shi_du
below: 70
for:
minutes: 10
- platform: time
at: '20:30:00'
action:
- service: switch.turn_off
entity_id: switch.yi_ju_chu_shi_ji

- alias: 餐厅湿度低-开加湿器
initial_state: true
trigger:
- platform: numeric_state
entity_id: sensor.can_ting_shi_du
below: 56
for:
minutes: 10
action:
- service: automation.turn_off
entity_id: automation.can_ting_jing_hua_qi_diao_jie
- service: fan.oscillate
data:
entity_id: fan.can_ting_jing_hua_qi
oscillating: true
- service: fan.set_preset_mode
data:
entity_id: fan.can_ting_jing_hua_qi
preset_mode: low

- alias: 餐厅湿度正常-关加湿器
trigger:
- platform: numeric_state
entity_id: sensor.can_ting_shi_du
above: 60
for:
minutes: 10
action:
- service: automation.turn_on
entity_id: automation.can_ting_jing_hua_qi_diao_jie
- service: fan.oscillate
data:
entity_id: fan.can_ting_jing_hua_qi
oscillating: false

- alias: 主卧湿度低-开加湿器
trigger:
- platform: numeric_state
entity_id: sensor.zhu_wo_shi_du
below: 58
for:
minutes: 10
action:
- service: automation.turn_off
entity_id: automation.zhu_wo_jing_hua_qi_diao_jie
- service: fan.oscillate
data:
entity_id: fan.zhu_wo_jing_hua_qi
oscillating: true
- service: fan.set_preset_mode
data:
entity_id: fan.zhu_wo_jing_hua_qi
preset_mode: low

- alias: 主卧湿度正常-关加湿器
trigger:
- platform: numeric_state
entity_id: sensor.zhu_wo_shi_du
above: 62
for:
minutes: 10
action:
- service: automation.turn_on
entity_id: automation.zhu_wo_jing_hua_qi_diao_jie
- service: fan.oscillate
data:
entity_id: fan.zhu_wo_jing_hua_qi
oscillating: false

- alias: 儿童房湿度低-开加湿器
trigger:
- platform: numeric_state
entity_id: sensor.er_tong_fang_shi_du
below: 56
for:
minutes: 10
action:
- service: automation.turn_off
entity_id: automation.er_tong_fang_jing_hua_qi_diao_jie
- service: fan.oscillate
data:
entity_id: fan.er_tong_fang_jing_hua_qi
oscillating: true
- service: fan.set_preset_mode
data:
entity_id: fan.er_tong_fang_jing_hua_qi
preset_mode: low

- alias: 儿童房湿度正常-关加湿器
trigger:
- platform: numeric_state
entity_id: sensor.er_tong_fang_shi_du
above: 60
for:
minutes: 10
action:
- service: automation.turn_on
entity_id: automation.er_tong_fang_jing_hua_qi_diao_jie
- service: fan.oscillate
data:
entity_id: fan.er_tong_fang_jing_hua_qi
oscillating: false
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
- service: automation.trigger
data_template:
entity_id: 'automation.shu_fang_tou_ying_yi_{% if is_state("media_player.shu_fang_tou_ying_yi", "off") %}guan_bi_shou_wei{% else %}kai_qi_zhun_bei{% endif %}_pei_tao'
- service_template: 'switch.turn_{% if is_state("media_player.shu_fang_tou_ying_yi", "off") %}off{% else %}on{% endif %}'
entity_id: switch.shu_fang_yin_xiang

- alias: 书房按钮双击—开关播放器
trigger:
Expand Down
Loading

0 comments on commit 173fcd3

Please sign in to comment.