기존 가지고 있던 xkc-y25보다 많이 슬림해졌지만 인식도달범위가 짧아짐. 기존처럼 물통 바깥 가이드에 붙이면 인식 안돼 가이드 안쪽에 넣어 붙였는데 유격이 없어져 물통 넣기가 조금 불편.
esphome에선 xkc-y25와 다르게 습함/건조가 반대로 나와 yaml에 inverted: true로 사용.
binary_sensor:
- platform: gpio
pin:
number: 9
mode: INPUT
inverted: true
name: "Water Level2"
device_class: moisture
automations.yaml
- id: 알림-가습기물부족
alias: 알림-가습기물부족
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.water_level
- binary_sensor.water_level2
from: 'on'
to: 'off'
for: '00:00:10'
actions:
- choose:
- conditions:
- condition: time
after: '23:00'
before: '07:00'
sequence:
- action: light.turn_on
data:
brightness: 10
transition: 0
rgb_color: [0, 0, 255]
entity_id: light.notify
default:
- action: media_player.volume_set
data:
volume_level: 0.7
entity_id: media_player.notify
- action: media_player.play_media
data:
media_content_id: media-source://media_source/local/TTS/m1.mp3
media_content_type: audio/mpeg
entity_id: media_player.notify
- delay: '00:00:08'
- action: tts.edge_tts_say
data:
message: 가습기 물보충 해주세요.
entity_id: media_player.notify
- action: script.turn_on
entity_id: script.blue_effect