I’m trying to do something like if while “input_number.meeting” is 1 than turn on “GPIO_27” else if while “input_number.meeting” is 2 than turn on “GPIO_33” etc.
Here is my existing code
output:
- platform: gpio
id: "GPIO_2"
pin: 2
- platform: gpio
id: "GPIO_27"
pin: 27
- platform: gpio
id: "GPIO_33"
pin: 33
- platform: gpio
id: "GPIO_32"
pin: 32
light:
- platform: binary
output: "GPIO_2"
name: "Sleep"
- platform: binary
output: "GPIO_27"
name: "Come In"
- platform: binary
output: "GPIO_33"
name: "Meeting"
- platform: binary
output: "GPIO_32"
name: "Inportent Meeting"
binary_sensor:
- platform: gpio
pin:
number: 14
mode: INPUT_PULLUP
inverted: True
name: "Come In"
on_press:
- homeassistant.service:
service: input_number.set_value
data:
entity_id: input_number.meeting
value: "1"
- platform: gpio
pin:
number: 0
mode: INPUT_PULLUP
inverted: True
name: "Meeting"
on_press:
- homeassistant.service:
service: input_number.set_value
data:
entity_id: input_number.meeting
value: "2"
- platform: gpio
pin:
number: 4
mode: INPUT_PULLUP
inverted: True
name: "Inportent Meeting"
on_press:
- homeassistant.service:
service: input_number.set_value
data:
entity_id: input_number.meeting
value: "3"
- platform: gpio
pin:
number: 15
mode: INPUT_PULLUP
inverted: True
name: "Sleep"
on_press:
- homeassistant.service:
service: input_number.set_value
data:
entity_id: input_number.meeting
value: "4"