Closed Terr4 closed 1 year ago
Hello, i have the same error. Win10 with python 3.9.7, esphome 2022.12.3
just renaming the example to meter02.yaml:
meter02.yaml:145:37: error: stray '#' in program meter02.yaml:147:100: error: stray '#' in program meter02.yaml:149:100: error: stray '#' in program meter02.yaml:151:100: error: stray '#' in program meter02.yaml:153:103: error: stray '#' in program meter02.yaml:154:109: error: stray '#' in program meter02.yaml:156:60: error: stray '#' in program meter02.yaml:158:61: error: stray '#' in program meter02.yaml: In lambda function: meter02.yaml:145:39: error: 'Pass' was not declared in this scope meter02.yaml:145:39: note: suggested alternative: 'Gas' meter02.yaml:147:102: error: 'Set' was not declared in this scope meter02.yaml:147:102: note: suggested alternative: 'Heat' meter02.yaml:149:105: error: expected ';' before 'sensors' meter02.yaml:151:105: error: expected ';' before 'sensors' meter02.yaml:153:108: error: expected ';' before 'sensors' meter02.yaml:154:114: error: expected ';' before 'sensors' meter02.yaml:156:65: error: expected ';' before 'sensor' meter02.yaml:158:63: error: 'Enable' was not declared in this scope meter02.yaml:158:63: note: suggested alternative: 'nanl' meter02.yaml:161:3: warning: no return statement in function returning non-void [-Wreturn-type]
when i manually delete all comments it works without errors.
Edit:
I setup a github action that auto-builds the repo, and fails with the same error as above: https://github.com/designer2k2/esphome-dlms-meter/actions/runs/3933413900/jobs/6727089407#step:4:87 (scroll all the way to the bottom)
Following the guide "Software installation" in the repository I receive following errors when running "esphome meter01.yaml run"
It seems you must remove all comments in the meter01.yaml file for this to work.
Python3 on Windows 10 ESPHome Version: 2022.9.4
Generating partitions .pioenvs\smartmeter01\partitions.bin Compiling .pioenvs\smartmeter01\lib87c\AsyncTCP-esphome\AsyncTCP.cpp.o Compiling .pioenvs\smartmeter01\libb22\WiFi\ETH.cpp.o meter01.yaml:146:37: error: stray '#' in program meter01.yaml:148:100: error: stray '#' in program meter01.yaml:150:100: error: stray '#' in program meter01.yaml:152:100: error: stray '#' in program meter01.yaml:154:103: error: stray '#' in program meter01.yaml:155:109: error: stray '#' in program meter01.yaml:157:60: error: stray '#' in program meter01.yaml:159:61: error: stray '#' in program Compiling .pioenvs\smartmeter01\libb22\WiFi\WiFi.cpp.o meter01.yaml: In lambda function: meter01.yaml:146:39: error: 'Pass' was not declared in this scope meter01.yaml:148:102: error: 'Set' was not declared in this scope meter01.yaml:150:106: error: expected ';' before 'sensors' meter01.yaml:152:106: error: expected ';' before 'sensors' meter01.yaml:154:109: error: expected ';' before 'sensors' meter01.yaml:155:115: error: expected ';' before 'sensors' meter01.yaml:157:66: error: expected ';' before 'sensor' meter01.yaml:159:63: error: 'Enable' was not declared in this scope meter01.yaml:162:3: warning: no return statement in function returning non-void [-Wreturn-type] Archiving .pioenvs\smartmeter01\lib87c\libAsyncTCP-esphome.a Compiling .pioenvs\smartmeter01\libb22\WiFi\WiFiAP.cpp.o Compiling .pioenvs\smartmeter01\libb22\WiFi\WiFiClient.cpp.o *** [.pioenvs\smartmeter01\src\main.cpp.o] Error 1 ===================================================== [FAILED] Took 281.80 seconds =====================================================