Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A2 configure yaml for ESPhome
#21
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
   
Reply
#22
thanks share your code.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)