substitutions: name: heatpump-test friendly_name: Heatpump-Test esphome: name: ${name} friendly_name: ${friendly_name} on_boot: priority: 200 then: - delay: 30s - switch.turn_off: id: eps32_s3_led_switch esp32: board: esp32-s3-devkitc-1 #board: esp32doit-devkit-v1 framework: type: arduino #type: esp-idf version: latest light: #G35=RGB WS2812C-2020 - platform: esp32_rmt_led_strip name: Led id: led internal: true rgb_order: GRB pin: 35 num_leds: 4 # RMT 0 channels will be occupied by IR rmt_channel: 1 chipset: ws2812 restore_mode: ALWAYS_ON #OFF? uart: id: HP_UART baud_rate: 2400 tx_pin: GPIO2 rx_pin: GPIO1 # Default logging level logger: #hardware_uart: UART1 # This line can be removed for ESP32 devices level: INFO # Enable Home Assistant API api: services: - service: reboot then: - logger.log: "Redémarrage en cours..." - lambda: |- ESP.restart(); - service: set_remote_temperature variables: temperature: float then: # Select between the C version and the F version # Uncomment just ONE of the below lines. The top receives the temperature value in C, # the bottom receives the value in F, converting to C here. - lambda: 'id(hp).set_remote_temperature(temperature);' # - lambda: 'id(hp).set_remote_temperature((temperature - 32.0) * (5.0 / 9.0));' - service: use_internal_temperature then: - lambda: 'id(hp).set_remote_temperature(0);' encryption: key: "xxx" # needs to be your key ota: password: "xxx" wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Heatpump-Test" password: "heatpump" captive_portal: # Enable Web server. web_server: port: 80 # External component reference external_components: - source: github://echavet/MitsubishiCN105ESPHome # Climate entity configuration climate: - platform: cn105 id: hp name: ${friendly_name} icon: mdi:heat-pump visual: min_temperature: 15 max_temperature: 31 temperature_step: target_temperature: 1 current_temperature: 0.1 # compressor_frequency_sensor: # name: ${name} Compressor Frequency #vertical_vane_select: # name: ${name} Vertical Vane #horizontal_vane_select: # name: ${name} Horizontal Vane # isee_sensor: # name: ${name} ISEE Sensor remote_temperature_timeout: 30min debounce_delay : 500ms update_interval: 4s # diagnostics text_sensor: - platform: wifi_info ip_address: name: IP ssid: name: SSID - platform: version name: Version hide_timestamp: true disabled_by_default: false icon: mdi:new-box entity_category: diagnostic sensor: - platform: homeassistant id: current_temp internal: true entity_id: sensor.selected_temperature_main on_value: then: - lambda: |- float temp_f = id(current_temp).state; float temp_c = (temp_f - 32.0) * (5.0 / 9.0); ESP_LOGD("custom", "Current Temp (F): %.1f, Temp (C): %.1f", temp_f, temp_c); id(hp).set_remote_temperature(temp_c); filters: - heartbeat: 10s - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB name: Sigaal dB id: wifi_signal_db update_interval: 60s entity_category: diagnostic - platform: copy # Reports the WiFi signal strength in % source_id: wifi_signal_db name: Signal % filters: - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); unit_of_measurement: " %" entity_category: diagnostic device_class: "" - platform: uptime name: "Uptime" disabled_by_default: false force_update: false unit_of_measurement: s icon: mdi:timer-outline accuracy_decimals: 0 device_class: duration state_class: total_increasing entity_category: diagnostic update_interval: 60s - platform: internal_temperature name: Internal Esp temperature entity_category: diagnostic switch: - platform: template id: eps32_s3_led_switch name: Led switch #${led_switch} optimistic: true restore_mode: RESTORE_DEFAULT_ON lambda: return id(eps32_s3_led_switch).state; turn_on_action: - light.turn_on: id: led brightness: !lambda |- // output value must be in range 0 - 1.0 return id(led_brightness).state / 100.0; turn_off_action: - light.turn_off: id: led number: ## Set led brightness - platform: template id: led_brightness name: Led brightness #${led_brightness} icon: mdi:toggle-switch-variant mode: slider entity_category: config optimistic: true min_value: 0 max_value: 100 step: 10 initial_value: 70 restore_value: yes unit_of_measurement: "%" on_value: then: - if: condition: - light.is_on: led then: - light.turn_on: id: led brightness: !lambda |- // output value must be in range 0 - 1.0 return id(led_brightness).state / 100.0;