Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I am using the Netatmo integration, and unfortunately it reports the wind direction as cardinal points, e.g. N, S, NW, SE etc.
I was ideally looking at putting this value from the entity into the Header, but unfortunately it only shows 'NaN', (when setting in_header show option to 'raw' (See image below). I thought this would simply dump the raw entity value, but alas not.
So, alternatively can someone demonstrate a function that I could put into the data_generation option that would map the cardinal points to a value, e.g. N -> 0, E to 90 etc. etc. to either show in the header or as the trend? Or a method of doing something with the data from the wind entity.
This is my current card YAML:
`type: custom:apexcharts-card
color_list:
show:
loading: true
header:
show: true
title: Wind
show_states: true
colorize_states: true
graph_span: 1day
all_series_config:
stroke_width: 2
yaxis:
decimals: 1
series:
type: area
name: Speed
yaxis_id: Speed
show:
extremas: true
type: line
name: Direction
yaxis_id: Direction
show:
in_chart: false
in_header: raw`
and this is what it looks like with the 'NAN' showing in the header;
![image](https://user-images.githubusercontent.com/4674288/215577155-70d166d8-e8b8-4aca-933e-389c6ead52de.png)
Thanks,
Dave
Beta Was this translation helpful? Give feedback.
All reactions