Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit bc0c299

Browse files
authored
Merge pull request #18 from lubeda/2022.6.2
2022.6.2
2 parents 8bf3030 + 77afa48 commit bc0c299

File tree

11 files changed

+777
-246
lines changed

11 files changed

+777
-246
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ ehmtx8266-rgb565-font.yaml
1818
components/ehmtx/EHMTX_icons._cpp
1919
.vscode/settings.json
2020
ehmtx8266-select.yaml
21+
svganimtest.html

README.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ emhtx:
6262
id: garage
6363
- url: https://github.com/home-assistant/assets/raw/master/logo/logo-small.png
6464
id: homeassistant
65+
- awtrixid: 1945
66+
id: wled
6567
```
6668

6769
### Parameter
@@ -77,6 +79,8 @@ The id of the icons is used later to configure the screens to display. So you sh
7779

7880
**file (Exlusive, filename):** a local filename
7981
**url (Exclusive, url):** a url to download an icon
82+
**awtrixid (Exclusive, number):** the number of the icon from the [Awtrix icon database](https://awtrix.blueforcer.de/icons.html)
83+
8084

8185
### preview helper
8286

@@ -171,19 +175,29 @@ ehmtx:
171175
_Configuration variables:_
172176
**id (Required, ID):** Manually specify the ID used for code generation and in service definitions.
173177

174-
**show_clock (Optional, seconds):** duration to display the clock after this time the date is display until next "show_screen"
178+
**show_clock (Optional, seconds):** duration to display the clock after this time the date is display until next "show_screen". If `show_date` is false `show_clock` is false and the clock will be display as long as a normal screen!
175179

176180
**show_screen (Optional, seconds):** duration to display a screen or a clock/date sequence, a long text will be scrolled at least two times
177181

182+
![timing](./images/timing.png)
183+
178184
**duration (Optional, minutes):** lifetime of a screen in minutes (default=5). If not updates a screen will be removed after ```duration``` minutes
179185

186+
**date_format (Optional, string):** formats the date display with [strftime syntax](https://esphome.io/components/time.html?highlight=strftime), defaults `"%d.%m."` (use `"%m.%d."` for the US)
187+
188+
**time_format (Optional, string):** formats the date display with [strftime syntax](https://esphome.io/components/time.html?highlight=strftime), defaults `"%H:%m"` (use `"%I:%M%p"` for the US)
189+
180190
**yoffset (Optional, pixel):** yoffset the text is aligned BASELINE_LEFT, the baseline defaults to 6
181191

182192
**xoffset (Optional, pixel):** xoffset the text is aligned BASELINE_LEFT, the left defaults to 1
183193

184194
**display8x32 (required, ID):** ID of the addressable display
185195

186-
**time (required, ID):** ID of the time component
196+
**dayofweek (Optional, bool):** draw the day indicator on the bottom of the screen. Disable e.g. if you want larger fonts, defaults to true.
197+
198+
**show_date (Optional, bool):** if true, show the date for `show_screen - show_clock` seconds otherwise only shows the clock for `show_screen` seconds, defaults to true.
199+
200+
**time (required, ID):** ID of the time component. the display shows `!t!` until the time source is valid.
187201

188202
**font (required, ID):** ID of the font component
189203

@@ -253,6 +267,26 @@ ehmtx:
253267

254268
For local automations you can use actions. This is the normal way of automations. The ```id(rgb8x32)->``` style will also work.
255269

270+
#### show date
271+
272+
You can dynamically enable or disable the display of the date see parameter `show_date`.
273+
274+
```
275+
- ehmtx.show.date:
276+
id: rgb8x32
277+
flag: !lambda return true;
278+
```
279+
280+
#### show day of week
281+
282+
You can dynamically enable or disable the display of the day of week, see parameter `day_of_week`.
283+
284+
```
285+
- ehmtx.show.dayofweek:
286+
id: rgb8x32
287+
flag: !lambda return true;
288+
```
289+
256290
#### Force screen
257291

258292
Force the selected screen ```icon_name``` to be displayed next. Afterwards the loop is continuing from this screen. e.g. helpfull for alarms. Or after an update of the value/text.
@@ -287,7 +321,7 @@ valid elements:
287321

288322
##### sample:
289323

290-
````
324+
```
291325
esphome:
292326
name: $devicename
293327
on_boot:
@@ -347,7 +381,8 @@ You have to use use id of your ehmtx component, e.g. ```rgb8x32```
347381
alarm: false
348382
```
349383

350-
Parameters:
384+
parameters:
385+
351386
**id (required, ID):** ID of the ehmtx component
352387

353388
**text (required, string):** the text to display
@@ -597,6 +632,8 @@ sensor:
597632

598633
There is a optional [notifier component](https://github.com/lubeda/EHMTX_custom_component) you can install with hacs. It is compareable to the **_screen** service but more streamlined.
599634

635+
# breaking changes
636+
2022.6.1 removed image types only `rgb565` is valid!
600637

601638
# Usage
602639

@@ -608,3 +645,4 @@ THE SOFTWARE IS PROVIDED "AS IS", use at your own risk!
608645
# Thanks
609646

610647
**[jd1](https://github.com/jd1)** for his contributions
648+
**[ofirsnb](https://github.com/ofirsnb)** for his contributions

0 commit comments

Comments
 (0)