Skip to content

Commit

Permalink
Update to act as switch by default, rather than always a light
Browse files Browse the repository at this point in the history
  • Loading branch information
untergeek committed Oct 29, 2024
1 parent 7f2336d commit 524d116
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions template/linkind-switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,31 @@ esp32:
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y

light:
- platform: binary
id: relaylight
name: ${friendly_name} Switch
output: relay
switch:
- platform: gpio
name: Switch
id: relay
pin: GPIO5
inverted: false
on_turn_on:
- output.turn_on:
id: green_led
on_turn_off:
- output.turn_off:
id: green_led


light:
- platform: binary
id: greenlight
internal: true
name: Green LED
output: green_led

output: green_led
- platform: status_led
internal: true
name: Red LED
pin: GPIO26

output:
- platform: gpio
pin: GPIO5
inverted: false
id: relay

- platform: gpio
pin: GPIO14
inverted: false
Expand All @@ -57,7 +53,7 @@ binary_sensor:
name: ON Button
internal: false
on_click:
- light.turn_on: relaylight
- light.turn_on: relay

- platform: gpio
pin:
Expand All @@ -67,7 +63,7 @@ binary_sensor:
name: OFF Button
internal: False
on_click:
- light.turn_off: relaylight
- light.turn_off: relay

esp32_ble_tracker:

Expand Down

0 comments on commit 524d116

Please sign in to comment.