Hi! I want to compare the real time and time, which I get from Home Assistant
For that I use strftime like this:
esphome: name: test platform: ESP8266 board: esp01_1m wifi: ssid: "***" password: "***" web_server: port: 80 dallas: - pin: 12 sensor: - platform: dallas address: 0xC204168409D6FF28 name: "Температура Аквариума" switch: - platform: gpio pin: number: 15 name: "Компрессор" id: compress output: - platform: gpio pin: 2 id: 'output_component1' inverted: true light: - platform: binary name: "Свет" output: output_component1 id: light2 text_sensor: - platform: homeassistant name: "Tes time" entity_id: input_datetime.surrisetime id: tites time: - platform: sntp timezone: Asia/Novokuznetsk id: time on_time: - seconds: /30 then: - lambda: |- char holtime[10]; strftime(holtime,10,"%H:%M",id(time).now()); ESP_LOGI("main", "HA Sensor %s", id(tites)); ESP_LOGI("main", "HA Sensor %s", holtime); puts (holtime); # Enable logging logger: # Enable Home Assistant API api: password: "tester" ota:
But I have next error:
Where is my mistake?