mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-06 03:26:56 +03:00
157 lines
4.0 KiB
YAML
157 lines
4.0 KiB
YAML
external_components:
|
||
- source: github://GrKoR/esphome_aux_ac_component@dev
|
||
components: [ aux_ac ]
|
||
refresh: 0s
|
||
|
||
substitutions:
|
||
devicename: test_aux_ac_ext_engeneer
|
||
upper_devicename: Test AUX
|
||
|
||
esphome:
|
||
name: $devicename
|
||
platform: ESP8266
|
||
board: esp12e
|
||
|
||
wifi:
|
||
ssid: !secret wifi_ssid
|
||
password: !secret wifi_pass
|
||
manual_ip:
|
||
static_ip: !secret wifi_ip
|
||
gateway: !secret wifi_gateway
|
||
subnet: !secret wifi_subnet
|
||
dns1: 8.8.8.8
|
||
dns2: 1.1.1.1
|
||
reboot_timeout: 0s
|
||
ap:
|
||
ssid: Test AUX Fallback Hotspot
|
||
password: !secret wifi_ap_pass
|
||
|
||
logger:
|
||
level: DEBUG
|
||
baud_rate: 0
|
||
|
||
api:
|
||
password: !secret api_pass
|
||
reboot_timeout: 0s
|
||
services:
|
||
# этот сервис можно вызвать из Home Assistant или Python. Он отправляет полученные байты в кондиционер
|
||
- service: send_data
|
||
variables:
|
||
data_buf: int[]
|
||
then:
|
||
# ВАЖНО! Только для инженеров!
|
||
# Вызывайте метод aux_ac.send_packet только если понимаете, что делаете! Он не проверяет данные, а передаёт
|
||
# кондиционеру всё как есть. Какой эффект получится от передачи кондиционеру рандомных байт, никто не знает.
|
||
# Вы действуете на свой страх и риск.
|
||
- aux_ac.send_packet:
|
||
id: aux_id
|
||
data: !lambda |-
|
||
std::vector<uint8_t> data{};
|
||
for (int n : data_buf) {
|
||
data.push_back( (uint8_t) n );
|
||
}
|
||
return data;
|
||
|
||
ota:
|
||
- platform: esphome
|
||
password: !secret ota_pass
|
||
|
||
web_server:
|
||
port: 80
|
||
|
||
uart:
|
||
id: ac_uart_bus
|
||
tx_pin: GPIO1
|
||
rx_pin: GPIO3
|
||
baud_rate: 4800
|
||
data_bits: 8
|
||
parity: EVEN
|
||
stop_bits: 1
|
||
|
||
sensor:
|
||
- platform: uptime
|
||
name: Uptime Sensor
|
||
|
||
climate:
|
||
- platform: aux_ac
|
||
name: $upper_devicename
|
||
id: aux_id
|
||
uart_id: ac_uart_bus
|
||
period: 7s
|
||
show_action: true
|
||
display_inverted: true
|
||
optimistic: true
|
||
indoor_temperature:
|
||
name: $upper_devicename Indoor Temperature
|
||
id: ${devicename}_indoor_temp
|
||
internal: false
|
||
display_state:
|
||
name: $upper_devicename Display State
|
||
id: ${devicename}_display_state
|
||
internal: false
|
||
outdoor_temperature:
|
||
name: $upper_devicename Outdoor Temperature
|
||
id: ${devicename}_outdoor_temp
|
||
internal: false
|
||
outbound_temperature:
|
||
name: $upper_devicename Coolant Outbound Temperature
|
||
id: ${devicename}_outbound_temp
|
||
internal: false
|
||
inbound_temperature:
|
||
name: $upper_devicename Coolant Inbound Temperature
|
||
id: ${devicename}_inbound_temp
|
||
internal: false
|
||
compressor_temperature:
|
||
name: $upper_devicename Compressor Temperature
|
||
id: ${devicename}_strange_temp
|
||
internal: false
|
||
defrost_state:
|
||
name: $upper_devicename Defrost State
|
||
id: ${devicename}_defrost_state
|
||
internal: false
|
||
inverter_power:
|
||
name: $upper_devicename Invertor Power
|
||
id: ${devicename}_invertor_power
|
||
internal: false
|
||
preset_reporter:
|
||
name: $upper_devicename Preset Reporter
|
||
id: ${devicename}_preset_reporter
|
||
internal: false
|
||
visual:
|
||
min_temperature: 16
|
||
max_temperature: 32
|
||
temperature_step: 0.5
|
||
supported_modes:
|
||
- HEAT_COOL
|
||
- COOL
|
||
- HEAT
|
||
- DRY
|
||
- FAN_ONLY
|
||
custom_fan_modes:
|
||
- MUTE
|
||
- TURBO
|
||
supported_presets:
|
||
- SLEEP
|
||
custom_presets:
|
||
- CLEAN
|
||
- HEALTH
|
||
- ANTIFUNGUS
|
||
supported_swing_modes:
|
||
- VERTICAL
|
||
- HORIZONTAL
|
||
- BOTH
|
||
|
||
|
||
switch:
|
||
- platform: template
|
||
name: AC Display
|
||
lambda: |-
|
||
if (id(${devicename}_display_state).state) {
|
||
return true;
|
||
} else {
|
||
return false;
|
||
}
|
||
turn_on_action:
|
||
- aux_ac.display_on: aux_id
|
||
turn_off_action:
|
||
- aux_ac.display_off: aux_id |