Skip to content

Instantly share code, notes, and snippets.

@xangin
Created June 22, 2024 15:12
Show Gist options
  • Save xangin/91393bae7ddbc8fc725a2c055a8e5baf to your computer and use it in GitHub Desktop.
Save xangin/91393bae7ddbc8fc725a2c055a8e5baf to your computer and use it in GitHub Desktop.
substitutions:
devicename: dehumidifier
upper_devicename: "dehumidifier"
tx_pin_io: GPIO17
rx_pin_io: GPIO16
esphome:
name: $devicename
friendly_name: ${upper_devicename}
comment: $upper_devicename for Hitachi RD-22FC
project:
name: TaiSEIA.dehumidifier
version: "ESP32_minikit"
esp32:
board: wemos_d1_mini32
framework:
type: arduino
external_components:
- source: github://tsunglung/taixia@master
components: [ taixia ]
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${devicename}
password: "12345678"
captive_portal:
# Enable logging
logger:
baud_rate: 0 # disable serial logging;
# level: VERY_VERBOSE
# Enable Home Assistant API
api:
ota:
- platform: esphome
#web_server:
uart:
id: uart_taixia
tx_pin: $tx_pin_io #pin3 (RX to machine)
rx_pin: $rx_pin_io #pin4 (TX from machine)
baud_rate: 9600
debug:
direction: BOTH
status_led:
pin:
number: GPIO2 # Blue LED
# optional binary sensor to monitor serial connection:
binary_sensor:
- platform: status
name: "Status"
- platform: taixia
type: dehumidifier
water_tank_full:
name: "Water Tank Full"
filter_notify:
name: "Filter Notify"
# side_air_flow:
# name: "Side Air Flow"
# defrost:
# name: "Defrost"
button:
- platform: safe_mode
name: "Safe Mode Boot"
entity_category: diagnostic
- platform: restart
name: "Restart"
- platform: taixia
type: dehumidifier
get_info:
name: "Get Info"
fan:
- platform: taixia
name: Fan
type: dehumidifier
id: fan_dehumidifier
speed: true
speed_count: 4
preset_modes:
- normal
- home
- boost
- sleep
- eco
number:
- platform: taixia
type: dehumidifier
operating_time:
name: "Operating Time"
relative_humidity:
name: "Relative Humidity"
#fan_level:
# name: "Fan Level"
#sound_mode:
# name: "Sound Mode"
light_level:
name: "Light Level"
select:
- platform: taixia
type: dehumidifier
operating_program:
name: "Operation Mode"
options:
- normal
- eco
- home
- boost
- sleep
sensor:
- platform: wifi_signal
name: "WiFi Signal"
update_interval: 60s
- platform: uptime
name: "Uptime"
filters:
- lambda: return x / 3600;
unit_of_measurement: "h"
accuracy_decimals: 1
- platform: internal_temperature
name: "Internal Temperature"
- platform: taixia
type: dehumidifier
#energy_consumption:
# name: "Energy"
error_code:
name: "Error Code"
# pm_2_5:
# name: "PM 2.5"
# odours:
# name: "Odours"
switch:
- platform: taixia
type: dehumidifier
power:
name: "Power Switch"
#lock:
# name: "Lock"
air_flow_auto:
name: "Auto Air Flow"
#mildew_proof:
# name: "Mildew Proof"
humidity_notify:
name: "Humidity Notify"
beeper:
name: "Beeper"
air_purifier:
name: "Air Purifier"
#pm25_detect:
# name: "PM2.5 Detect"
text_sensor:
- platform: version
name: "ESPHome Version"
- platform: wifi_info
ip_address:
name: "IP Address"
- platform: taixia
sa_id:
name: "SA ID"
id: sa_id
brand:
name: "SA Brand"
model:
name: "SA Model"
version:
name: "SA Version"
services:
name: "SA Services"
taixia:
sa_id: 4
# response_time: 0
time:
- platform: homeassistant
id: homeassistant_time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment