Skip to content

Instantly share code, notes, and snippets.

@joergbattermann
Last active April 22, 2025 04:37
Show Gist options
  • Save joergbattermann/f72f9e324821b05d7031e6915b6af32f to your computer and use it in GitHub Desktop.
Save joergbattermann/f72f9e324821b05d7031e6915b6af32f to your computer and use it in GitHub Desktop.
# Based on https://github.com/echavet/MitsubishiCN105ESPHome/discussions/83#discussion-6570366
# and also helpful
# - https://github.com/SwiCago/HeatPump/issues/13#issuecomment-2228886009
substitutions:
name: "mitsubishi-heat-pump-hvac"
friendly_name: "Heat Pump (HVAC)"
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.7.165
gateway: 192.168.7.1
subnet: 255.255.255.0
#mqtt:
#broker: homeassistant.local
#username: !secret mqtt_username
#password: !secret mqtt_password
#discovery: true
#debug:
# update_interval: 5s
# Enable Home Assistant API
api:
encryption:
key: "MY ENC KEY"
services:
- service: reboot
then:
- logger.log: "Restart in progress..."
- lambda: |-
ESP.restart();
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
#type: esp-idf
version: latest
uart:
id: HP_UART
baud_rate: 2400
tx_pin: GPIO1
rx_pin: GPIO2
# Default logging level
logger:
level: INFO
#level: DEBUG
logs:
EVT_SETS : INFO
#EVT_SETS : DEBUG
WIFI : INFO
MQTT : INFO
WRITE_SETTINGS : INFO
SETTINGS : INFO
STATUS : INFO
CN105Climate: WARN
CN105: INFO
#CN105: DEBUG
climate: WARN
sensor: WARN
chkSum : INFO
WRITE : WARN
READ : WARN
Header: INFO
Decoder : INFO
#Decoder : DEBUG
CONTROL_WANTED_SETTINGS: INFO
#CONTROL_WANTED_SETTINGS: DEBUG
captive_portal:
# Enable Web server.
#web_server:
# port: 80
time:
- platform: homeassistant
id: homeassistant_time
# External component reference
external_components:
- source: github://echavet/MitsubishiCN105ESPHome
refresh: 0s
# Climate entity configuration
climate:
- platform: cn105
id: heat_pump_climate
name: "${friendly_name}"
icon: mdi:heat-pump
visual:
min_temperature: 10
max_temperature: 37
temperature_step:
target_temperature: 1
current_temperature: 0.5
supports:
mode: [AUTO, COOL, HEAT, FAN_ONLY, DRY]
fan_mode: [AUTO, LOW, MEDIUM, MIDDLE] # Medium = powerful for our PVA unit.. see https://github.com/echavet/MitsubishiCN105ESPHome/issues/262
swing_mode: [] # This is specific to ducted units that don't have vane(s), if you have a ductless unit, comment this one out
# Timeout and communication settings
remote_temperature_timeout: 15min
update_interval: 5s
debounce_delay : 500ms
# Various optional sensors, not all sensors are supported by all heatpumps
compressor_frequency_sensor:
name: Compressor Frequency
entity_category: diagnostic
disabled_by_default: true
outside_air_temperature_sensor:
name: Outside Air Temp
disabled_by_default: true
vertical_vane_select:
name: Vertical Vane
disabled_by_default: true
horizontal_vane_select:
name: Horizontal Vane
disabled_by_default: true
isee_sensor:
name: ISEE Sensor
disabled_by_default: true
stage_sensor:
name: Stage
id: stage
entity_category: diagnostic
disabled_by_default: true
sub_mode_sensor:
name: Sub Mode
entity_category: diagnostic
disabled_by_default: true
auto_sub_mode_sensor:
name: Auto Sub Mode
entity_category: diagnostic
disabled_by_default: true
input_power_sensor:
name: Input Power
disabled_by_default: true
kwh_sensor:
name: Energy Usage
disabled_by_default: true
runtime_hours_sensor:
name: Runtime Hours
entity_category: diagnostic
disabled_by_default: true
# Just a helper 'button' to restart the controller manually
button:
- platform: restart
name: "Restart ESP32 Controller"
# Text sensors with general information.
text_sensor:
# Exposes the ESPHome version as sensor.
- platform: version
name: ESPHome Version
disabled_by_default: true
# Exposes WiFi information as sensors.
- platform: wifi_info
ip_address:
name: WiFi IP
ssid:
name: WiFi SSID
# Sensors with general information.
sensor:
# Uptime of sensor.
- platform: uptime
name: Uptime
update_interval: 20s
disabled_by_default: true
- platform: internal_temperature
name: ESP32 Controller Temperature
entity_category: diagnostic
# WiFi Signal sensor.
- platform: wifi_signal
name: WiFi Signal Strength (dBm)
id: wifi_signal_db
update_interval: 60s
entity_category: diagnostic
- platform: copy # Reports the WiFi signal strength in %
source_id: wifi_signal_db
name: WiFi Signal Strength (%)
id: wifi_signal_percent
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: " %"
entity_category: diagnostic
device_class: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment