完整配置如下:
esphome:
name: ir
esp8266:
board: esp01_1m
# Enable logging
logger:
level: debug
status_led:
pin:
number: GPIO15
ota:
password: "43b4e7a8d3fce8b72ec81803e1023972"
wifi:
ssid: FAST_903
password: '13616273842'
ap:
ssid: "Ir Fallback Hotspot"
password: "rHG6DQPSPI1P"
captive_portal:
web_server:
port: 80
api:
services:
- service: send_raw_command
variables:
command: int[]
then:
- remote_transmitter.transmit_raw:
code: !lambda 'return command;'
carrier_frequency: 38kHz
- service: send_nec_command
variables:
address: int
command: int
then:
- remote_transmitter.transmit_nec:
address: !lambda 'return address;'
command: !lambda 'return command;'
- service: send_pronto_command
variables:
command: string
then:
- remote_transmitter.transmit_pronto:
data: !lambda 'return command;'
remote_transmitter:
pin: GPIO14
carrier_duty_percent: 50%
remote_receiver:
id: rcvr
dump: all
pin:
number: GPIO13
inverted: true
mode:
input: true
pullup: true
tolerance: 50%
# remote_receiver:
# id: rcvr
# dump: all
# pin: GPIO13
climate:
- platform: heatpumpir
protocol: greeyan
horizontal_default: auto
vertical_default: auto
max_temperature: 30.0
min_temperature: 16.0
name: officeAC
receiver_id: rcvr
# - platform: midea_ir
# name: "AC"
# receiver_id: rcvr
sensor:
- platform: hlw8012
model: BL0937
sel_pin:
number: GPIO12
inverted: true
cf_pin: GPIO4
cf1_pin: GPIO5
current_resistor: 0.001
voltage_divider: 1711
current:
name: "Bedroom AC Current"
voltage:
name: "Bedroom AC Voltage"
power:
filters:
- multiply: 0.001
unit_of_measurement: kW
name: "Bedroom AC Power"
energy:
filters:
- multiply: 0.001
unit_of_measurement: kWh
name: "Bedroom AC Energy"
update_interval: 10s
|