mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-06 19:46:57 +03:00
reorganize examples
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,12 +1,13 @@
|
||||
# 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/
|
||||
**/.esphome/
|
||||
**/.pioenvs/
|
||||
**/.piolibdeps/
|
||||
**/lib/
|
||||
**/src/
|
||||
**/platformio.ini
|
||||
/secrets.yaml
|
||||
/livingroom_ac/
|
||||
/kitchen_ac/
|
||||
**/secrets.yaml
|
||||
**/livingroom_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:
|
||||
level: DEBUG
|
||||
# important: for avoiding collisions logger works with UART1 (for esp8266 tx = GPIO2, rx = None)
|
||||
hardware_uart: UART1
|
||||
baud_rate: 0
|
||||
|
||||
api:
|
||||
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