mirror of
https://github.com/esphome/esphome.git
synced 2025-10-12 14:53:49 +01:00
make cwww, hbridge groupable
This commit is contained in:
@@ -1,11 +1,3 @@
|
|||||||
output:
|
|
||||||
- platform: ${light_platform}
|
|
||||||
id: light_output_1
|
|
||||||
pin: ${pin_o1}
|
|
||||||
- platform: ${light_platform}
|
|
||||||
id: light_output_2
|
|
||||||
pin: ${pin_o2}
|
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: cwww
|
- platform: cwww
|
||||||
name: CWWW Light
|
name: CWWW Light
|
||||||
|
@@ -3,12 +3,15 @@ substitutions:
|
|||||||
pin_o1: GPIO6
|
pin_o1: GPIO6
|
||||||
pin_o2: GPIO7
|
pin_o2: GPIO7
|
||||||
|
|
||||||
packages:
|
|
||||||
device_base: !include common.yaml
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- id: !extend light_output_1
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin_o1}
|
||||||
channel: 0
|
channel: 0
|
||||||
- id: !extend light_output_2
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin_o2}
|
||||||
channel: 1
|
channel: 1
|
||||||
phase_angle: 180°
|
phase_angle: 180°
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
|
@@ -3,12 +3,15 @@ substitutions:
|
|||||||
pin_o1: GPIO16
|
pin_o1: GPIO16
|
||||||
pin_o2: GPIO17
|
pin_o2: GPIO17
|
||||||
|
|
||||||
packages:
|
|
||||||
device_base: !include common.yaml
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- id: !extend light_output_1
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin_o1}
|
||||||
channel: 0
|
channel: 0
|
||||||
- id: !extend light_output_2
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin_o2}
|
||||||
channel: 1
|
channel: 1
|
||||||
phase_angle: 180°
|
phase_angle: 180°
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
|
@@ -3,4 +3,12 @@ substitutions:
|
|||||||
pin_o1: GPIO12
|
pin_o1: GPIO12
|
||||||
pin_o2: GPIO13
|
pin_o2: GPIO13
|
||||||
|
|
||||||
|
output:
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin_o1}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin_o2}
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,4 +3,12 @@ substitutions:
|
|||||||
pin_o1: GPIO12
|
pin_o1: GPIO12
|
||||||
pin_o2: GPIO13
|
pin_o2: GPIO13
|
||||||
|
|
||||||
|
output:
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_1
|
||||||
|
pin: ${pin_o1}
|
||||||
|
- platform: ${light_platform}
|
||||||
|
id: light_output_2
|
||||||
|
pin: ${pin_o2}
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -31,9 +31,3 @@ fan:
|
|||||||
on_preset_set:
|
on_preset_set:
|
||||||
then:
|
then:
|
||||||
- logger.log: Preset mode was changed!
|
- logger.log: Preset mode was changed!
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: hbridge
|
|
||||||
id: switch_hbridge
|
|
||||||
on_pin: ${hbridge_on_pin}
|
|
||||||
off_pin: ${hbridge_off_pin}
|
|
||||||
|
@@ -7,9 +7,11 @@ substitutions:
|
|||||||
hbridge_on_pin: "2"
|
hbridge_on_pin: "2"
|
||||||
hbridge_off_pin: "3"
|
hbridge_off_pin: "3"
|
||||||
|
|
||||||
packages:
|
<<: !include common.yaml
|
||||||
common: !include common.yaml
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- id: !extend switch_hbridge
|
- platform: hbridge
|
||||||
|
id: switch_hbridge
|
||||||
|
on_pin: ${hbridge_on_pin}
|
||||||
|
off_pin: ${hbridge_off_pin}
|
||||||
pulse_length: 60ms
|
pulse_length: 60ms
|
||||||
|
@@ -7,10 +7,12 @@ substitutions:
|
|||||||
hbridge_on_pin: "4"
|
hbridge_on_pin: "4"
|
||||||
hbridge_off_pin: "5"
|
hbridge_off_pin: "5"
|
||||||
|
|
||||||
packages:
|
<<: !include common.yaml
|
||||||
common: !include common.yaml
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- id: !extend switch_hbridge
|
- platform: hbridge
|
||||||
|
id: switch_hbridge
|
||||||
|
on_pin: ${hbridge_on_pin}
|
||||||
|
off_pin: ${hbridge_off_pin}
|
||||||
pulse_length: 60ms
|
pulse_length: 60ms
|
||||||
wait_time: 10ms
|
wait_time: 10ms
|
||||||
|
@@ -7,10 +7,12 @@ substitutions:
|
|||||||
hbridge_on_pin: "14"
|
hbridge_on_pin: "14"
|
||||||
hbridge_off_pin: "15"
|
hbridge_off_pin: "15"
|
||||||
|
|
||||||
packages:
|
<<: !include common.yaml
|
||||||
common: !include common.yaml
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- id: !extend switch_hbridge
|
- platform: hbridge
|
||||||
|
id: switch_hbridge
|
||||||
|
on_pin: ${hbridge_on_pin}
|
||||||
|
off_pin: ${hbridge_off_pin}
|
||||||
pulse_length: 60ms
|
pulse_length: 60ms
|
||||||
wait_time: 10ms
|
wait_time: 10ms
|
||||||
|
@@ -7,10 +7,12 @@ substitutions:
|
|||||||
hbridge_on_pin: "2"
|
hbridge_on_pin: "2"
|
||||||
hbridge_off_pin: "3"
|
hbridge_off_pin: "3"
|
||||||
|
|
||||||
packages:
|
<<: !include common.yaml
|
||||||
common: !include common.yaml
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- id: !extend switch_hbridge
|
- platform: hbridge
|
||||||
|
id: switch_hbridge
|
||||||
|
on_pin: ${hbridge_on_pin}
|
||||||
|
off_pin: ${hbridge_off_pin}
|
||||||
wait_time: 10ms
|
wait_time: 10ms
|
||||||
optimistic: true
|
optimistic: true
|
||||||
|
Reference in New Issue
Block a user