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

Commit

Permalink
Merge pull request #18 from lubeda/2022.6.2
Browse files Browse the repository at this point in the history
2022.6.2
  • Loading branch information
lubeda authored Jun 19, 2022
2 parents 8bf3030 + 77afa48 commit bc0c299
Show file tree
Hide file tree
Showing 11 changed files with 777 additions and 246 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ ehmtx8266-rgb565-font.yaml
components/ehmtx/EHMTX_icons._cpp
.vscode/settings.json
ehmtx8266-select.yaml
svganimtest.html
46 changes: 42 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ emhtx:
id: garage
- url: https://github.com/home-assistant/assets/raw/master/logo/logo-small.png
id: homeassistant
- awtrixid: 1945
id: wled
```

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

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


### preview helper

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

**show_clock (Optional, seconds):** duration to display the clock after this time the date is display until next "show_screen"
**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!

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

![timing](./images/timing.png)

**duration (Optional, minutes):** lifetime of a screen in minutes (default=5). If not updates a screen will be removed after ```duration``` minutes

**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)

**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)

**yoffset (Optional, pixel):** yoffset the text is aligned BASELINE_LEFT, the baseline defaults to 6

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

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

**time (required, ID):** ID of the time component
**dayofweek (Optional, bool):** draw the day indicator on the bottom of the screen. Disable e.g. if you want larger fonts, defaults to true.

**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.

**time (required, ID):** ID of the time component. the display shows `!t!` until the time source is valid.

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

Expand Down Expand Up @@ -253,6 +267,26 @@ ehmtx:

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

#### show date

You can dynamically enable or disable the display of the date see parameter `show_date`.

```
- ehmtx.show.date:
id: rgb8x32
flag: !lambda return true;
```

#### show day of week

You can dynamically enable or disable the display of the day of week, see parameter `day_of_week`.

```
- ehmtx.show.dayofweek:
id: rgb8x32
flag: !lambda return true;
```

#### Force screen

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.
Expand Down Expand Up @@ -287,7 +321,7 @@ valid elements:

##### sample:

````
```
esphome:
name: $devicename
on_boot:
Expand Down Expand Up @@ -347,7 +381,8 @@ You have to use use id of your ehmtx component, e.g. ```rgb8x32```
alarm: false
```

Parameters:
parameters:

**id (required, ID):** ID of the ehmtx component

**text (required, string):** the text to display
Expand Down Expand Up @@ -597,6 +632,8 @@ sensor:

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.

# breaking changes
2022.6.1 removed image types only `rgb565` is valid!

# Usage

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

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

0 comments on commit bc0c299

Please sign in to comment.