Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC-868 AIO
#1
Hi!
I received my new AIO!!!
Nice and fun. I managed to create the yaml file from your example Smile 
All work fine but .... I have a curiosity. is a way to let say "map" digital input 1 to output 1?

My scenario:

I want to user "click" buttons to turn on the light, connected to a digital input.
When I press the button 1/ digital input 1, I want taht output 1 to turn on.
If the output 1 is on, when I press the button, I want that output 1 to turn off.


I'm using Home Assistant.

Thank You!

Never mind!!

I figured out !

binary_sensor:
- platform: gpio
name: "aio--input1"
pin:
pcf8574: pcf8574_hub_in_1
number: 0
mode: INPUT
inverted: true
on_press:
then:
- switch.toggle: aio_light1


switch:
- platform: gpio
name: "aio--light1"
id: aio_light1
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true


Thank You!
Reply
#2
yes, it's easy, good.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)