-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global or tag based date and time picker. #403
Comments
You could post values from one plot into a sensor using the hass object, then fetch it in the other one. |
Ok, I tried it and it does work but it is not great to be honest. One thing you could do is to put all plots in a single card like this: |
For the record, this was my experiment: Kapture.2024-03-30.at.08.22.56.mp4Master charttype: custom:plotly-graph
entities:
- entity: sensor.senseair_co2
fn: >
$ex hass.callApi("POST", "states/sensor.plotly_visible_range", {state:
JSON.stringify(get("visible_range"))})
Other synched charttype: custom:plotly-graph
entities:
- entity: sensor.senseair_co2
- entity: sensor.plotly_visible_range
internal: false
comment1: for some reason, plotly doesnt update the layout if this is internal true
comment2: this is here just to make plotly refresh when visible range changes
yaxis: y10
'y': []
layout:
xaxis:
range: |
$ex JSON.parse(hass.states["sensor.plotly_visible_range"].state)
hours_to_show: 24
refresh_interval: auto
|
I think this wil work for my usecase. Thanks! |
Describe the solution you'd like
I would like to have the ability to use a single set of date and time selection controls to select the date and time for all cards on a given dashboard, or perhaps for a selected few that are selectable by tags. This functionality would be similar to how the "energy-date-selection" card works for the energy dashboard but applicable to Plotly cards and usable for purposes other than energy-related data.
How would it be defined in yaml?
The text was updated successfully, but these errors were encountered: