Delete ESPHome Configuration/esp360remote.yaml

This commit is contained in:
ale1800 2024-09-15 09:37:33 +02:00 committed by GitHub
parent 35bf068d36
commit 0aa1021ccc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,183 +0,0 @@
substitutions:
name: "esp360remote"
friendly_name: "ESP360Remote"
project_name: "ale1800.ESP360Remote"
project_version: "2.0"
esphome:
name: "${name}"
name_add_mac_suffix: true
project:
name: "${project_name}"
version: "${project_version}"
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: send_ir_raw
variables:
command: int[]
then:
- remote_transmitter.transmit_raw:
transmitter_id: IR_TX
code: !lambda 'return command;'
- service: send_rf_raw
variables:
protocol_number: int
raw_data: string
repeat_times: int
wait_time: int
then:
- remote_transmitter.transmit_rc_switch_raw:
transmitter_id: RF_TX
protocol: !lambda 'return esphome::remote_base::RC_SWITCH_PROTOCOLS[protocol_number];'
code: !lambda 'return raw_data;'
repeat:
times: !lambda 'return repeat_times;'
wait_time: !lambda 'return wait_time;'
ota:
- platform: esphome
wifi:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${name}"
password: ""
# Sets up the improv via serial client for Wi-Fi provisioning
improv_serial:
esp32_improv:
authorizer: false
dashboard_import:
package_import_url: github://esphome/esphome-project-template/project-template-esp32.yaml@v6
import_full_config: false # or true
web_server:
port: 80
captive_portal:
#i2c bus definition
i2c:
sda: 21
scl: 22
scan: true
id: bus_a
#Offsets have been added to the measurements taken.
#These are necessary due to the heat generated by the PCB, the second layer of the board, and the case.
#This way, sufficiently accurate values are obtained for automations
sensor:
- platform: shtcx
temperature:
name: "Living Room Temperature"
filters:
- median:
window_size: 5
send_every: 1
- offset: -3.7
humidity:
name: "Living Room Humidity"
filters:
- median:
window_size: 5
send_every: 1
- offset: +19.1
address: 0x70
update_interval: 300s
- platform: bh1750
name: "BH1750 Illuminance"
filters:
- multiply: 5
address: 0x23
update_interval: 1s
#Setting up IR and RF receivers
remote_receiver:
- id: RF_RX
pin:
number: GPIO5
inverted: True
dump:
# - raw #(delete # for raw data)
- rc_switch
tolerance: 35%
filter: 200us
idle: 4ms
buffer_size: 10kb
on_rc_switch:
- homeassistant.event:
event: esphome.rf_code_received_test
data:
protocol: !lambda 'return x.protocol;'
code: !lambda 'return x.code;'
- id: IR_RX
pin:
number: GPIO19
inverted: true
mode:
input: true
pullup: true
dump: all
on_raw:
- homeassistant.event:
event: esphome.ir_raw_code_received
data:
code: !lambda '
reverse(x.begin(), x.end());
std::string str = "";
for (auto it = x.begin(); it != x.end(); ++it)
{
str += to_string(*it);
str += ",";
if (it != x.end() - 1) str += " ";
}
if (str.size() > 0) str.erase( str.end() - 2);
return esphome::to_string("[" + str + "]");'
on_pronto:
- homeassistant.event:
event: esphome.ir_pronto_code_received
data:
code: !lambda 'return x.data;'
on_lg:
- homeassistant.event:
event: esphome.ir_lg_code_received
data:
data: !lambda 'return x.data;'
nbits: !lambda 'return x.nbits;'
on_panasonic:
- homeassistant.event:
event: esphome.ir_panasonic_code_received
data:
address: !lambda 'return x.address;'
command: !lambda 'return x.command;'
#Setting up IR and RF transmitters
remote_transmitter:
- id: RF_TX
pin: GPIO18
carrier_duty_percent: 100%
- id: IR_TX
pin: GPIO13
carrier_duty_percent: 50%
#Status LED
switch:
- platform: gpio
pin: 12
name: "Status Led"
restore_mode: ALWAYS_ON