I tried it with the normal styling options like “bg_opa”: 0 etc. But I don’t quite understand the parts yet and don’t know how I would have to adjust/add this to my weather icon to try it. See my code:
Suffixes~
The styling properties below support an optional two-digit suffix to indicate which part and/or state of the object the property applies to. A styling property without suffix will be applied to the default state of the main part of the object (i.e. the background).
Very detailed styling can be applied to each part depending on the state of the object:
Parts~
All objects have at least a main part. Several objects are made up of additional parts which can each be styled separately. To access the properties of the parts use a two-digit suffix appended to the styling properties below.
The part indexes are:
00 = main part of the object (i.e. the background)
10 = the indicator or needle, highlighting the the current value
20 = the knob which can be used the change the value
30 = the background of the items/buttons
40 = the items/buttons
50 = the selected item
60 = major ticks of the gauge object
70 = the text cursor
80 = the scrollbar
90 = other special part, not listed above
Can you also tell me how I should customize my automation so that it reads the images from the display itself instead of via push image? Unfortunately I’m too dumb for that.
Thank you very much. That looks pretty good. However, if I understand it correctly, it doesn’t help me much.
I am making the complete configuration in HA and no longer have any plates.yaml on the display itself.
The automation triggers whenever my weather service makes a change and then sends this information to the display.
So my goal is to replace the sending of the images so that it then pulls up the images on the display itself depending on the weather conditions.
Adjust page, id, and plate number to suit. And store the png images on the plate - There is plenty of space in flash memory.
Using mosquito_pub certainly works for me…
If I enter this in the payload template, it works.
{{ 'L:/z-128-' + states('weather.forecast_home') + '.png' if not is_state('weather.forecast_home','unavailable') }}
Now I just have to get the if operation formatted correctly, but unfortunately I don’t know how to set the brackets and spaces :-/ How do I get these two things into the payload?
{%- if not is_state('weather.forecast_home','unavailable') %}
Sorry, but I can’t write the templates for you. All I can do is show you snippets from my *.yaml and leave you to work on the finer details. Some of what I post may not work, but should show the basic idea.
{%- if not is_state('weather.forecast_home','unavailable') %}
L:/z-32-{{ state_attr('weather.forecast_home','forecast')[3]['condition'] }}.png
{%- endif %}
For debugging, it helps to open a console and use “telnet [plate IP address]”
See this thread: Extracting values from weather.forecast_home and note post number 9 from pedolsky.
The [3] in my snippet refers to the fourth -condition in the list of weather.forecast_home forecast attributes (it is an array count starting from zero).
I wrote again with the initiator of this cool template for my esp32s3 display and he told me that in the case of
{{‘p2b’ + (repeat.index+5) |string +‘7’}}
a dynamic string is written.
This ultimately results in p2b67 , p2b77 , p2b87 … etc.
where repeat.index is the number of repetitions of the while loop. He added 5 so that it fits my ids. I then have to adapt that to my ids and as soon as I have that, I can probably make the topic dynamic.
I did some research on the net and found the following link:
However, I can’t figure out what my mqtt.publish module needs to look like.
I got one of these today, but reading this thread has me confused. Some posts different displays. Should the instructions in Post#2 be enough to get me started?
----------UPDATE----------
The display attributes are set in the configuration.yaml:
#---------- OpenHASP ----------#
template:
- binary_sensor:
- name: Display settings
unique_id: ba031c34-fe93-42cb-8c0c-ebd44cb8750f # https://www.uuidgenerator.net/
state: "{{ now() - state_attr(this.attributes.update_automation | default('automation.update_display_data'), 'last_triggered') > timedelta(seconds=this.attributes.update_time | default(120) |int ) }}" # change the default automation entity_id from step 3 before
delay_on:
seconds: 2
attributes:
update_automation: "automation.update_display_data"
update_time: "80" # sending the config via mqtt needs some time to complete. This stops the automation from re.run before sending config is finished
display_w: "480"
display_h: "480"
grid_cols: "12" # increase for more resolution of object
grid_rows: "12" # increase for more resolution of object
grid_gutter: "8" # This looked nice for me
grid_margin: "4" # This looked nice for me
bg_color: "#000000" #Black
primary_color: "#4193d5" #Moderate Blue
secondary_color: "#ee9f52" #Soft orange
accent_color: "#A175C4" #Slightly desaturated violet
success_color: "#6cbe58" #Moderate lime green
warning_color: "#d67430" #Strong orange
error_color: "#e25628" #Bright red
radius: "4"