Skip to content

Text sensor on graphs #266

Answered by dbuezas
jazzmonger asked this question in Q&A
Apr 3, 2023 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

Hi there 👋

here's a way of doing it:

type: custom:plotly-graph
hours_to_show: 10m
entities:
  - entity: sensor.teich_temperature
    mode: markers+text+lines
    textposition: top
    text: $ex ys

the $ex you see there means "this is an expression", and ys just means "put the array of y values in there". See more about universal functions and expressions here. You can probably combine it with texttemplate to format it or just this instead:

$ex ys.map(y => `the value is: ${y}`)

Alternatively you may want to use a bar chart instead and avoid setting the text array yourself, see this Show&Tell: #223

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by dbuezas
Comment options

You must be logged in to vote
4 replies
@dbuezas
Comment options

@dbuezas
Comment options

@jazzmonger
Comment options

@dbuezas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #265 on April 03, 2023 15:53.