I’m wondering if it’s possible to use entity’s attribute in history graph. For example I have sun.sun which has elevation. I would like to use it as input for my graph. Is it possible? If yes, could you please give me a hint how to do it?
is there a way to do this without actually creating another sensor? maybe this is a feature request, but i have sensors with tons of attributes that i need only for plotting and nothing else. Creating a “new” sensor for every single item just pollutes a lot. Entering the attribute in the lovelace card directly will be ideal
I try to make a pull request for the original mini-graph-card - repro.
Actually this implementation makes a data fetch for every entity and attribute configured.
An optimization would be only one data fetch per entity and extract the data for the different attributes with a single fetch. Hence, you must be carefull while using this implementation.
Actually you must install this add on manually. I placed I pull request in Github, so hopefully the mini-graph-card maintainers incooperate the changes to the “main line”.
Actually the feature to access attributes from the mini-graph-card is not implemented in the original repository. So I updated my repository with the changes from the original repository.
EDIT : I found the “master” branch and it works well now.
It worked for quite some time and since the last update of HA it broke.
I uninstalled the frontend integration and reinstalled it (with beta versions checked) and I only get v0.0.4 on the list. Since then I got this message : "Custom element doesn’t exist: mini-graph-card. "
Thanks for this, helps me a lot in determining when I need to trigger my hallway lights and motion sensor based on the elevation of the sun, maybe compared with some lux values.
I used this method before , but is needed restart HA , now i use appex-chart repo , install it with HACS.
My code of lovelace card that show external temperature is:
type: custom:apexcharts-card
graph_span: 5d
header:
show: true
title: External Temperature
series:
- entity: weather.casa
attribute: temperature
type: line
name: temperature