mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-06 11:36:55 +03:00
reorganize examples
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,12 +1,13 @@
|
|||||||
# Gitignore settings for ESPHome
|
# Gitignore settings for ESPHome
|
||||||
# This is an example and may include too much for your use-case.
|
# This is an example and may include too much for your use-case.
|
||||||
# You can modify this file to suit your needs.
|
# You can modify this file to suit your needs.
|
||||||
/.esphome/
|
**/.esphome/
|
||||||
**/.pioenvs/
|
**/.pioenvs/
|
||||||
**/.piolibdeps/
|
**/.piolibdeps/
|
||||||
**/lib/
|
**/lib/
|
||||||
**/src/
|
**/src/
|
||||||
**/platformio.ini
|
**/platformio.ini
|
||||||
/secrets.yaml
|
**/secrets.yaml
|
||||||
/livingroom_ac/
|
**/livingroom_ac/
|
||||||
/kitchen_ac/
|
**/kitchen_ac/
|
||||||
|
/examples/*/*.h
|
||||||
10
examples/advanced/.gitignore
vendored
Normal file
10
examples/advanced/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# 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
|
||||||
@@ -25,8 +25,7 @@ debug:
|
|||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: DEBUG
|
level: DEBUG
|
||||||
# important: for avoiding collisions logger works with UART1 (for esp8266 tx = GPIO2, rx = None)
|
baud_rate: 0
|
||||||
hardware_uart: UART1
|
|
||||||
|
|
||||||
api:
|
api:
|
||||||
password: !secret api_pass
|
password: !secret api_pass
|
||||||
10
examples/simple/.gitignore
vendored
Normal file
10
examples/simple/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# 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
|
||||||
72
examples/simple/aux_ac_simple.yaml
Normal file
72
examples/simple/aux_ac_simple.yaml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
esphome:
|
||||||
|
name: aux_air_conditioner
|
||||||
|
platform: ESP8266
|
||||||
|
board: esp12e
|
||||||
|
includes:
|
||||||
|
- aux_ac_custom_component.h
|
||||||
|
|
||||||
|
# don't forget to set your's wifi settings!
|
||||||
|
wifi:
|
||||||
|
ssid: "WIFI SSID"
|
||||||
|
password: "seCRETpassWORD"
|
||||||
|
manual_ip:
|
||||||
|
static_ip: 192.168.0.2
|
||||||
|
gateway: 192.168.0.1
|
||||||
|
subnet: 255.255.255.0
|
||||||
|
ap:
|
||||||
|
ssid: AUX Hotspot
|
||||||
|
password: "seCREThotSPOTpassWORD"
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
debug:
|
||||||
|
|
||||||
|
logger:
|
||||||
|
level: DEBUG
|
||||||
|
baud_rate: 0
|
||||||
|
|
||||||
|
api:
|
||||||
|
|
||||||
|
ota:
|
||||||
|
|
||||||
|
# UART0 configuration for AUX air conditioner communication
|
||||||
|
uart:
|
||||||
|
id: ac_uart_bus
|
||||||
|
tx_pin: GPIO1
|
||||||
|
rx_pin: GPIO3
|
||||||
|
baud_rate: 4800
|
||||||
|
data_bits: 8
|
||||||
|
parity: EVEN
|
||||||
|
stop_bits: 1
|
||||||
|
|
||||||
|
climate:
|
||||||
|
# register custom AC climate
|
||||||
|
- platform: custom
|
||||||
|
lambda: |-
|
||||||
|
extern AirCon acAirCon;
|
||||||
|
if (!acAirCon.get_initialized()) acAirCon.initAC(id(ac_uart_bus));
|
||||||
|
App.register_component(&acAirCon);
|
||||||
|
return {&acAirCon};
|
||||||
|
climates:
|
||||||
|
- name: AUX hvac
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: custom
|
||||||
|
lambda: |-
|
||||||
|
extern AirCon acAirCon;
|
||||||
|
if (!acAirCon.get_initialized()) acAirCon.initAC(id(ac_uart_bus));
|
||||||
|
App.register_component(&acAirCon);
|
||||||
|
return {acAirCon.sensor_ambient_temperature};
|
||||||
|
sensors:
|
||||||
|
- name: AUX ambient temperature
|
||||||
|
unit_of_measurement: "°C"
|
||||||
|
accuracy_decimals: 1
|
||||||
|
|
||||||
|
text_sensor:
|
||||||
|
- platform: custom
|
||||||
|
lambda: |-
|
||||||
|
auto aircon_firmware_version = new AirConFirmwareVersion();
|
||||||
|
App.register_component(aircon_firmware_version);
|
||||||
|
return {aircon_firmware_version};
|
||||||
|
text_sensors:
|
||||||
|
name: AUX firmware version
|
||||||
|
icon: "mdi:chip"
|
||||||
Reference in New Issue
Block a user