Skip to content
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

plot calculated value #510

Open
hipslu opened this issue Dec 22, 2024 · 2 comments
Open

plot calculated value #510

hipslu opened this issue Dec 22, 2024 · 2 comments

Comments

@hipslu
Copy link

hipslu commented Dec 22, 2024

i'd like to plot a calculated value - the calculation is done and displayed on hover, but i'd like to have the calculated value used for y values instead - is this possible?

type: custom:plotly-graph
entities:
  - entity: sensor.vicare_compressor_starts
    statistic: sum
    period: auto
    showlegend: false
    line:
      width: 3
      shape: spline
      smoothing: 0.5
    show_value: true
    texttemplate: "%{y:.4f}"
    filters:
      - resample: 1h
      - map_y_numbers: >-
          parseFloat(y) /
          parseFloat(hass.states['sensor.vicare_compressor_hours'].state)
hours_to_show: 1d
refresh_interval: 10
autorange_after_scroll: true
layout:
  xaxis:
    rangeselector:
      "y": 1.2
      buttons:
        - count: 1
          step: day
        - count: 7
          step: day
        - count: 1
          step: month
        - count: 1
          step: year

@dbuezas
Copy link
Owner

dbuezas commented Dec 22, 2024

Not sure I understand what you mean, the filter is already acting as y value of each data point

@hipslu
Copy link
Author

hipslu commented Dec 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants