You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.0 KiB

  1. # These OTA triggers are used to provide some visual feedback during the OTA
  2. # flashing process. The light is turned blue when the upgrade starts, the
  3. # brightness indicator will represent the update progress (fills up from 0%
  4. # to 100%), the light will flash red when the upgrade fails or green when the
  5. # upgrade succeeds.
  6. ota:
  7. on_begin:
  8. then:
  9. - light.disco_on:
  10. id: ${id_light}
  11. red: 0%
  12. green: 0%
  13. blue: 100%
  14. brightness: 2%
  15. transition_length: 0s
  16. on_progress:
  17. then:
  18. - front_panel.set_level: !lambda return (x / 100.0f);
  19. - front_panel.update_leds:
  20. on_end:
  21. then:
  22. - light.disco_on:
  23. id: ${id_light}
  24. red: 0%
  25. green: 100%
  26. blue: 0%
  27. brightness: 2%
  28. transition_length: 0s
  29. on_error:
  30. then:
  31. - light.disco_on:
  32. id: ${id_light}
  33. red: 100%
  34. green: 0%
  35. blue: 0%
  36. brightness: 2%
  37. - delay: 1s
  38. - light.disco_off:
  39. id: ${id_light}