-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch: only use PWM for PWM lights (#11)
- Loading branch information
Showing
3 changed files
with
594 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
upk2esphome/tests/expected_output/plug_monitor_led_bl0937.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
output: | ||
- platform: gpio | ||
id: output_led_1 | ||
pin: | ||
number: P10 | ||
inverted: true | ||
|
||
light: | ||
- platform: binary | ||
id: light_switch_1 | ||
output: output_led_1 | ||
|
||
binary_sensor: | ||
- platform: gpio | ||
id: binary_switch_1 | ||
pin: | ||
number: P11 | ||
inverted: true | ||
mode: INPUT_PULLUP | ||
on_press: | ||
then: | ||
- switch.toggle: switch_1 | ||
|
||
switch: | ||
- platform: gpio | ||
id: switch_1 | ||
name: Relay 1 | ||
pin: P26 | ||
on_turn_on: | ||
- light.turn_on: light_switch_1 | ||
on_turn_off: | ||
- light.turn_off: light_switch_1 | ||
|
||
status_led: | ||
pin: | ||
number: P8 | ||
inverted: true | ||
|
||
sensor: | ||
- platform: hlw8012 | ||
model: BL0937 | ||
cf_pin: | ||
number: P7 | ||
inverted: true | ||
cf1_pin: | ||
number: P6 | ||
inverted: true | ||
sel_pin: | ||
number: P24 | ||
inverted: true | ||
current: | ||
name: BL0937 Current | ||
voltage: | ||
name: BL0937 Voltage | ||
power: | ||
name: BL0937 Power | ||
energy: | ||
name: BL0937 Energy | ||
voltage_divider: 1600 | ||
current_resistor: 0.001 ohm |
Oops, something went wrong.