esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
285 stars 34 forks source link

Wrong line reported as having error during compliation #5758

Open Masterz69 opened 2 weeks ago

Masterz69 commented 2 weeks ago

The problem

During compilation following line reported as having error, as well exactly previous has. Error is in line 1600 where state() wrongly used.

/config/esphome/zzz-d1mini.yaml: In lambda function:
/config/esphome/zzz-d1mini.yaml:62:27: error: expression cannot be used as a function
   62 |     filters:
      |                           ^
*** [.pioenvs/zzz-d1mini/src/main.cpp.o] Error 1

Which version of ESPHome has the issue?

2024.4.1

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP8266

Board

No response

Component causing the issue

binary_sensor

Example YAML snippet

binary_sensor:
  - platform: template
    id: xxx
    name: 'XXX'
    device_class: 'problem'
    lambda: return (id(zzz1).state() & !id(zzz2).state);
    filters:
      - delayed_on: 100ms

Anything in the logs that might be useful for us?

No response

Additional information

No response