Closed MartinAirN closed 6 months ago
can you try duration: 36000 ?
can you try duration: 36000 ?
This indeed does work, interesting.
(also noted the example code has 3600: https://github.com/jonasniesner/open_epaper_link_homeassistant/blob/main/docs/drawcustom/supported_types.md#plot)
edit: Well, i said work:
using 100000:
But using 6000:
It seems the lower the number the less of the graph it fills.
I think this is the recorder not having the data ready because most on the front
I think this is the recorder not having the data ready because most on the front
Hmmm, any way to make sure this is the case? As when I use the config below it does seem to update according correctly matching the history.
background: white
rotate: 0
payload:
- type: icon
value: flash
x: 4
"y": 0
size: 40
color: black
- type: text
value: Power Consumption &
x: 48
"y": 4
size: 15
color: black
- type: text
value: Solar Generation
x: 130
"y": 24
size: 15
color: red
- type: plot
x_start: 10
y_start: 44
x_end: 284
y_end: 119
duration: 100000
low: -2
high: 8
ylegend:
position: left
color: red
data:
- entity: sensor.power_consumption
width: 1
- entity: sensor.solar_power_in_kw
color: red
yes, i am sure, your picture confirms it. With longer durations, there is less missing data at the start
yes, i am sure, your picture confirms it. With longer durations, there is less missing data at the start
But isnt the new data being added on the right?
I would therefore expect the data is there but not requested or displayed.
Looking at the code, and seeing as it is exactly one hour difference I am thinking it is due to UTC vs local timezone.
end = dt.now()
start = end - duration
My local timezone is UTC+1. However, the docker is running UTC. So if dt.now()
returns UTC+1 but the input to all_states = get_significant_states(hass, start_time=start, entity_ids=[plot["entity"] for plot in element["data"]], significant_changes_only=False, minimal_response=True, no_attributes=False)
expects UTC then it effectively requests with start_time=now
.
Unless of course the start time is more subtracted from UTC+1, as then it requests more of the past which is then overlapping with available data.
Thank you for this tip, fixed in 70ee3f1
Describe the bug Using the new Plot feature the graph appears as expected, however the line is not drawn. Tested with sensors:
To Reproduce Steps to reproduce the behavior:
Expected behavior A plot appears with a line drawn in.
Screenshots History of sensor:![image](https://github.com/jonasniesner/open_epaper_link_homeassistant/assets/3510594/ae6b5787-b0ed-497e-84ed-3fae41524a69)
Plot:![Graph Not Working](https://github.com/jonasniesner/open_epaper_link_homeassistant/assets/3510594/648e01a9-0da2-4377-8fea-811e566aea8a)
Additional context HomeAssistant Core: 2023.12.3 (docker) HomeAssistant Frontend 20231208.2 OpenEPaperLink 0.4.1.1
Installed through HACS