H-bridge Switch¶
The hbridge
switch platform allows you to drive an h-bridge controlled latching relay.
# Example configuration entry
switch:
- platform: hbridge
id: my_relay
name: "Relay"
on_pin: GPIOXX
off_pin: GPIOXX
pulse_length: 50ms
wait_time: 50ms
Configuration variables:¶
on_pin (Required, Pin Schema): The GPIO pin to pulse to turn on the switch.
off_pin (Required, Pin Schema): The GPIO pin to pulse to turn off the switch.
pulse_length (Optional, Time): The length in milliseconds of the pulse sent on
on_pin
andoff_pin
to change switch state. Defaults to100 ms
.wait_time (Optional, Time): The time in milliseconds to delay between pulses on
off_pin
andon_pin
. Defaults to no delay.optimistic (optional, boolean): Whether to operate in optimistic mode - when in this mode, any command sent to the switch will immediately update the reported state. Defaults to
false
, and the reported state updates only at the end of the pulse.All other options from Switch Component.