esphome:
name: x12-test
esp8266:
board: esp01_1m
# Enable Home Assistant API
api:
password: "yiqieruoran"
services:
- service: send_raw_command
variables:
command: int[]
then:
- remote_transmitter.transmit_raw:
carrier_frequency: 38kHz
code: !lambda 'return command;'
ota:
password: "yiqieruoran" # 一切若然
wifi:
# ssid: "ssid"
# password: "yiqieruoran" # 一切若然
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "X12-Test_Hotspot"
captive_portal:
# Enable logging
logger:
# level: VERBOSE #makes uart stream available in esphome logstream
# baud_rate: 0 #disable logging over uart
# Enable Home Assistant API
# web_server:
# port: 80
remote_receiver:
pin:
number: 13 #接收
inverted: True
#dump: nec
dump: all
remote_transmitter:
pin:
number: 14 #发射
carrier_duty_percent: 50%
switch:
- platform: gpio
name: x12_led
id: x12_led
pin: 15
inverted: false
|