Hi there,
Rather new to HA and just signed up to this forum for I can’t seem to find the answer I am looking for.
I am building a dashboard for my NAS. Therefor I added the first custom:mini-graphics-card and added this code to the card (found all these options on the internet):
type: custom:mini-graph-card
name: NAS °C (volume 01)
icon: mdi:thermometer
hours_to_show: 168
points_per_hour: 0.1
animate: true
unit: °C
show:
extrema: true
graph: line
average: true
icon_adaptive_color: true
name_adaptive_color: false
state: true
fill: true
labels: false
entities:
- entity: sensor.NAS_volume_1_average_disk_temp
color: '#406E37'
name: gemiddelde temperatuur (volume 01)
- color: '#AEBECF'
entity: sensor.nightstate
name: na zonsondergang
show_legend: false
show_line: false
show_points: false
y_axis: secondary
- entity: sensor.NAS_volume_1_maximum_disk_temp
color: '#B81F1F'
name: maximale temperatuur (volume 01)
- color: '#AEBECF'
entity: sensor.nightstate
name: na zonsondergang
show_legend: false
show_line: false
show_points: false
y_axis: secondary
This gives me a graphics with two lines, 1 in red and 1 in green. All other option are present (the ones that I want to see) but, no night state. So the gray secondar axis is not shown. T have checked that the sun.sun entity is active (it is) and I have checked that there are no errors in configuration.yaml where night.state is defined.
# Night State
sensor:
- platform: template
sensors:
nightstate:
friendly_name: “Na zonsondergang”
value_template: “{% if is_state('sun.sun', 'below_horizon') %}1{% else %}0{% endif %}”
What am I missing?
It does not change anything if I use the sensor.nightstate once at the end of the two NAS.sensors of if I do it twice.
Thanks in advance.
Kind regards,
ArtMel1998