after upgrading to the latest Home Assistant (from 2024.1.x to 2024.3.2), it seems that Meteorologisk institutt (Met.no) forecasts “lost” the hourly entity, which I used in apexcharts to draw the temperature for the next 24 hours. This information, if I understand it correctly, is now available by calling the service.get_forecast with hourly option (which works in the developer section nicely). But I have no idea, how I can retrieve it from within an apexcharts card or how to get the service data into an own entity or its attributes.
The code I used pefore looks like this:
- entity: weather.homebw_hourly
show:
extremas: true
offset_in_name: false
legend_value: false
float_precision: 1
yaxis_id: outtemp
stroke_width: 1
color: green
unit: °C
group_by:
fill: 'null'
data_generator: |
var now = new Date();
var tdata = entity.attributes.forecast.map(
(f) => {
var ctime = new Date(f.datetime);
return [ctime.getTime(), f.temperature];
}
);
tdata.unshift([now.getTime(), entity.attributes.temperature]);
return tdata;