You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I have some trouble figuring out why this code stoped working.
Im trying to show precipitation and the probability on the same chart but the precipitation doesnt show.
Im using a template to extract the hourly data and it still works because if i put the precipitation in a single chart it works.
This is the template!
`
template:
to call weather forecast service to get hourly into a new entity Dec 2023
entity: sensor.forecast_home_hourly
show:
legend_value: false
type: line
stroke_width: 2
color_threshold:
value: 0
color: green
value: 50
color: yellow
value: 100
color: red
color: red
name: Sannolikhet %
extend_to: end
data_generator: |
return entity.attributes.forecast.map((entry) => {
return [new Date(entry.datetime).getTime(), entry.precipitation_probability];
});
entity: sensor.forecast_home_hourly
show:
legend_value: false
type: column
color: blue
name: Nederbörd mm / timma
extend_to: end
data_generator: |
return entity.attributes.forecast.map((entry) => {
return [new Date(entry.datetime).getTime(), entry.precipitation];
});
`
Its one of my best integrations i have so i really want it to work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
I have some trouble figuring out why this code stoped working.
Im trying to show precipitation and the probability on the same chart but the precipitation doesnt show.
Im using a template to extract the hourly data and it still works because if i put the precipitation in a single chart it works.
This is the template!
`
template:
to call weather forecast service to get hourly into a new entity Dec 2023
#Met.no hourly
hours: "/1"
action:
data:
type: hourly
target:
entity_id: weather.hem
response_variable: hourlyforecast
sensor:
unique_id: bis202312041810
icon: mdi:weather-cloudy-clock
state: "{{ now().isoformat() }}"
attributes:
forecast: "{{ hourlyforecast['weather.hem']['forecast'] }}"
`
This is the apex chart that worked before.
`
experimental:
color_threshold: true
graph_span: 24h
span:
start: hour
header:
show: true
title: Nederbörd per timma (met.no)
apex_config:
chart:
height: 300px
yaxis:
- show: true
title: Nederbörd mm
min: 0
max: 100
- show: true
title: Sannolikhet %
opposite: true
series:
show:
legend_value: false
type: line
stroke_width: 2
color_threshold:
color: green
color: yellow
color: red
color: red
name: Sannolikhet %
extend_to: end
data_generator: |
return entity.attributes.forecast.map((entry) => {
return [new Date(entry.datetime).getTime(), entry.precipitation_probability];
});
show:
legend_value: false
type: column
color: blue
name: Nederbörd mm / timma
extend_to: end
data_generator: |
return entity.attributes.forecast.map((entry) => {
return [new Date(entry.datetime).getTime(), entry.precipitation];
});
`
Its one of my best integrations i have so i really want it to work.
Beta Was this translation helpful? Give feedback.
All reactions