hi all,
I’m trying to figure out why this wont work:
- platform: template
name: "S Mode"
lambda: !lambda |-
if (id(jva_intake).state) == False and (id(jva_return).state) == True {
return true;
} else {
return false;
}
turn_on_action:
- switch.turn_on: jva_intake
- switch.turn_on: jva_return
restore_state: NO
I get
src/main.cpp: In lambda function:
src/main.cpp:670:30: error: expected primary-expression before '==' token
if (jva_intake->state) == True and (jva_return->state) == False {
^
src/main.cpp:670:33: error: 'True' was not declared in this scope
if (jva_intake->state) == True and (jva_return->state) == False {
^
src/main.cpp:670:65: error: 'False' was not declared in this scope
if (jva_intake->state) == True and (jva_return->state) == False {
^
src/main.cpp:675:3: warning: control reaches end of non-void function [-Wreturn-type]
});
^
I’ve tried a few variations without the ‘and’, the only condition I can get to compile is if i do only
if (id(jva_intake).state)
Any help or advice is appreciated.