我参考了论坛中这个帖子,用8266做了一个红外遥控,红外遥控没有问题,但是问题是不论开关打开还是关闭,红外信号都会发射。然后我看了log,不论开还是关,log中都是显示on。是什么原因啊?
esphome:
name: hasshome
friendly_name: HASSHome
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "ZFil5djmU197NzZFFOIofdJ1dAmB9umxecdlc34r4as="
ota:
password: "ffe2dc6c741962ad77dc8dd900edabbb"
wifi:
ssid: "xxxxx"
password: "xxxxx"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Hasshome Fallback Hotspot"
password: "TMMdiNgNv47M"
remote_transmitter:
pin:
number: GPIO14
carrier_duty_percent: 50%
switch:
- platform: template
name: "ChildLock"
turn_on_action:
- remote_transmitter.transmit_raw:
code: [1219, -464, 1221, -463, 379, -1306, 1221, -462, 1223, -461, 381, -1303, 381, -1304, 1223, -463, 380, -1329, 355, -1303, 384, -1303, 379, -8146, 1224, -463, 1222, -462, 380, -1330, 1197, -488, 1197, -461, 381, -1307, 377, -1306, 1222, -462]
carrier_frequency: 38kHz
captive_portal:
web_server:
port: 80
|