Help needed!
I started moving all my passwords to secrets.yaml file. I moved the wifi ssid and password and api password without any problems. But when i try to change the OTA password by following the docs i get an error.
The error shows up at ota: id line saying “ID ‘ota’ conflicts with the name of an esphome integration, please use an other id”.
According the docs id: is optional but when i remove it i get an new error. This time it’s at the lambda line. “Couldn’t find ID ‘ota’. Please check you have defined an ID with that name in your configuration”.
I tried changing the id’s to new_ota but endend up crashing home assistant…
esphome:
on_boot:
- lambda: |-
id(ota).set_auth_password(!secret ota_password);
name: sonoff_4
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.2.104
gateway: 192.168.2.254
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_password
ota:
password: "Old password"
id: ota
text_sensor:
- platform: version
name: sonoff_4_version
- platform: wifi_info
ip_address:
name: sonoff_4_ip
ssid:
name: sonoff_4_ssid
bssid:
name: sonoff_4_bssid
sensor:
# Uptime sensor
- platform: uptime
name: sonoff_4_uptime
filters:
- lambda: return x / 86400;
unit_of_measurement: "days"
# WiFi Signal sensor
- platform: wifi_signal
name: sonoff_4_wifi_signal
update_interval: 60s
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "sonoff_4_button"
on_press:
- switch.toggle: relay
- platform: status
name: sonoff_4_connection_state
switch:
- platform: gpio
name: "sonoff_4_relay"
pin: GPIO12
id: relay
- platform: restart
name: "sonoff 4 restart"
status_led:
pin:
number: GPIO13
inverted: yes