I flashed my light bulb OTA but I got it bricked with a stupid script ![]()
Now when I turn on the physical light switch, the light bulb will turn on for 0.5s and turn off itself.
Wifi is not connected before on_boot is called.
I tried to enter safe mode by toggle on/off for 20+ times within 1-2s with a smart plug but no luck.
1 out of 30 times I could get it skip on_boot (i.e. no light on and stay off after switch is on).
However, the bulb is not connected to home wifi and no AP is observed.
I hope priority: -10 and delay: 500ms could buy me a few time to interrupt the on_boot calls but seems impossible.
Anything else I can do? Should I just give up?
substitutions:
entity_id: "my_owner_is_a_dumb"
esphome_node_name: "light"
friendly_name: "Light"
esphome:
name: ${esphome_node_name}
friendly_name: ${friendly_name}
on_boot:
priority: -10
then:
- light.turn_on: ${entity_id}
- delay: 500ms
- light.turn_off: ${entity_id}
esp8266:
board: esp01_1m
output:
- platform: esp8266_pwm
id: output_brightness
pin: GPIO13
- platform: esp8266_pwm
id: output_temp
pin: GPIO14
light:
- platform: color_temperature
id: ${entity_id}
brightness: output_brightness
color_temperature: output_temp
warm_white_color_temperature: 2700 K
cold_white_color_temperature: 6500 K
default_transition_length: 0s
restore_mode: RESTORE_DEFAULT_OFF
on_turn_off:
then:
- light.turn_off:
id: ${entity_id}
logger:
baud_rate: 0
api:
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
min_auth_mode: WPA2
ap:
ssid: ${friendly_name}
password: !secret ap_password
captive_portal: