Giter Club home page Giter Club logo

Climate AC Samsung AQ07XAN

AQ07XAN

Only esp8266

Install:

Create dir homeassistant/esphome/include

Copy to dir files irsamsung60.h

In YAML (config esphome) insert:

esphome:
  includes: 
    - include/irsamsung60.h
  libraries:
    - IRremoteESP8266

climate:
  - platform: custom
    lambda: |-
       auto samsungac = new SamsungAC();
       samsungac->set_sensor(id(current_temperature));
       App.register_component(samsungac);
       return {samsungac};
    climates:
    - name: "Samsung AC"

sensor:
  - platform: homeassistant
    name: "Temperature Sensor From Home Assistant"
    id: current_temperature
    entity_id: sensor.temperature_in_room
    internal: true

You can specify any sensor whose values you want to see in the climate card. These may be sensors of this or another esphome. It is important to specify the correct sensor ID.

climate

substitutions:
  board_name: samsung
  ble: !secret ble1
esphome:
  name: $board_name
  includes: 
    - include/irsamsung60.h
  libraries:
    - IRremoteESP8266
wifi:
  networks:
  - ssid: !secret wifi1
    password: !secret password1
  ap:
    ssid: "$board_name Hotspot"
    password: !secret password1
esp8266:
  board: esp01_1m
logger:
  baud_rate: 0
api:
  encryption:
    key: !secret keyapi 
ota:
  password: !secret passwordota
web_server:
  port: 80  
climate:
  - platform: custom
    lambda: |-
       auto samsungac = new SamsungAC();
       samsungac->set_sensor(id(current_temperature));
       App.register_component(samsungac);
       return {samsungac};
    climates:
    - name: "Samsung AC"
      id: my_samsung
      on_control:
        - lambda: |-
            if (x.get_mode() != CLIMATE_MODE_OFF) {
                id(turnoff_script).stop();
                return;
            }
            if (id(condensate_sensor).state) {
                id(turnoff_script).execute();
                x.set_mode(CLIMATE_MODE_FAN_ONLY);
            }
dallas:
  - pin: 12
    update_interval: 10s
sensor:
  - platform: wifi_signal
    name: WiFi_Signal.$board_name
  - platform: uptime
    name: uptime_sensor.$board_name
  - platform: dallas
    index: 0
    name: Temp_out_$board_name
    id: temperature_out
    accuracy_decimals: 2
    filters:
      - median:
          window_size: 7
          send_every: 4
          send_first_at: 3
  - platform: template
    name: "Dew Point2 ${board_name}"
    id: dev_point2
    lambda: |-
      float t, rh, b, c, temp1, gamma, dp;
      t = id(current_temperature).state;
      rh = id(current_humidity).state;
      if ( t > 0) {
        b = 17.368;
        c = 238.88;
      } else {
        b = 17.966;
        c = 247.15;
      }
      temp1 = (b - (t / 234.5)) * (t / (t + c));
      gamma = log((rh / 100)*exp(temp1));
      dp = (c * gamma) / (b - gamma);
      return (dp);
    unit_of_measurement: °C
    icon: 'mdi:thermometer-alert'    
  - platform: homeassistant
    name: "Temperature Sensor From Home Assistant"
    id: current_temperature
    entity_id: sensor.ble_temperature_$ble
    internal: true
    accuracy_decimals: 1
    filters:
      - median:
          window_size: 7
          send_every: 4
          send_first_at: 1
  - platform: homeassistant
    name: "Humidity Sensor From Home Assistant"
    id: current_humidity
    entity_id: sensor.ble_humidity_$ble
    internal: true
    accuracy_decimals: 1
    filters:
      - median:
          window_size: 7
          send_every: 4
          send_first_at: 1
output:
  - platform: esp8266_pwm
    id: led
    pin: GPIO02
    frequency: 500 Hz 
    inverted: true
light:
  - platform: monochromatic
    name: LED_1
    output: led
    id: led_1
    internal: true
    effects:
      - pulse:
          name: 1Pulse
button:
  - platform: restart
    name: Reset.$board_name
  - platform: factory_reset
    name: Default_Settings.$board_name
  - platform: safe_mode
    name: "Restart Safe Mode.$board_name"
binary_sensor:
  - platform: status
    name: Status.$board_name
    id: status_id
    internal: true
    on_release:
      then:
        - light.turn_on:
            id: led_1
            brightness: 100%
            effect: 1Pulse
    on_press:
      then:
        - light.turn_off: led_1
  - platform: template
    name: Drying
    icon: mdi:fan-clock
    device_class: running
    entity_category: diagnostic
    id: drying_sensor
    publish_initial_state: true
    lambda: 'return id(turnoff_script).is_running();'
    filters:
      - delayed_off: 30s
    on_release:
      then:
        - climate.control:
            id: my_samsung
            mode: "OFF"

  - platform: template
    name: Condensate
    icon: mdi:water-percent-alert
    device_class: moisture
    entity_category: diagnostic
    id: condensate_sensor
    publish_initial_state: true
    lambda: 'return id(temperature_out).state < ( (id(current_temperature).state+id(dev_point2).state) / 2 ) ;'
    filters:
      - delayed_off: 30s
      - delayed_on: 5s
script:
  - id: turnoff_script
    then:
      - wait_until:
          condition:
            binary_sensor.is_off: condensate_sensor
          timeout: 300s          

esnet146's Projects

aq07xan icon aq07xan

esphome in Climate AC Samsung AQ07XAN

blinds icon blinds

Управление горизонтальными жалюзи

esphome icon esphome

ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.

geozon_ws-02 icon geozon_ws-02

Прошивка выключателя от GEOZON WS-02 в esphome + доработка подсветки

perenio-petra01 icon perenio-petra01

Универсальный Инфракрасный пульт Perenio Red Atom PETRA01

rgb-cw-lamp-sber icon rgb-cw-lamp-sber

Прошивка умной лампочки от Сбера на модуле WBLC9 (чип BK7231T) и драйвере BP1658

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.