|
@ -0,0 +1,43 @@ |
|
|
|
|
|
# These OTA triggers are used to provide some visual feedback during the OTA |
|
|
|
|
|
# flashing process. The light is turned blue when the upgrade starts, the |
|
|
|
|
|
# brightness indicator will represent the update progress (fills up from 0% |
|
|
|
|
|
# to 100%), the light will flash red when the upgrade fails or green when the |
|
|
|
|
|
# upgrade succeeds. |
|
|
|
|
|
|
|
|
|
|
|
ota: |
|
|
|
|
|
on_begin: |
|
|
|
|
|
then: |
|
|
|
|
|
- light.disco_on: |
|
|
|
|
|
id: ${id_light} |
|
|
|
|
|
red: 0% |
|
|
|
|
|
green: 0% |
|
|
|
|
|
blue: 100% |
|
|
|
|
|
brightness: 2% |
|
|
|
|
|
transition_length: 0s |
|
|
|
|
|
|
|
|
|
|
|
on_progress: |
|
|
|
|
|
then: |
|
|
|
|
|
- front_panel.set_level: !lambda return (x / 100.0f); |
|
|
|
|
|
- front_panel.update_leds: |
|
|
|
|
|
|
|
|
|
|
|
on_end: |
|
|
|
|
|
then: |
|
|
|
|
|
- light.disco_on: |
|
|
|
|
|
id: ${id_light} |
|
|
|
|
|
red: 0% |
|
|
|
|
|
green: 100% |
|
|
|
|
|
blue: 0% |
|
|
|
|
|
brightness: 2% |
|
|
|
|
|
transition_length: 0s |
|
|
|
|
|
|
|
|
|
|
|
on_error: |
|
|
|
|
|
then: |
|
|
|
|
|
- light.disco_on: |
|
|
|
|
|
id: ${id_light} |
|
|
|
|
|
red: 100% |
|
|
|
|
|
green: 0% |
|
|
|
|
|
blue: 0% |
|
|
|
|
|
brightness: 2% |
|
|
|
|
|
- delay: 1s |
|
|
|
|
|
- light.disco_off: |
|
|
|
|
|
id: ${id_light} |