Skip to content

Instantly share code, notes, and snippets.

@joergbattermann
Last active November 5, 2025 21:01
Show Gist options
  • Save joergbattermann/ebd5ffed92d6eef955c82fff6377e68c to your computer and use it in GitHub Desktop.
Save joergbattermann/ebd5ffed92d6eef955c82fff6377e68c to your computer and use it in GitHub Desktop.
substitutions:
name: mitp-heat-pump-adae60
friendly_name: Mitsubishi Heat Pump
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
esphome:
name: ${name}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
# See https://muart-group.github.io/user/configuration/useful-snippets#setting-a-default-temperature-source
# for why this is here / sets Thermostat on boot
project:
name: tinwer.mahtanarm
version: "1.4"
on_boot:
priority: 260
then:
- select.set:
id: temperature_source_selected
option: "Thermostat"
# Load the mitsubishi_itp component from this repo for now (hopefully eventually it will merged in ESPHome)
external_components:
- source: github://muart-group/esphome-components@dev
components: [mitsubishi_itp]
# This should point to the public location of this yaml file.
dashboard_import:
package_import_url: github://tinwer-group/mahtanar/esphome-configs/[email protected]
import_full_config: true
# Serial logging disabled to support communication with thermostat. Can be reenabled by disabling tstat_uart below, and specifying baud_rate.
logger:
baud_rate: 0
level: INFO
logs:
sensor: WARN
# Enable Home Assistant / ESPHome API
api:
encryption:
key: "NOT TELLING / SET BEFORE USING"
# services:
# - service: reboot
# then:
# - logger.log: "Restarting ESP32 controller..."
# - lambda: |-
# ESP.restart();
# Enable ota updates (no password here, but one will be generated during adoption)
ota:
platform: esphome
# Enable Ethernet (no WiFi can be configured with Ethernet)
ethernet:
type: W5500
mosi_pin: GPIO09
miso_pin: GPIO01
clk_pin: GPIO10
cs_pin: GPIO5
reset_pin: GPIO04
interrupt_pin: GPIO03
clock_speed: 25MHz
manual_ip:
static_ip: 192.168.7.205
gateway: 192.168.7.1
subnet: 255.255.255.0
dns1: 192.168.7.1
# Define UARTs connected to heat pump and thermostat
uart:
- id: hp_uart
baud_rate: 2400 # For some equipment this may need to be 9600
parity: EVEN
rx_pin:
number: GPIO7
tx_pin:
number: GPIO6
- id: tstat_uart
baud_rate: 2400 # For some equipment this may need to be 9600
parity: EVEN
rx_pin:
number: GPIO20
tx_pin:
number: GPIO21
time:
- platform: homeassistant
id: homeassistant_time
# - platform: sntp # see https://esphome.io/components/time/sntp.html
# id: sntp_time
# timezone: "America/Los_Angeles"
# Mitsubishi has its own temperature conversion table, see https://muart-group.github.io/user/configuration/useful-snippets#use-mitsubishi-temperature-conversion
globals:
- id: mitsubishi_temperature_conversion_values_in_celsius
type: float[157]
initial_value: |-
{-18,
-17.5,
-17,
-16.5,
-16,
-15.5,
-15,
-14.5,
-14,
-13.5,
-13,
-12.5,
-12,
-11.5,
-11,
-10.5,
-10,
-9.5,
-9,
-8.5,
-8,
-7.5,
-7,
-6.5,
-6,
-5.5,
-5,
-4.5,
-4,
-3.5,
-3,
-2.5,
-2,
-1.5,
-1,
-0.5,
0,
0.5,
1,
1.5,
2,
2.5,
3,
3.5,
4,
4.5,
5,
5.5,
6,
6.5,
7,
7.5,
8,
8.5,
9,
9.5,
10,
10.5,
11,
11.5,
12,
12.5,
13,
13.5,
14,
14.5,
15,
15.5,
16,
16.5,
17,
17.5,
18,
18.5,
19,
19.5,
20,
20.5,
21,
21.5,
22,
22.5,
23,
23.5,
24,
24.5,
25,
25.5,
26,
26.5,
27,
27.5,
28,
28.5,
29,
29.5,
30,
30.5,
31,
31.5,
32,
32.5,
33,
33.5,
34,
34.5,
35,
35.5,
36,
36.5,
37,
37.5,
38,
38.5,
39,
39.5,
40,
40.5,
41,
41.5,
42,
42.5,
43,
43.5,
44,
44.5,
45,
45.5,
46,
46.5,
47,
47.5,
48,
48.5,
49,
49.5,
50,
50.5,
51,
51.5,
52,
52.5,
53,
53.5,
54,
54.5,
55,
55.5,
56,
56.5,
57,
57.5,
58,
58.5,
59,
59.5,
60}
- id: mitsubishi_temperature_conversion_values_in_fahrenheit
type: float[157]
initial_value: |-
{0,
1,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
46,
47,
48,
49,
50,
51,
52,
53,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
67,
68,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
88,
89,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
136,
137,
138,
139,
140}
# Define mitsubishi_itp climate component
climate:
- platform: mitsubishi_itp
name: Climate
uart_heatpump: hp_uart
uart_thermostat: tstat_uart # This and the uart component below can be removed if no thermostat connected
update_interval: 5s # This should be a relatively safe default, but can be adjusted if desired
icon: mdi:heat-pump
visual:
min_temperature: 10
max_temperature: 37
temperature_step:
target_temperature: 1
current_temperature: 1 #0.5
supported_modes: ['AUTO', 'COOL', 'HEAT', 'FAN_ONLY', 'HEAT_COOL', 'DRY', 'OFF'] # DRY is another one but not enabled currently on the MHK
supported_fan_modes: [AUTO, LOW, MEDIUM, HIGH]
enhanced_mhk: false
time_id: homeassistant_time
# This default configuration includes all the common sensors, but these can each be commented out if your
# equipment doesn't support them or they are not needed.
binary_sensor:
- platform: mitsubishi_itp
defrost:
# Reports if system is in defrost
name: Defrost
filter_status:
# Reports if filter needs to be replaced (false = OK)
name: Filter Status
# isee_status:
# # Reports if i-see is enabled
# name: i-see Status
preheat:
# Reports if system is preheating
name: Preheat
disabled_by_default: true
standby:
# Reports if system is in standby
name: Standby
disabled_by_default: true
sensor:
- platform: mitsubishi_itp
compressor_frequency:
# Frequency in Hz of compressor (only some equipment)
name: Compressor Frequency
outdoor_temperature:
# Outdoor temperature as reported by equipment
name: "Outdoor Temperature"
unit_of_measurement: "°C"
filters:
- lambda: |-
if (x > -63) return x;
return NAN;
# Only available if a thermostat is connected
thermostat_humidity:
# Humidity reported by thermostat (only with enhanced_mhk)
name: "Thermostat Humidity"
# Only available if a thermostat is connected
thermostat_temperature:
# Temperature reported by thermostat
name: "Thermostat Temperature"
unit_of_measurement: "°C"
# - platform: template
# name: "Temperature in F"
# lambda: |-
# float celsius = id(temperature_source_in_c).state;
# for (int i = 0; i < sizeof(id(mitsubishi_temperature_conversion_values_in_celsius))/sizeof(id(mitsubishi_temperature_conversion_values_in_celsius)[0]); i++) {
# if (id(mitsubishi_temperature_conversion_values_in_celsius)[i] == celsius) {
# return id(mitsubishi_temperature_conversion_values_in_fahrenheit)[i];
# }
# }
# // Default fallback if exact match is not found
# return (celsius * 9.0 / 5.0) + 32.0;
# update_interval: 60s
text_sensor:
- platform: mitsubishi_itp
actual_fan:
# Actual current fan speed (vs. set speed)
name: Actual Fan
error_code:
# Reports diagnostic error code
name: Error Code
button:
- platform: restart
name: "Restart ESP Controller"
- platform: mitsubishi_itp
filter_reset_button:
# Resets the change-filter warning when pressed
name: Reset Change Filter Warning
select:
- platform: mitsubishi_itp
# vane_position:
# # Contols vertical vanes on supported units
# name: Vane Position
# disabled_by_default: true
# horizontal_vane_position:
# # Contols horizontal vanes on supported units
# name: H. Vane Position
# disabled_by_default: true
temperature_source:
# A list of additional temperature source sensors. Included in this default
# config so that Thermostat can be selected if configured.
name: Temperature Source
id: temperature_source_selected
sources: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment