devices.esphome.io
UltraPro WFD4001 Light Switch
UltraPro WFD4001 Light Switch
Device Type: switchElectrical Standard: usBoard: bk72xx
GPIO Pinout
Pin | Alternate Pin Name | Function | Active |
---|---|---|---|
P8 | PWM2 | On Button | Low |
P9 | PWM3 | Off Button | Low |
P24 | PWM4 | Status Led | High |
P6 | PWM5 | Relay | High |
Basic Configuration
# You should only need to modify the substitutions.substitutions: device_name: back-door-lights friendly_name: Back Door Lights
# Nothing below should need modification.esphome: name: ${device_name} friendly_name: ${friendly_name}
bk72xx: board: wb3s
logger:api:captive_portal:ota:
wifi: ssid: !secret wifi_ssid password: !secret wifi_password ap:
output: - platform: libretiny_pwm id: output_blue_led pin: PWM4switch: - platform: gpio pin: PWM5 id: relay name: None restore_mode: RESTORE_DEFAULT_OFF device_class: switchbinary_sensor: - platform: gpio pin: number: PWM2 inverted: True # The on button is active low. id: input_on_button on_press: then: - light.turn_on: blue_led - switch.turn_on: relay - platform: gpio pin: number: PWM3 inverted: True # The off button is active low. id: input_off_button on_press: then: - light.turn_off: blue_led - switch.turn_off: relaylight: - platform: status_led id: blue_led name: Blue LED output: output_blue_led disabled_by_default: True restore_mode: RESTORE_DEFAULT_OFF