mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Add H-Bridge switch component (#7421)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
@@ -1,33 +1,16 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: 4
|
||||
id: gpio_output1
|
||||
- platform: ledc
|
||||
pin: 5
|
||||
id: gpio_output2
|
||||
- platform: ledc
|
||||
pin: 6
|
||||
id: gpio_output3
|
||||
- platform: ledc
|
||||
pin: 7
|
||||
id: gpio_output4
|
||||
substitutions:
|
||||
pwm_platform: "ledc"
|
||||
output1_pin: "4"
|
||||
output2_pin: "5"
|
||||
output3_pin: "6"
|
||||
output4_pin: "7"
|
||||
hbridge_on_pin: "2"
|
||||
hbridge_off_pin: "3"
|
||||
|
||||
light:
|
||||
- platform: hbridge
|
||||
name: Icicle Lights
|
||||
pin_a: gpio_output3
|
||||
pin_b: gpio_output4
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
fan:
|
||||
- platform: hbridge
|
||||
id: fan_hbridge
|
||||
speed_count: 4
|
||||
name: H-bridge Fan with Presets
|
||||
pin_a: gpio_output1
|
||||
pin_b: gpio_output2
|
||||
preset_modes:
|
||||
- Preset 1
|
||||
- Preset 2
|
||||
on_preset_set:
|
||||
then:
|
||||
- logger.log: Preset mode was changed!
|
||||
switch:
|
||||
- id: !extend switch_hbridge
|
||||
wait_time: 10ms
|
||||
optimistic: true
|
||||
|
||||
Reference in New Issue
Block a user