davel4wa
(Davel4wa)
March 1, 2025, 10:48pm
1
Compiler error “unable to find light.turn_on action”, using ESPHome Builder in HA suggests this action but apparently the compiler didn’t get the email.
esphome:
name: hw-recirc-new
friendly_name: HW-Recirc_new
on_boot:
priority: -10
then:
- light.turn_on: blue-led
zoogara
(Daryl)
March 1, 2025, 11:08pm
2
Post all your yaml, not just a snippet. The actual cause of the error may be elsewhere.
davel4wa
(Davel4wa)
March 1, 2025, 11:14pm
3
Seems unlikely as this only occurs when the on_boot construct is in the code.
esphome:
name: hw-recirc-new
friendly_name: HW-Recirc_new
on_boot:
priority: -10
then:
- light.turn_on: blue-led
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "RSvxeJksnimh4Wze9hJN5usAobtoQ2UxTue2m88bEdI="
ota:
- platform: esphome
password: "350558855464be28c05f4a477d43ba56"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Hw-Recirc-New Fallback Hotspot"
password: "tfwaspTGbRJh"
captive_portal:
zoogara
(Daryl)
March 1, 2025, 11:16pm
4
Where is the yaml for the light you are trying to turn on? You will need that before trying to call any action on it.
davel4wa
(Davel4wa)
March 1, 2025, 11:52pm
5
It seems you were correct. Another case where the compiler reports an error incorrectly. I have copied the original code, replacing the incompatible platform: esphome construct with the esp8266: platform, moved the on_boot to within the primary esphome: code, corrected the dallas sensor platform code. That now compiles correctly.
Thanks for the help.
pascalspits
(Pascal Standaert)
March 21, 2025, 9:31am
6
I want to turn 2 lights on instead of 1 …
- light.turn_on:
id: gangkeuken
id: gangslaapkamer
brightness: 1.0
when compiling it gives an error … Duplicate key “id”
what am I doing wrong ?
is there another way ?
Thanks
zoogara
(Daryl)
March 21, 2025, 9:39am
7
Start a new topic, post your full yaml - tacking onto the end of a solved topic won’t get you too many answers.
1 Like
Look at the documentation, it teaches you how to use these things like Light, Sensors, etc.