Home_Assistant_Integration
Home_Assistant_Integration copied to clipboard
Background is dithered grey instead of clear white
Describe the bug
After upgrading to from 0.5.something to 1.0.0.1 and migrating my scripts from line4/format4 as good as possible, the background is some kind of dithered grey instead of a clear white.
To Reproduce Steps to reproduce the behavior:
- Create a script like this:
sequence:
- variables:
days: >
{% set difference_in_seconds = 80000 %} {% set days =
(difference_in_seconds / (60 * 60 * 24)) %} {{ days | round(0, 'ceil')
}}
- target:
device_id: 36e0de2da4ad8d0b056a08ffc8b640c4
data:
rotate: 0
payload:
- type: text
value: Test {{ days }}
y: 10
x: 148
anchor: mt
size: 24
color: black
action: open_epaper_link.drawcustom
Expected behavior
Background is clear white. Text is black.
Screenshots
Additional context
Setting background: white doesn't change anything.
what is dithering set to in the drawcustom action?
It is (was) not set. After setting it to 0, white is white. Thanks for the hint.
Feedback:
- It is counterintuitive to have to care about dithering at all when not working with images
- It is counterintuitive that white is dithered
- While technically, drawcustom is obviously a replacement for line4/format4, things like having white text on red background was a breeze with format, it is time-consuming with drawcustom
I understand, you likely will not see this as a bug. Everything works as designed. But sometimes the bug is in the design.
I just tried to reproduce it on my HA instance and there was no dithering regardless of what was selected (or theoretically not selected at all if the value is not changed but seems to show 2) which is weird.
I agree, you shouldn't have to care about dithering, that's why it is supposed to be off by default, and definitely a bug if that happened in your script.
According to https://github.com/OpenEPaperLink/Home_Assistant_Integration/blob/main/docs/drawcustom/supported_types.md, dither = 2 is the default:
The source confirms that: https://github.com/OpenEPaperLink/Home_Assistant_Integration/blob/main/custom_components/open_epaper_link/services.py#L27
Displays used are M2 2.9", 296x128, fw:19 0x13 if that matters.