Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For those wanting a heartbeat LED if you don't have a display #4

Open
xbmcnut opened this issue Jan 7, 2023 · 0 comments
Open

For those wanting a heartbeat LED if you don't have a display #4

xbmcnut opened this issue Jan 7, 2023 · 0 comments

Comments

@xbmcnut
Copy link

xbmcnut commented Jan 7, 2023

Thanks for the code. Working a treat. I don't have a display so wanted to use the blue LED to create a heartbeat indicator so I knew the Sonoff was alive. Quite a steep learning curve with ESPHome but got it working a treat.

esphome:
  name: irrigation
  comment: Sonoff 4ch PRO controlling 2 irrigation solenoid valves.
  includes: irrigation.h
  platform: ESP8266
  board: esp01_1m
  on_boot:
    priority: -100
    then:
      - output.turn_on: my_slow_pwm
      - output.set_level:
          id: my_slow_pwm
          level: "50%"

And to define the LED

output:
  - platform: slow_pwm
    pin: GPIO13
    inverted: true
    id: my_slow_pwm
    period: 1000ms

Change the period and the level to define the duty cycle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant