History graph in notification

Hi,

Is there a chance to integrate a history-graph into a mail notification? I have already created a notification which is working with normal text and temperature state attributes.

- id: '123'
  alias: text email when door is open
  initial_state: true
  trigger:
  - entity_id: binary_sensor.door_contact_1
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: " The door is open  \n\nTemperature 1 is: {{ states.sensor.temperature_1.state }}  "
      title: Door open
    service: notify.notification_1

Now I would like to integrate the history-graph with three different temperature curves into the notification. I use the same graph on the Lovelace UI. My programming skills aren’t that good. I have tried the following code, but it is not working at all.

- id: '123'
  alias: text email when door is open
  initial_state: true
  trigger:
  - entity_id: binary_sensor.door_contact_1
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
    data:
      titel: Temperature history-graph
      message: " Temperature inside: "
      entities:
        - sensor.temperature_1
        - sensor.temperature_2
        - sensor.temperature_3
      hours_to_show: 24
      type: history-graph

Any idears?

Second question is if ther is a possibility to ad min and max values for temperature_1.

Thanks!

Hi,

Did you figure out how to get the graph in the notification? I’d be interested in that too :slight_smile:

Hi,

unfortunately not. I only was able to insert the current value as well as the min and max value. But no graph or picture of the graph.

bummer.

I was thinking maybe one way would be to get a graph from grafana but haven’t looked more into it. Seems there should be a way to generate the graphs that the gui generates?