I'm using generic-bk7231n-qfn32-tuya as board and I have created a template switch to run some code with lambda.
When I'm using millis in lambda and try to compile I get this error
error: call of overloaded 'millis()' is ambiguous
The same code compiles fine on ESP8266, ESP8285 and wr3(rtl87xx).
It compiles fine on bk72xx if I add #define millis() esphome::millis() in lambda. Why is that? Is there any other way to fix it without changing the code? I'm using local packages to add multiple sensors on many devices and I don't want to edit each one every time I make a change.
Which version of ESPHome has the issue?
2024.2.2
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
No response
What platform are you using?
BK72XX
Board
generic
Component causing the issue
millis in lambda
Example YAML snippet
platform: template
id: some_switch
name: my switch
optimistic: true
lambda: |-
unsigned long current_millis = millis() / 1000;
The problem
I'm using
generic-bk7231n-qfn32-tuya
as board and I have created a template switch to run some code with lambda. When I'm using millis in lambda and try to compile I get this errorThe same code compiles fine on ESP8266, ESP8285 and wr3(rtl87xx).
It compiles fine on bk72xx if I add
#define millis() esphome::millis()
in lambda. Why is that? Is there any other way to fix it without changing the code? I'm using local packages to add multiple sensors on many devices and I don't want to edit each one every time I make a change.Which version of ESPHome has the issue?
2024.2.2
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
No response
What platform are you using?
BK72XX
Board
generic
Component causing the issue
millis in lambda
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response