Quantcast
Channel: ESPHome - Home Assistant Community
Viewing all articles
Browse latest Browse all 1486

Lambda yaml

$
0
0

@Giuseppe-P wrote:


I am trying to understand this YAML language .. I am trained in C ++ .... it is explained very badly in esphome

how can i run a script use this lambda?

.state: Retrieve the current state of the binary sensor.

// Within lambda, get the binary sensor state and conditionally do something

if (id(my_binary_sensor).state) {
  // Binary sensor is ON, do something here
} else {
  // Binary sensor is OFF, do something else here
}

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1486

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>