mirror of
https://github.com/esphome/esphome.git
synced 2026-06-01 01:19:45 +08:00
[ir_rf_proxy] Remove unnecessary headers, add tests (#13464)
CI / Create common environment (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run pytest (macOS-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Run pytest (windows-latest, 3.11) (push) Has been cancelled
CI / Determine which jobs to run (push) Has been cancelled
CI / Run integration tests (push) Has been cancelled
CI / Run C++ unit tests (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Run script/clang-tidy for ZEPHYR (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Test components batch (${{ matrix.components }}) (push) Has been cancelled
CI / pre-commit.ci lite (push) Has been cancelled
CI / Build target branch for memory impact (push) Has been cancelled
CI / Build PR branch for memory impact (push) Has been cancelled
CI / Comment memory impact (push) Has been cancelled
CI / CI Status (push) Has been cancelled
Stale / stale (push) Has been cancelled
Lock closed issues and PRs / lock (push) Has been cancelled
Publish Release / Initialize build (push) Has been cancelled
Publish Release / Build and publish to PyPi (push) Has been cancelled
Publish Release / Build ESPHome amd64 (push) Has been cancelled
Publish Release / Build ESPHome arm64 (push) Has been cancelled
Publish Release / Publish ESPHome docker to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome docker to ghcr (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to ghcr (push) Has been cancelled
Publish Release / deploy-ha-addon-repo (push) Has been cancelled
Publish Release / deploy-esphome-schema (push) Has been cancelled
Publish Release / version-notifier (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run pytest (macOS-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Run pytest (windows-latest, 3.11) (push) Has been cancelled
CI / Determine which jobs to run (push) Has been cancelled
CI / Run integration tests (push) Has been cancelled
CI / Run C++ unit tests (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Run script/clang-tidy for ZEPHYR (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Test components batch (${{ matrix.components }}) (push) Has been cancelled
CI / pre-commit.ci lite (push) Has been cancelled
CI / Build target branch for memory impact (push) Has been cancelled
CI / Build PR branch for memory impact (push) Has been cancelled
CI / Comment memory impact (push) Has been cancelled
CI / CI Status (push) Has been cancelled
Stale / stale (push) Has been cancelled
Lock closed issues and PRs / lock (push) Has been cancelled
Publish Release / Initialize build (push) Has been cancelled
Publish Release / Build and publish to PyPi (push) Has been cancelled
Publish Release / Build ESPHome amd64 (push) Has been cancelled
Publish Release / Build ESPHome arm64 (push) Has been cancelled
Publish Release / Publish ESPHome docker to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome docker to ghcr (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to dockerhub (push) Has been cancelled
Publish Release / Publish ESPHome ha-addon to ghcr (push) Has been cancelled
Publish Release / deploy-ha-addon-repo (push) Has been cancelled
Publish Release / deploy-esphome-schema (push) Has been cancelled
Publish Release / version-notifier (push) Has been cancelled
This commit is contained in:
@@ -5,8 +5,6 @@
|
|||||||
// Once the API is considered stable, this warning will be removed.
|
// Once the API is considered stable, this warning will be removed.
|
||||||
|
|
||||||
#include "esphome/components/infrared/infrared.h"
|
#include "esphome/components/infrared/infrared.h"
|
||||||
#include "esphome/components/remote_transmitter/remote_transmitter.h"
|
|
||||||
#include "esphome/components/remote_receiver/remote_receiver.h"
|
|
||||||
|
|
||||||
namespace esphome::ir_rf_proxy {
|
namespace esphome::ir_rf_proxy {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
remote_receiver:
|
||||||
|
id: ir_receiver
|
||||||
|
pin: ${rx_pin}
|
||||||
|
|
||||||
|
# Test various hardware types with transmitter/receiver using infrared platform
|
||||||
|
infrared:
|
||||||
|
# Infrared receiver
|
||||||
|
- platform: ir_rf_proxy
|
||||||
|
id: ir_rx
|
||||||
|
name: "IR Receiver"
|
||||||
|
remote_receiver_id: ir_receiver
|
||||||
|
|
||||||
|
# RF 900MHz receiver
|
||||||
|
- platform: ir_rf_proxy
|
||||||
|
id: rf_900_rx
|
||||||
|
name: "RF 900 Receiver"
|
||||||
|
frequency: 900 MHz
|
||||||
|
remote_receiver_id: ir_receiver
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
remote_transmitter:
|
||||||
|
id: ir_transmitter
|
||||||
|
pin: ${tx_pin}
|
||||||
|
carrier_duty_percent: 50%
|
||||||
|
|
||||||
|
# Test various hardware types with transmitter/receiver using infrared platform
|
||||||
|
infrared:
|
||||||
|
# Infrared transmitter
|
||||||
|
- platform: ir_rf_proxy
|
||||||
|
id: ir_tx
|
||||||
|
name: "IR Transmitter"
|
||||||
|
remote_transmitter_id: ir_transmitter
|
||||||
|
|
||||||
|
# RF 433MHz transmitter
|
||||||
|
- platform: ir_rf_proxy
|
||||||
|
id: rf_433_tx
|
||||||
|
name: "RF 433 Transmitter"
|
||||||
|
frequency: 433 MHz
|
||||||
|
remote_transmitter_id: ir_transmitter
|
||||||
@@ -1,42 +1,7 @@
|
|||||||
|
network:
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
ssid: MySSID
|
ssid: MySSID
|
||||||
password: password1
|
password: password1
|
||||||
|
|
||||||
api:
|
api:
|
||||||
|
|
||||||
remote_transmitter:
|
|
||||||
id: ir_transmitter
|
|
||||||
pin: ${tx_pin}
|
|
||||||
carrier_duty_percent: 50%
|
|
||||||
|
|
||||||
remote_receiver:
|
|
||||||
id: ir_receiver
|
|
||||||
pin: ${rx_pin}
|
|
||||||
|
|
||||||
# Test various hardware types with transmitter/receiver using infrared platform
|
|
||||||
infrared:
|
|
||||||
# Infrared transmitter
|
|
||||||
- platform: ir_rf_proxy
|
|
||||||
id: ir_tx
|
|
||||||
name: "IR Transmitter"
|
|
||||||
remote_transmitter_id: ir_transmitter
|
|
||||||
|
|
||||||
# Infrared receiver
|
|
||||||
- platform: ir_rf_proxy
|
|
||||||
id: ir_rx
|
|
||||||
name: "IR Receiver"
|
|
||||||
remote_receiver_id: ir_receiver
|
|
||||||
|
|
||||||
# RF 433MHz transmitter
|
|
||||||
- platform: ir_rf_proxy
|
|
||||||
id: rf_433_tx
|
|
||||||
name: "RF 433 Transmitter"
|
|
||||||
frequency: 433 MHz
|
|
||||||
remote_transmitter_id: ir_transmitter
|
|
||||||
|
|
||||||
# RF 900MHz receiver
|
|
||||||
- platform: ir_rf_proxy
|
|
||||||
id: rf_900_rx
|
|
||||||
name: "RF 900 Receiver"
|
|
||||||
frequency: 900 MHz
|
|
||||||
remote_receiver_id: ir_receiver
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
substitutions:
|
||||||
|
tx_pin: GPIO4
|
||||||
|
rx_pin: GPIO5
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
rx: !include common-rx.yaml
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
substitutions:
|
||||||
|
tx_pin: GPIO4
|
||||||
|
rx_pin: GPIO5
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
rx: !include common-rx.yaml
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
substitutions:
|
||||||
|
tx_pin: GPIO4
|
||||||
|
rx_pin: GPIO5
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
rx: !include common-rx.yaml
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
substitutions:
|
||||||
|
tx_pin: GPIO4
|
||||||
|
rx_pin: GPIO5
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
tx: !include common-tx.yaml
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
substitutions:
|
||||||
|
tx_pin: GPIO4
|
||||||
|
rx_pin: GPIO5
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
tx: !include common-tx.yaml
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
substitutions:
|
||||||
|
tx_pin: GPIO4
|
||||||
|
rx_pin: GPIO5
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
tx: !include common-tx.yaml
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
substitutions:
|
||||||
|
tx_pin: GPIO4
|
||||||
|
rx_pin: GPIO5
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
rx: !include common-rx.yaml
|
||||||
|
tx: !include common-tx.yaml
|
||||||
@@ -2,4 +2,7 @@ substitutions:
|
|||||||
tx_pin: GPIO4
|
tx_pin: GPIO4
|
||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
<<: !include common.yaml
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
rx: !include common-rx.yaml
|
||||||
|
tx: !include common-tx.yaml
|
||||||
|
|||||||
@@ -2,4 +2,7 @@ substitutions:
|
|||||||
tx_pin: GPIO4
|
tx_pin: GPIO4
|
||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
<<: !include common.yaml
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
rx: !include common-rx.yaml
|
||||||
|
tx: !include common-tx.yaml
|
||||||
|
|||||||
@@ -2,4 +2,7 @@ substitutions:
|
|||||||
tx_pin: GPIO4
|
tx_pin: GPIO4
|
||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
<<: !include common.yaml
|
packages:
|
||||||
|
common: !include common.yaml
|
||||||
|
rx: !include common-rx.yaml
|
||||||
|
tx: !include common-tx.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user