Comments (5)
Oops! I did omit the time platform in my ESPHome.yaml code. Try adding this to the ESPHome YAML:
- platform: homeassistant
id: esptime
on_time_sync:
then:
- lambda: !lambda |-
static boolean bootTimestampSet = false;
if (!bootTimestampSet) {
bootTimestampSet = true;
auto now = id(esptime).now();
now.strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%S");
id(boot_timestamp).publish_state(buffer);
}
I'm away from home for a few days, but I will verify this is the correct code and update the repository accordingly when I return.
from arylic-amp-mqtt.
Thanks for the quick reply and no rush. I am getting error on line: "id(boot_timestamp).publish_state(buffer);" on variable "boot_timestamp" .
from arylic-amp-mqtt.
I finally figure out what was missing in the yaml file. I added the following at the end of file.
Thanks for the missing link.
<<<
text_sensor:
- platform: template
name: "sirius-tft_esphome Boot Timestamp"
id: boot_timestamp
icon: mdi:clock-start
time:
- platform: homeassistant
id: esptime
on_time_sync:
then:
- lambda: !lambda |-
static boolean bootTimestampSet = false;
if (!bootTimestampSet) {
bootTimestampSet = true;
auto now = id(esptime).now();
now.strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%S");
id(boot_timestamp).publish_state(buffer);
}
from arylic-amp-mqtt.
Thanks for the update... and again, sorry for the omission on my part. I will correct the repo with the additional code as soon as I return home and am a position to do so.
from arylic-amp-mqtt.
Just a follow up... I've updated the code in the repository to include the missing time: and text_sensor:
from arylic-amp-mqtt.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arylic-amp-mqtt.