feat: add ESPHome

This commit is contained in:
JJGadgets
2025-07-18 10:15:05 +08:00
parent 0f569c5627
commit dce4efbfcd
5 changed files with 31 additions and 14 deletions

View File

@@ -0,0 +1,9 @@
---
substitutions:
area: "JJ's Room"
name: "AC - CN105"
packages:
cn105: !include
file: ./metadata.yaml
vars:
include: ./mitsubishi-cn105-bt-proxy.yaml

View File

@@ -6,7 +6,8 @@ configMapGenerator:
files:
- ./common.yaml
- ./wifi.yaml
- ./metadata.yaml
- ./mitsubishi-cn105-bt-proxy.yaml
- ./living-room-ac.yaml
- ./jj-room-ac.yaml
generatorOptions:
disableNameSuffixHash: true # Reloader

View File

@@ -1,7 +0,0 @@
---
substitutions:
area_id: master_bedroom
area_name: "Master Bedroom"
packages:
cn105: !include
file: ./mitsubishi-cn105-bt-proxy.yaml

View File

@@ -0,0 +1,12 @@
---
substitutions:
include: "$${include}"
area_name: "$${area}"
area_dns: >
$${area | replace("'s", "") | replace("_", "-") | replace(" - ", "-") | replace(" ", "-") | lower}
area_id: >
$${area | replace("'", "_") | replace(" - ", "-") | replace(" ", "-") | replace("-", "_") | lower}
name_dns: >
$${name | replace("_", "-") | replace(" - ", "-") | replace(" ", "-") | lower}
packages: !include "$${include}"

View File

@@ -1,9 +1,11 @@
---
substitutions:
area: "$${area}"
name: "AC CN105"
friendly_name: "Air Conditioner"
description: "Mitsubishi CN105 compatible ESP32 serial air conditioner controller for $${area_name}"
area_id: "$${area_id}"
area_dns: "$${area_dns}"
name: "$${name}"
name_dns: "$${name_dns}"
description: "Mitsubishi CN105 compatible ESP32 serial air conditioner controller for $${area}"
packages:
common: !include
file: ./common.yaml
@@ -15,8 +17,8 @@ external_components:
- source: github://echavet/MitsubishiCN105ESPHome
climate: # Climate entity config
- platform: cn105
id: aircon_$${area_id}
name: "Air Conditioner - $${area_name}"
id: "aircon_$${area_id}"
name: "Air Conditioner - $${area}"
update_interval: 2s # update interval can be adjusted after a first run and logs monitoring
uart:
id: HP_UART
@@ -44,8 +46,8 @@ api:
# Optimizations
logger:
baud_rate: 0 # 0 Enables logging, but disables serial-port logging to free CPU and memory
level: INFO
baud_rate: 0 # 0 Enables logging, but disables serial-port logging to free CPU and memory
esp32:
board: esp32-s3-devkitc-1
framework: