I new to ESPHome, I wish to print the state of a device in the logger.log.
I cannot find the format to use for the state argument.
I try “format: “Hello World is %u”
args: [BuildInLED.state]”
Can anyone help please, this is my first with ESPHome and trying tracing help
Following is my code
captive_portal:
output:
platform: gpio
id: “BuildInLED”
pin:
number: D4
inverted: truelight:
- platform: binary
output: “BuildInLED”
name: "Build In LED "
on_state:
logger.log:
format: “Hello World is %u”
args: [BuildInLED.state]binary_sensor:
platform: gpio
pin:
number: D2
name: “PIR Sensor”
device_class: motion
‘’’