Skip to content

Commit

Permalink
Version 1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gickowtf committed Apr 15, 2024
1 parent c149229 commit c7fc3b3
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ A components page turns your Pixoo into your canvas! You can tie multiple text
#[image config]
- type: rectangle
#[rectangle config]
- type: templatable
#[templatable config]
```
<br>

Expand Down Expand Up @@ -181,6 +183,46 @@ Example
filled: "{{ states.input_boolean.YOURS.state }}" #optional
```

#### Component: Templatable

| **Config Options** | **required** | **Default** | **Values** |
|--------------------|:------------:|-------------|-----------------|
| template | Yes | | jinja2 template |

Example
```yaml
- type: templatable
template: >-
{% set entities = [["input_boolean.sw1", "input_boolean.sw2"],
["input_boolean.sw2"]] %} {% set origin = [1, 62] %}
{% set output = namespace(list=[], position_x = origin[0], position_y =
origin[1]) %} {% for entity_group in entities -%} {# {%- if loop.first
%}The {% elif loop.last %} and the {% else %}, the {% endif -%} #}
{% for entity in entity_group -%} {# {%- if loop.first %}The {% elif
loop.last %} and the {% else %}, the {% endif -%} #} {% set entity_state
= states(entity) %}
{## Select the color ##} {% if entity_state=="off" or
entity_state=="not_home" or entity_state == "standby" %} {% set
color="red" %} {% elif entity_state=="on" or entity_state=="home" %} {%
set color="green" %} {% elif entity_state=="playing" or
entity_state=="idle" or entity_state=="paused" %} {% set color="blue" %}
{% else %} {% set color="white" %} {% endif %}
{% set component = {"type": "rectangle", "size": [1,1], "color": color,
"position": [output.position_x, output.position_y]}%}
{## Make next pixel 2px higher ##} {% set output.position_y =
output.position_y - 2 %} {## Add to the output list##} {% set
output.list = output.list + [component] %}
{%- endfor %} {## Make next pixel 2px to the right ##} {% set
output.position_x = output.position_x + 2 %} {## reset y ##} {% set
output.position_y = origin[1] %} {%- endfor %} {{output.list}}
```

#### Variables (Optional) (Only for the components page)
If you wish for easier sharing of your custom component pages, you can define variables in the variables tag. These can then be used in any template.

Expand Down Expand Up @@ -215,6 +257,27 @@ Example usage:

--------------


## Page: gif
*Animated GIFs*

1. Download the gif on your computer.
2. Resize your gif to 16x16, 32x32 or 64x64. I know some websites say it's 64x64, but it has to actually be 64x64. You can resize gifs on multiple websites. Here's an example. (You only have to select manually the width and height of the size down the page).
3. Re-download the gif.
4. Re-upload the gif. You can use many image services like this one. (Make sure you use the gif file's link, and not the "gif viewing page". You can get that by right-clicking the gif on the website, and then clicking "Copy Image Link". The link in your clipboard probably now ends in .gif, like your file. (Although this might not be 100% the case.))

| **Config Options** | **required** | **Default** | **Values** |
|--------------------|:------------:|-------------|------------|
| gif_url | Yes | | URL |

Example:
```yaml
- page_type: gif
gif_url: https://i.ibb.co/tKnvLs2/ezgif-5-30ff95e9ca.gif
```

--------------

## Page: Channel
*In Divoom app you can set three different custom channels which you can select here.*

Expand Down
1 change: 1 addition & 0 deletions READMES/BasicsDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ In diesem Teil werde ich etwas weiter ausholen aber ich denke wenn dies verstand
Für das Beispiel habe ich ein extra sensor `sensor.example` erstellt.
![devtools.jpg](images%2Fdevtools.jpg)

> [!INFO]
> Der Sensor hat den `State` 1337 diesen kann man mit der Jinja template Engine wie folgt ansprechen:
<br>`{{ states("sensor.example") }}` was die folgende ausgabe: `1337` ergibt.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/divoom_pixoo/const.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DOMAIN = "divoom_pixoo"
VERSION = "1.10.2"
VERSION = "1.11.0"
CURRENT_ENTRY_VERSION = 2
2 changes: 1 addition & 1 deletion custom_components/divoom_pixoo/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/gickowtf/pixoo-homeassistant/issues",
"requirements": [],
"version": "1.10.2"
"version": "1.11.0"
}

0 comments on commit c7fc3b3

Please sign in to comment.