Can I place a graphcard inside a picture element? And how?

I have a very nice display of my pool, but with the updates to card_mod and stuff like that, I couldn’t get the placement to work.
Currently it looks like this:


Previously I had the graph inside the ‘pool pictogram’
The current cards looks like this:

cards:
  - elements:
      - entity: sensor.pool_temperature
        style:
          color: white
          font-size: 1.1em
          left: 50%
          top: 48%
        type: state-label
      - entity: sensor.netatmo_greve_have_temperature
        style:
          font-size: 1.5em
          left: 80%
          top: 4%
        type: state-label
      - entity: sensor.yr_current_symbol
        style:
          left: 66%
          top: 6%
        type: state-icon
      - entity: sensor.gardendistributor_power
        style:
          font-size: 1.3em
          left: 80%
          top: 74%
        type: state-label
      - entity: switch.poolpump
        state_image:
          'off': /local/images/water-flow-cropped-still.gif
          'on': /local/images/water-flow-cropped.gif
        style:
          left: 50%
          top: 74%
          width: 30%
        tap_action:
          action: toggle
        type: image
    image: /local/images/pool-pictogram3.png
    title: Pool
    type: picture-elements
  - detail: 2
    entity: sensor.pool_temperature
    graph: line
    type: sensor
type: vertical-stack

How do I get the graph to show inside??

1 Like

Hi,

did you ever figure it out? I am also interested in doing something similar.

thanks
Fred

I had it working, then the card-mod stuff got changed, and I couldn’t figure it out afterwards.

I think you will need to give the “style: left: top: width:” thing to your sensor.pool_temperature detail: 2.

Hi,

thanks for the input. Not sure what you mean by detail: 2. I am actually nearly where i want to be, but need to know if its possible to control the size of the mini-graph-card.2021-03-11_16-17-39

thanks
Fred

Hi @fredanaman
Could you post the code you used?