upd: platform keyword was removed according to the esphome ver. 2025.2.0 + minor fixes

This commit is contained in:
GrKoR
2025-02-20 22:20:45 -08:00
parent 078a6b20cf
commit a7d2a73802
14 changed files with 6 additions and 1110 deletions

1
.gitignore vendored
View File

@@ -12,6 +12,5 @@
**/livingroom_ac/ **/livingroom_ac/
**/kitchen_ac/ **/kitchen_ac/
/examples/*/*.h /examples/*/*.h
**/tests/test_*
**/__pycache__ **/__pycache__
**/private/ **/private/

View File

@@ -36,7 +36,7 @@ The best way to report about your test results is writing a message in the [tele
For correct component operation, you need hardware and firmware. The hardware description is located [in a separate file](docs/HARDWARE-EN.md). For correct component operation, you need hardware and firmware. The hardware description is located [in a separate file](docs/HARDWARE-EN.md).
### Firmware: Integration aux_ac to your configuration ### ### Firmware: Integration aux_ac to your configuration ###
You need [ESPHome](https://esphome.io) v.1.18.0 or above. `External_components` have appeared in this version. But it is better to use ESPHome v.1.20.4 or above, cause there were a lot of `external_components` errors corrected before this version. You need [ESPHome](https://esphome.io) v.2025.2.0 or above. You can try esphome before 2025.2.0 but I can't guarantee error-free compilation of the examples.
## Installing ## ## Installing ##
1. Declare external component. Read [the manual](https://esphome.io/components/external_components.html?highlight=external) for details. 1. Declare external component. Read [the manual](https://esphome.io/components/external_components.html?highlight=external) for details.

View File

@@ -43,7 +43,7 @@ AUX - это один из нескольких OEM-производителей
Для работы с кондиционером понадобится "железо" и прошивка. Описание электроники вынесено [в отдельный файл](docs/HARDWARE.md). Для работы с кондиционером понадобится "железо" и прошивка. Описание электроники вынесено [в отдельный файл](docs/HARDWARE.md).
### Прошивка: интеграция aux_ac в вашу конфигурацию ESPHome ### ### Прошивка: интеграция aux_ac в вашу конфигурацию ESPHome ###
Для использования требуется [ESPHome](https://esphome.io) версией не ниже 1.18.0. Именно в этой версии появились `external_components`. Но лучше использовать версию 1.20.4 или старше, так как до этой версии массированно исправлялись ошибки в механизме подключения внешних компонентов.<br /> Для использования требуется [ESPHome](https://esphome.io) версией не ниже 2025.2.0. Работа с более ранними версиями возможна, но не гарантируется.<br />
## Установка ## ## Установка ##
1. Подключите компонент. 1. Подключите компонент.

View File

@@ -7,7 +7,8 @@ external_components:
esphome: esphome:
name: $devicename name: $devicename
platform: ESP8266
esp8266:
board: esp12e board: esp12e
wifi: wifi:

View File

@@ -5,7 +5,8 @@ external_components:
esphome: esphome:
name: aux_air_conditioner name: aux_air_conditioner
platform: ESP8266
esp8266:
board: esp12e board: esp12e
# don't forget to set your's wifi settings! # don't forget to set your's wifi settings!

10
tests/.gitignore vendored
View File

@@ -1,10 +0,0 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
**/.pioenvs/
**/.piolibdeps/
**/lib/
**/src/
**/platformio.ini
/secrets.yaml

View File

@@ -1,191 +0,0 @@
import time
import aioesphomeapi
import asyncio
import re
import sys
import argparse
from aioesphomeapi.api_pb2 import (LOG_LEVEL_NONE,
LOG_LEVEL_ERROR,
LOG_LEVEL_WARN,
LOG_LEVEL_INFO,
LOG_LEVEL_DEBUG,
LOG_LEVEL_VERBOSE,
LOG_LEVEL_VERY_VERBOSE)
def createParser ():
parser = argparse.ArgumentParser(
description='''This script is used for collecting logs from ac_aux ESPHome component.
For more info, see https://github.com/GrKoR/ac_python_logger''',
add_help = False)
parent_group = parser.add_argument_group (title='Params')
parent_group.add_argument ('--help', '-h', action='help', help='show this help message and exit')
parent_group.add_argument ('-i', '--ip', nargs=1, required=True, help='IP address of the esphome device')
parent_group.add_argument ('-p', '--pwd', nargs=1, required=True, help='native API password for the esphome device')
return parser
async def main():
"""Connect to an ESPHome device and wait for state changes."""
api = aioesphomeapi.APIClient(namespace.ip[0], 6053, namespace.pwd[0])
try:
await api.connect(login=True)
except aioesphomeapi.InvalidAuthAPIError as e:
return print(e)
print(api.api_version)
async def display_off():
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x01, 0x00, 0x0F, 0x00, 0x01, 0x01, 0x97, 0xE0, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x00],
}
)
async def display_on():
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x01, 0x00, 0x0F, 0x00, 0x01, 0x01, 0x97, 0xE0, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00],
}
)
async def ac_enable():
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x00, 0x87, 0xE0, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00],
}
)
async def ac_disable():
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x00, 0x87, 0xE0, 0x2F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
}
)
async def ac_get11_01():
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x02, 0x00, 0x11, 0x01],
}
)
async def ac_get11_00():
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x02, 0x00, 0x11, 0x00],
}
)
async def ac_set_vlouver(lvr):
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x01, lvr, 0xE0, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00],
}
)
async def ac_set_hlouver(lvr):
await api.execute_service(
service,
data={
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x01, 0x97, lvr, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00],
}
)
# key надо искать в выводе list_entities_services
service = aioesphomeapi.UserService(
name="send_data",
key=311254518,
args=[
aioesphomeapi.UserServiceArg(name="data_buf", type=aioesphomeapi.UserServiceArgType.INT_ARRAY),
],
)
time.sleep(7)
await ac_get11_00()
time.sleep(7)
await ac_get11_01()
#await ac_set_vlouver( 0b10010000 ) # swing on
#await ac_set_vlouver( 0b10010111 ) # swing off
#await ac_set_vlouver( 0b10010001 ) # 1
#await ac_set_vlouver( 0b10010010 ) # 2
#await ac_set_vlouver( 0b10010011 ) # 3
#await ac_set_vlouver( 0b10010100 ) # 4
#await ac_set_vlouver( 0b10010101 ) # 5
#await ac_set_vlouver( 0b10010110 ) # не работает, сбрасывает на swing on
#time.sleep(5)
#await ac_set_hlouver( 0b00000000 ) # swing on
#await ac_set_hlouver( 0b11100000 ) # swing off
#await ac_set_hlouver( 0b00100000 ) # не работает, сбрасывает в swing off
#await ac_set_hlouver( 0b01000000 ) # не работает, сбрасывает в swing off
#await ac_set_hlouver( 0b01100000 ) # не работает, сбрасывает в swing off
#await ac_set_hlouver( 0b10000000 ) # не работает, сбрасывает в swing off
#await ac_set_hlouver( 0b10100000 ) # не работает, сбрасывает в swing off
#await ac_set_hlouver( 0b11000000 ) # не работает, сбрасывает в swing off
#time.sleep(5)
async def test_byte(bt):
await api.execute_service(
service,
data={
#display on
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x01, 0x97, 0xE0, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00],
#display off
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x01, 0x97, 0xE0, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x00],
# swing on
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x01, 0x90, 0xE0, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00],
# swing off
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#"data_buf": [0xBB, 0x00, 0x06, 0x80, 0x00, 0x00, 0x0F, 0x00, 0x01, 0x01, 0x97, 0xE0, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00],
}
)
'''
не проходит команда, если байт 1 или 7 не 0x00
не проходит команда, если байт 3 не 0x80
проходит и не меняется, если меняю байт 4 или 5
'''
#await test_byte(0b10000110)
#await test_byte(0b01000110)
#await test_byte(0b00100110)
#await test_byte(0b00010110)
time.sleep(2)
parser = createParser()
namespace = parser.parse_args()
print("IP: ", namespace.ip[0])
loop = asyncio.get_event_loop()
try:
#asyncio.ensure_future(main())
#loop.run_forever()
loop.run_until_complete(main())
except aioesphomeapi.InvalidAuthAPIError as e:
print(e)
except KeyboardInterrupt:
pass
finally:
loop.close()
pass

View File

@@ -1,122 +0,0 @@
external_components:
- source: github://GrKoR/esphome_aux_ac_component@dev
components: [ aux_ac ]
refresh: 0s
substitutions:
devicename: test_aux_ac_ext_esp32
upper_devicename: Test AUX
esphome:
name: $devicename
platform: ESP32
board: nodemcu-32s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
manual_ip:
static_ip: 192.168.0.151 # Для примера
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
ota:
- platform: esphome
password: !secret ota_pass
uart:
id: ac_uart_bus
#tx_pin: GPIO1
#rx_pin: GPIO3
tx_pin: TX
rx_pin: RX
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
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

View File

@@ -1,157 +0,0 @@
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

View File

@@ -1,163 +0,0 @@
external_components:
- source: github://GrKoR/esphome_aux_ac_component@dev
components: [ aux_ac ]
refresh: 0s
substitutions:
devicename: test_ext_power_limitations
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
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
timeout: 150
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 Inverter Power
id: ${devicename}_invertor_power
internal: false
preset_reporter:
name: $upper_devicename Preset Reporter
id: ${devicename}_preset_reporter
internal: false
inverter_power_limit_value:
name: $upper_devicename Inverter Power Limit Value
id: ${devicename}_inverter_power_limit_value
internal: false
inverter_power_limit_state:
name: $upper_devicename Inverter Power Limit State
id: ${devicename}_inverter_power_limit_state
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
button:
- platform: template
name: ${upper_devicename} IPower Limit Off
icon: "mdi:power-plug-off-outline"
on_press:
- aux_ac.power_limit_off: aux_id
- platform: template
name: ${upper_devicename} IPower Limit On Half
icon: "mdi:fraction-one-half"
on_press:
- aux_ac.power_limit_on:
id: aux_id
limit: 50
number:
- platform: template
name: ${upper_devicename} IPower Limit Value
id: ${devicename}_ipower_limit_value
icon: "mdi:battery-unknown"
mode: "slider"
min_value: 30
max_value: 100
step: 1
set_action:
then:
- lambda: !lambda |-
id(aux_id).powerLimitationOnSequence( x );

View File

@@ -1,126 +0,0 @@
external_components:
- source:
type: local
path: ../components
substitutions:
devicename: test_local_airflow_dir
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: $upper_devicename Fallback Hotspot
password: !secret wifi_ap_pass
logger:
level: DEBUG
baud_rate: 0
api:
password: !secret api_pass
reboot_timeout: 0s
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
button:
- platform: template
name: ${upper_devicename} VLouver Stop
icon: "mdi:circle-small"
on_press:
- aux_ac.vlouver_stop: aux_id
- platform: template
name: ${upper_devicename} VLouver Swing
icon: "mdi:pan-vertical"
on_press:
- aux_ac.vlouver_swing: aux_id
- platform: template
name: ${upper_devicename} VLouver Top
icon: "mdi:pan-up"
on_press:
- aux_ac.vlouver_top: aux_id
- platform: template
name: ${upper_devicename} VLouver Middle Above
icon: "mdi:pan-top-left"
on_press:
- aux_ac.vlouver_middle_above: aux_id
- platform: template
name: ${upper_devicename} VLouver Middle
icon: "mdi:pan-left"
on_press:
- aux_ac.vlouver_middle: aux_id
- platform: template
name: ${upper_devicename} VLouver Middle Below
icon: "mdi:pan-bottom-left"
on_press:
- aux_ac.vlouver_middle_below: aux_id
- platform: template
name: ${upper_devicename} VLouver Bottom
icon: "mdi:pan-down"
on_press:
- aux_ac.vlouver_bottom: aux_id
number:
- platform: template
name: ${upper_devicename} Vertical Louver
id: ${devicename}_vlouver
icon: "mdi:circle-small"
mode: "slider"
min_value: 0
max_value: 6
step: 1
set_action:
then:
- lambda: !lambda |-
if (x == 6) x = 7; // делаем так, чтобы выключение отрабатывать корректно
id(aux_id).setVLouverSequence( static_cast<esphome::aux_ac::ac_louver_V>(x) );

View File

@@ -1,163 +0,0 @@
external_components:
- source:
type: local
path: ../components
substitutions:
devicename: test_local_power_limitations
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
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
timeout: 150
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 Inverter Power
id: ${devicename}_invertor_power
internal: false
preset_reporter:
name: $upper_devicename Preset Reporter
id: ${devicename}_preset_reporter
internal: false
inverter_power_limit_value:
name: $upper_devicename Inverter Power Limit Value
id: ${devicename}_inverter_power_limit_value
internal: false
inverter_power_limit_state:
name: $upper_devicename Inverter Power Limit State
id: ${devicename}_inverter_power_limit_state
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
button:
- platform: template
name: ${upper_devicename} IPower Limit Off
icon: "mdi:power-plug-off-outline"
on_press:
- aux_ac.power_limit_off: aux_id
- platform: template
name: ${upper_devicename} IPower Limit On Half
icon: "mdi:fraction-one-half"
on_press:
- aux_ac.power_limit_on:
id: aux_id
limit: 50
number:
- platform: template
name: ${upper_devicename} IPower Limit Value
id: ${devicename}_ipower_limit_value
icon: "mdi:battery-unknown"
mode: "slider"
min_value: 30
max_value: 100
step: 1
set_action:
then:
- lambda: !lambda |-
id(aux_id).powerLimitationOnSequence( x );

View File

@@ -1,124 +0,0 @@
external_components:
- source:
type: local
path: ../components
substitutions:
devicename: test_local_airflow_dir
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
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

View File

@@ -1,49 +0,0 @@
external_components:
- source:
type: local
path: ../components
#- source: github://GrKoR/esphome_aux_ac_component@dev
#components: [ aux_ac ]
#refresh: 0s
substitutions:
devicename: test_local_minimal
upper_devicename: Test AUX
esphome:
name: $devicename
platform: ESP8266
board: esp12e
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
reboot_timeout: 0s
ap:
ssid: $upper_devicename Fallback Hotspot
password: !secret wifi_ap_pass
logger:
level: DEBUG
baud_rate: 0
api:
password: !secret api_pass
reboot_timeout: 0s
ota:
- platform: esphome
password: !secret ota_pass
uart:
id: ac_uart_bus
tx_pin: GPIO1
rx_pin: GPIO3
baud_rate: 4800
data_bits: 8
parity: EVEN
stop_bits: 1
climate:
- platform: aux_ac
name: $upper_devicename