Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A32 configure for ESPhome
#21
This is the second part of my code:

Code:
# Continued from previous post

# ________________________________________________________________________________
# Individual inputs
binary_sensor:
  - platform: gpio
    name: "input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input2"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input3"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input4"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "input5"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input6"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input7"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input8"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input9"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 0
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input10"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 1
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input11"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 2
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input12"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "input13"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input14"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input15"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input16"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true
     
     
  - platform: gpio
    name: "input17"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 0
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input18"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 1
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input19"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 2
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input20"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "input21"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input22"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input23"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input24"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "input25"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 0
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input26"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 1
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input27"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 2
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input28"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "input29"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input30"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input31"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input32"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 7
      mode: INPUT
      inverted: true
# ________________________________________________________________________________
# Example configuration entry
sensor:
  # WiFi Signal (anche se usi Ethernet, per debug)
  #- platform: wifi_signal
  #  name: "WiFi Signal"
  #  update_interval: 60s
  - platform: adc
    pin: 39
    name: "analog-1"
    update_interval: 10s
    attenuation: 12db
  - platform: adc
    pin: 34
    name: "analog-2"
    update_interval: 10s
    attenuation: 12db
   
  - platform: adc
    pin: 36
    name: "analog-3"
    update_interval: 10s
    attenuation: 12db
   
  - platform: adc
    pin: 35
    name: "analog-4"
    update_interval: 10s
    attenuation: 12db
Reply


Messages In This Thread
KC868-A32 configure for ESPhome - by admin - 03-23-2022, 12:36 PM
RE: KC868-A32 configure for ESPhome - by nwells - 03-03-2023, 12:51 AM
RE: KC868-A32 configure for ESPhome - by admin - 03-03-2023, 02:36 AM
RE: KC868-A32 configure for ESPhome - by nwells - 03-03-2023, 04:30 AM
RE: KC868-A32 configure for ESPhome - by nwells - 03-03-2023, 06:10 AM
RE: KC868-A32 configure for ESPhome - by admin - 03-03-2023, 09:02 AM
RE: KC868-A32 configure for ESPhome - by nwells - 03-03-2023, 09:12 AM
RE: KC868-A32 configure for ESPhome - by admin - 03-03-2023, 09:53 AM
RE: KC868-A32 configure for ESPhome - by nwells - 03-03-2023, 10:00 AM
RE: KC868-A32 configure for ESPhome - by admin - 03-03-2023, 10:34 AM
RE: KC868-A32 configure for ESPhome - by nwells - 03-04-2023, 12:06 AM
RE: KC868-A32 configure for ESPhome - by admin - 03-04-2023, 12:48 AM
RE: KC868-A32 configure for ESPhome - by nwells - 03-04-2023, 01:18 AM
RE: KC868-A32 configure for ESPhome - by admin - 03-04-2023, 01:32 AM
RE: KC868-A32 configure for ESPhome - by admin - 12-24-2023, 11:32 AM
RE: KC868-A32 configure for ESPhome - by REVELAS - 12-27-2023, 07:22 PM
RE: KC868-A32 configure for ESPhome - by gigios - 09-04-2025, 08:30 AM
RE: KC868-A32 configure for ESPhome - by admin - 09-04-2025, 12:23 PM
RE: KC868-A32 configure for ESPhome - by gigios - 09-04-2025, 12:52 PM
RE: KC868-A32 configure for ESPhome - by gigios - 09-04-2025, 12:52 PM
RE: KC868-A32 configure for ESPhome - by gigios - 09-04-2025, 12:57 PM
RE: KC868-A32 configure for ESPhome - by admin - 09-04-2025, 11:10 PM
RE: KC868-A32 configure for ESPhome - by tasman - 09-09-2025, 04:16 PM
RE: KC868-A32 configure for ESPhome - by admin - 09-10-2025, 12:48 AM
RE: KC868-A32 configure for ESPhome - by tasman - 09-10-2025, 06:24 AM
RE: KC868-A32 configure for ESPhome - by admin - 09-10-2025, 06:37 AM
RE: KC868-A32 configure for ESPhome - by tasman - 09-10-2025, 07:08 AM
RE: KC868-A32 configure for ESPhome - by tasman - 09-10-2025, 11:49 AM
RE: KC868-A32 configure for ESPhome - by admin - 09-10-2025, 11:47 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)