fix ir/rf proxy

This commit is contained in:
Aiden
2026-05-29 10:26:17 +08:00
parent 05878eacb1
commit 0948d25b87
+21 -17
View File
@@ -10,7 +10,7 @@ substitutions:
# Project Name # Project Name
project_name: "China Athom Technology.Athom RF IR Remote" project_name: "China Athom Technology.Athom RF IR Remote"
# Projection version denotes the release version of the yaml file, allowing checking of deployed vs latest version # Projection version denotes the release version of the yaml file, allowing checking of deployed vs latest version
project_version: "v3.0.0" project_version: "v3.0.1"
# Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs) # Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs)
dns_domain: ".local" dns_domain: ".local"
# Set timezone of the smart plug. Useful if the plug is in a location different to the HA server. Can be entered in unix Country/Area format (i.e. "Australia/Sydney") # Set timezone of the smart plug. Useful if the plug is in a location different to the HA server. Can be entered in unix Country/Area format (i.e. "Australia/Sydney")
@@ -46,7 +46,7 @@ esphome:
comment: "${device_description}" comment: "${device_description}"
area: "${room}" area: "${room}"
name_add_mac_suffix: true name_add_mac_suffix: true
min_version: 2026.3.0 min_version: 2026.5.1
project: project:
name: "${project_name}" name: "${project_name}"
version: "${project_version}" version: "${project_version}"
@@ -54,6 +54,7 @@ esphome:
board_build.flash_mode: dio board_build.flash_mode: dio
esp32: esp32:
board: esp32dev
variant: esp32 variant: esp32
flash_size: 8MB flash_size: 8MB
framework: framework:
@@ -90,6 +91,7 @@ ota:
logger: logger:
baud_rate: 0 baud_rate: 0
level: ${log_level}
mdns: mdns:
disabled: false disabled: false
@@ -134,7 +136,7 @@ remote_receiver:
- pin: - pin:
number: ${RF_RX_PIN} number: ${RF_RX_PIN}
inverted: true inverted: true
dump: all dump: rc_switch
tolerance: 25% tolerance: 25%
id: rf_receiver id: rf_receiver
@@ -146,41 +148,44 @@ remote_receiver:
id: ir_receiver id: ir_receiver
remote_transmitter: remote_transmitter:
- pin: - pin:
number: ${RF_TX_PIN} number: ${RF_TX_PIN}
# OOK modulation for RF433 — keep duty at 100%
carrier_duty_percent: 100% carrier_duty_percent: 100%
non_blocking: true non_blocking: true
id: rf_transmitter id: rf_transmitter
- pin: - pin:
number: ${IR_TX_PIN} number: ${IR_TX_PIN}
inverted: False inverted: false
carrier_duty_percent: 50% carrier_duty_percent: 50%
non_blocking: true non_blocking: true
id: ir_transmitter id: ir_transmitter
infrared: infrared:
# IR transmitter instance
- platform: ir_rf_proxy - platform: ir_rf_proxy
name: IR Proxy Transmitter name: IR Proxy Transmitter
id: ir_proxy_tx id: ir_proxy_transmitter
remote_transmitter_id: ir_transmitter remote_transmitter_id: ir_transmitter
# IR receiver instance
- platform: ir_rf_proxy - platform: ir_rf_proxy
name: IR Proxy Receiver name: IR Proxy Receiver
id: ir_proxy_rx id: ir_proxy_receiver
receiver_frequency: 38kHz
remote_receiver_id: ir_receiver remote_receiver_id: ir_receiver
# RF transmitter instance # RF transmitter instance
radio_frequency:
- platform: ir_rf_proxy - platform: ir_rf_proxy
name: RF Proxy Transmitter name: 433MHz RF Transmitter
frequency: 433 MHz id: rf_proxy_transmitter
id: rf_proxy_tx frequency: 433.92MHz
remote_transmitter_id: rf_transmitter remote_transmitter_id: rf_transmitter
# RF receiver instance
- platform: ir_rf_proxy - platform: ir_rf_proxy
name: RF Proxy Receiver name: 433MHz RF Receiver
id: rf_proxy_rx id: rf_proxy_receiver
frequency: 433.92MHz
remote_receiver_id: rf_receiver remote_receiver_id: rf_receiver
climate: climate:
@@ -204,7 +209,7 @@ binary_sensor:
disabled_by_default: true disabled_by_default: true
on_multi_click: on_multi_click:
- timing: - timing:
- ON for at least 4s - ON for at least 4s
then: then:
- button.press: Reset - button.press: Reset
@@ -272,7 +277,6 @@ text_sensor:
id: device_last_restart id: device_last_restart
icon: mdi:clock icon: mdi:clock
entity_category: diagnostic entity_category: diagnostic
device_class: timestamp
time: time:
- platform: sntp - platform: sntp