Smart Home Automation Forum
KC868-A2 configure yaml for ESPhome - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A2 (https://www.kincony.com/forum/forumdisplay.php?fid=43)
+--- Thread: KC868-A2 configure yaml for ESPhome (/showthread.php?tid=2692)

Pages: 1 2 3


RE: KC868-A2 configure yaml for ESPhome - Francois - 02-25-2025

I share an update in yaml file to add temperature sensor management (type Dallas DS18B20) with KC868-A2.
The yaml file is the following
Code:
esphome:
  name: a2

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "YnmQggQsfd7jvFefoMqNCpBtb63RXtotS+mSBQVIhY8="

# Example configuration entry
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0

switch:
  - platform: gpio
    name: "a2-light1"
    pin: 15
    inverted: False

  - platform: gpio
    name: "a2-light2"
    pin: 2
    inverted: False

binary_sensor:
  - platform: gpio
    name: "a2-input1"
    pin:
      number: 36
      inverted: true

  - platform: gpio
    name: "a2-input2"
    pin:
      number: 39
      inverted: true

# add Temp sensors (Dallas DS18B20)
one_wire:
  - platform: gpio
    pin: 33
    id: temp1

  - platform: gpio
    pin: 14
    id: temp2

sensor:
  - platform: dallas_temp
    one_wire_id: temp1
    name: "a2-temp1"
    update_interval: 1s
   
  - platform: dallas_temp
    one_wire_id: temp2
    name: "a2-temp2"
    update_interval: 1s
The photo below shows a DS18B20 sensor connected on the KC868-A2 board
   
And the photo below shows the temperature displayed in Home Assistant
   


RE: KC868-A2 configure yaml for ESPhome - admin - 02-26-2025

thanks share your code.