Created
September 18, 2019 17:30
-
-
Save placidorevilla/457afa39f801032e0af27c6a4ae89390 to your computer and use it in GitHub Desktop.
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
#GPIO0 Long Press MCU | |
#GPIO14 Green LED | |
#GPIO1 UART TX | |
#GPIO3 UART RX | |
esphome: | |
board_flash_mode: dout | |
includes: | |
- custom/tuyadimmer_lightoutput.h | |
debug: | |
logger: | |
hardware_uart: UART1 | |
binary_sensor: | |
- platform: gpio | |
name: "${name} Long Press" | |
pin: | |
number: GPIO0 | |
inverted: true | |
uart: | |
id: uart1 | |
baud_rate: 9600 | |
tx_pin: GPIO1 | |
rx_pin: GPIO3 | |
light: | |
- platform: custom | |
lambda: |- | |
auto tuyadimmer = new TuyaDimmerLightOutput(id(uart1)); | |
App.register_component(tuyadimmer); | |
return {tuyadimmer}; | |
lights: | |
name: "${name} Light" | |
gamma_correct: 1.0 | |
default_transition_length: 0s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment