Skip to content

Commit

Permalink
Merge pull request #115 from tbratfisch/main
Browse files Browse the repository at this point in the history
Update special-clock-and-date-display-duration.md
  • Loading branch information
lubeda authored Oct 18, 2023
2 parents 04218b6 + 0947526 commit d1c5aa1
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions wiki/special-clock-and-date-display-duration.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# Introduction

**Skill-level:** easy
I'm using EspHoMaTriXv2 on a Ulanzi TC001. I want to display the time for 55 seconds and the date for 5 seconds in a loop. I don't understand, how I can configure the display times. I tried clock_interval: 55 but it doesn't seem to help.

Set up a timer helper named *eier_timer*
What's the correct way?

## step 1: **home assistant automation:**
## new Method with lambda:

I'm using EspHoMaTriXv2 on a Ulanzi TC001. I want to display the time for 55 seconds and the date for 5 seconds in a loop. I don't understand, how I can configure the display times. I tried clock_interval: 55 but it doesn't seem to help.
add this to your config:

```yaml
on_start_running:
then:
lambda: |-
ESP_LOGD(TAG, "removing date screen and setting a new one with new screen time");
id(rgb8x32)->del_screen("*", 3);
id(rgb8x32)->date_screen(1440, 5, true, 192, 192, 192);
ESP_LOGD(TAG, "removing default clock screen and setting a new one with new screen time");
id(rgb8x32)->del_screen("*", 2);
id(rgb8x32)->clock_screen(1440, 55, true, 192, 192, 192);
```
## old Method:
**Skill-level:** easy
Set up a timer helper named *eier_timer*
What's the corerct way?
### step 1: **home assistant automation:**
I think the easiest way is by a home assistant script like this:
Expand Down Expand Up @@ -45,4 +63,4 @@ icon: mdi:clock-digital
This deletes the default date and clock display and fills the loop with a 55 sec clock and a 5 sec date screen. The lifetime is one day, so the script must run once a day or on boot.
This is also possible in the esphome YAML, with lambdas.
This is also possible in the esphome YAML, with lambdas.

0 comments on commit d1c5aa1

Please sign in to comment.