Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- substitutions:
- devicename: climate-mhi
- mhi_device_id: climate_mhi
- device_id: "climate_m"
- upper_devicename: "Climate-MHI"
- brand: "MHI"
- model_name: "Climate"
- esphome:
- name: $devicename
- friendly_name: ${upper_devicename}
- comment: ESP32C3 for $model_name
- project:
- name: "$brand.$model_name"
- version: "ESP32C3" #hardware
- external_components:
- - source: github://hberntsen/mhi-ac-ctrl-esp32-c3/esphome
- components: [ MhiAcCtrl ]
- esp32:
- board: airm2m_core_esp32c3
- framework:
- type: esp-idf
- wifi:
- networks:
- - ssid: !secret wifi_ssid
- password: !secret wifi_password
- - ssid: !secret my_phone_ap_ssid
- password: !secret my_phone_ap_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
- status_led:
- pin:
- number: GPIO8 # Blue LED
- #inverted: True
- # optional binary sensor to monitor serial connection:
- binary_sensor:
- - platform: status
- name: "Status"
- button:
- - platform: safe_mode
- name: Safe Mode Boot
- entity_category: diagnostic
- - platform: restart
- name: "Restart"
- MhiAcCtrl:
- id: ${mhi_device_id}
- # Optional PIN config
- # The default values are:
- mosi_pin: GPIO6 #GPIO7
- miso_pin: GPIO5 #GPIO2
- sclk_pin: GPIO4 #GPIO6
- cs_in_pin: GPIO7 #GPIO10
- cs_out_pin: GPIO10 #GPIO9
- climate:
- - platform: MhiAcCtrl
- mhi_ac_ctrl_id: ${mhi_device_id}
- id: ${device_id}
- name: "$devicename"
- select:
- - platform: MhiAcCtrl
- mhi_ac_ctrl_id: ${mhi_device_id}
- vanes_ud:
- name: $devicename Vanes Up Down
- id: ${device_id}_vanes_ud
- vanes_lr:
- name: $devicename Vanes Left Right
- id: ${device_id}_vanes_lr
- sensor:
- - platform: MhiAcCtrl
- mhi_ac_ctrl_id: ${mhi_device_id}
- integrated_total_energy:
- name: $devicename Energy
- filters:
- - throttle: 60s
- power:
- name: $devicename Power
- frame_errors:
- name: $devicename Frame errors
- # Special sensor to filter out bursts of (small) temperature changes. When
- # this sensor is present, the current temperature in the climate component
- # will use the filtered value from this sensor..
- #
- # Use case: filtering out temperature jitter. See
- # https://github.com/hberntsen/mhi-ac-ctrl-esp32-c3/issues/5
- climate_current_temperature:
- # Only id, no name so it won't be sent to home assistant as separate sensor
- id: climate_current_temperature
- filters:
- # Check for new temperatures every 10 seconds
- - heartbeat: 10s
- # Home assistant does not show decimals
- - round: 0
- # The climate component will only send updates if the value is different
- switch:
- - platform: MhiAcCtrl
- mhi_ac_ctrl_id: ${mhi_device_id}
- active_mode:
- name: $devicename Active mode
- id: ${device_id}_active_mode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement