complex1
(Frank)
March 27, 2023, 11:44am
2683
Are you sure you didn’t spell anything wrong?
Shouldn’t it be something like this? (I’m using EnergyZero)
Note the capital letters.
data_generator: |
return entity.attributes.Prices.map((record, index) => {
return [new Date(record.readingDate).getTime(), record.price];
});
complex1
(Frank)
March 27, 2023, 11:54am
2684
Reading the ‘series Options’ of the Apexcharts-card… next options can be removed from your card.
stroke_width: 2 → Change the width of the line. Only works for area and line
min: 0 → Only used when chart_type = radialBar
opacity: 1 → Is default value
1 Like
mhoogenbosch
(Martijn Hoogenbosch)
March 27, 2023, 12:04pm
2685
When doing this, the result at least is consistent, but doesn’t show any data.
When looking at sensor.nextenergy_average_electricity_price_today it shows the follwing filter attributes:
state_class: measurement
prices_today:
- time: '2023-03-27 00:00:00+02:00'
price: 0.35181
- time: '2023-03-27 01:00:00+02:00'
price: 0.34553
>> a lot more
prices_tomorrow:
- time: '2023-03-28 00:00:00+02:00'
price: 0.35752
- time: '2023-03-28 01:00:00+02:00'
price: 0.36425
>> a lot more
prices:
- time: '2023-03-27 00:00:00+02:00'
price: 0.35181
- time: '2023-03-27 01:00:00+02:00'
price: 0.34553
>> a lot more
unit_of_measurement: €/kWh
attribution: Data provided by ENTSO-e Transparency Platform
device_class: monetary
icon: mdi:currency-eur
friendly_name: Average electricity price today (NextEnergy)
complex1
(Frank)
March 27, 2023, 12:27pm
2686
This what I see when reading my sensor:
Prices:
- price: 0.11
readingDate: '2023-03-26T23:00:00Z'
- price: 0.11
readingDate: '2023-03-27T00:00:00Z'
- price: 0.1
readingDate: '2023-03-27T01:00:00Z'
Maybe you have to change
return entity.attributes.prices.map((record, index) => {
in
return entity.attributes.prices_today.map((record, index) => {
return entity.attributes.prices_today.map((entry) =>
{
var date = new Date(entry.time);
return [date, entry.price];
});
Kertz1954
(Kertz1954)
March 27, 2023, 1:44pm
2688
Just to confirm, does this graph work on your other devices ?
complex1
(Frank)
March 27, 2023, 1:46pm
2689
I’m not really familiar with how to use the data_generator field, but I think this is where your problem lies.
Also because other cards work.
Maybe @Kertz1954 can and is willing to help you further.
complex1
(Frank)
March 27, 2023, 1:48pm
2690
Sorry. Replied to the wrong person.
mhoogenbosch
(Martijn Hoogenbosch)
March 27, 2023, 1:53pm
2691
Hi, yes, the non iOS 15.7 devices do work. The last data generator of @boheme61 does, the example of @complex1 I can’t get working at all.
Unfortunately the following code also results in an empty chart:
return entity.attributes.prices_today.map((entry) =>
{
var date = new Date(entry.time);
return [date, entry.price];
});
mhoogenbosch
(Martijn Hoogenbosch)
March 27, 2023, 1:54pm
2692
I agree, must be something which older versions of iOS just don’t accept. Just don’t get it.
mhoogenbosch:
S 15.7 d
What IOS version do u have problems with ?
Kertz1954
(Kertz1954)
March 27, 2023, 2:04pm
2694
OK, so you now have a data generator that works perfectly well on non iOS 15.7 devices.
I see from one of your posting the data format.
You say this “a lot more”. in it.
Just how many enties are the in total.
Mean while add the following line to your code.
cache: false
and test again.
mhoogenbosch
(Martijn Hoogenbosch)
March 27, 2023, 2:12pm
2695
The iOS which is not working is iOS 15.7.3, latest in the 15 branch.
mhoogenbosch
(Martijn Hoogenbosch)
March 27, 2023, 2:16pm
2696
Indeed, works great on non iOS 15.7 devices.
The entire attribtues:
state_class: measurement
prices_today:
- time: '2023-03-27 00:00:00+02:00'
price: 0.35181
- time: '2023-03-27 01:00:00+02:00'
price: 0.34553
- time: '2023-03-27 02:00:00+02:00'
price: 0.33933
- time: '2023-03-27 03:00:00+02:00'
price: 0.33422
- time: '2023-03-27 04:00:00+02:00'
price: 0.33556
- time: '2023-03-27 05:00:00+02:00'
price: 0.33803
- time: '2023-03-27 06:00:00+02:00'
price: 0.37963
- time: '2023-03-27 07:00:00+02:00'
price: 0.42061
- time: '2023-03-27 08:00:00+02:00'
price: 0.42996
- time: '2023-03-27 09:00:00+02:00'
price: 0.3357
- time: '2023-03-27 10:00:00+02:00'
price: 0.29925
- time: '2023-03-27 11:00:00+02:00'
price: 0.28556
- time: '2023-03-27 12:00:00+02:00'
price: 0.21125
- time: '2023-03-27 13:00:00+02:00'
price: 0.21125
- time: '2023-03-27 14:00:00+02:00'
price: 0.19658
- time: '2023-03-27 15:00:00+02:00'
price: 0.18194
- time: '2023-03-27 16:00:00+02:00'
price: 0.21125
- time: '2023-03-27 17:00:00+02:00'
price: 0.30493
- time: '2023-03-27 18:00:00+02:00'
price: 0.35825
- time: '2023-03-27 19:00:00+02:00'
price: 0.41024
- time: '2023-03-27 20:00:00+02:00'
price: 0.48797
- time: '2023-03-27 21:00:00+02:00'
price: 0.42311
- time: '2023-03-27 22:00:00+02:00'
price: 0.37755
- time: '2023-03-27 23:00:00+02:00'
price: 0.35005
prices_tomorrow:
- time: '2023-03-28 00:00:00+02:00'
price: 0.35752
- time: '2023-03-28 01:00:00+02:00'
price: 0.36425
- time: '2023-03-28 02:00:00+02:00'
price: 0.35781
- time: '2023-03-28 03:00:00+02:00'
price: 0.35195
- time: '2023-03-28 04:00:00+02:00'
price: 0.35093
- time: '2023-03-28 05:00:00+02:00'
price: 0.35879
- time: '2023-03-28 06:00:00+02:00'
price: 0.40165
- time: '2023-03-28 07:00:00+02:00'
price: 0.44561
- time: '2023-03-28 08:00:00+02:00'
price: 0.44517
- time: '2023-03-28 09:00:00+02:00'
price: 0.39457
- time: '2023-03-28 10:00:00+02:00'
price: 0.36393
- time: '2023-03-28 11:00:00+02:00'
price: 0.35018
- time: '2023-03-28 12:00:00+02:00'
price: 0.34493
- time: '2023-03-28 13:00:00+02:00'
price: 0.33844
- time: '2023-03-28 14:00:00+02:00'
price: 0.34302
- time: '2023-03-28 15:00:00+02:00'
price: 0.34935
- time: '2023-03-28 16:00:00+02:00'
price: 0.35193
- time: '2023-03-28 17:00:00+02:00'
price: 0.37024
- time: '2023-03-28 18:00:00+02:00'
price: 0.41165
- time: '2023-03-28 19:00:00+02:00'
price: 0.44695
- time: '2023-03-28 20:00:00+02:00'
price: 0.41028
- time: '2023-03-28 21:00:00+02:00'
price: 0.40452
- time: '2023-03-28 22:00:00+02:00'
price: 0.39428
- time: '2023-03-28 23:00:00+02:00'
price: 0.37288
prices:
- time: '2023-03-27 00:00:00+02:00'
price: 0.35181
- time: '2023-03-27 01:00:00+02:00'
price: 0.34553
- time: '2023-03-27 02:00:00+02:00'
price: 0.33933
- time: '2023-03-27 03:00:00+02:00'
price: 0.33422
- time: '2023-03-27 04:00:00+02:00'
price: 0.33556
- time: '2023-03-27 05:00:00+02:00'
price: 0.33803
- time: '2023-03-27 06:00:00+02:00'
price: 0.37963
- time: '2023-03-27 07:00:00+02:00'
price: 0.42061
- time: '2023-03-27 08:00:00+02:00'
price: 0.42996
- time: '2023-03-27 09:00:00+02:00'
price: 0.3357
- time: '2023-03-27 10:00:00+02:00'
price: 0.29925
- time: '2023-03-27 11:00:00+02:00'
price: 0.28556
- time: '2023-03-27 12:00:00+02:00'
price: 0.21125
- time: '2023-03-27 13:00:00+02:00'
price: 0.21125
- time: '2023-03-27 14:00:00+02:00'
price: 0.19658
- time: '2023-03-27 15:00:00+02:00'
price: 0.18194
- time: '2023-03-27 16:00:00+02:00'
price: 0.21125
- time: '2023-03-27 17:00:00+02:00'
price: 0.30493
- time: '2023-03-27 18:00:00+02:00'
price: 0.35825
- time: '2023-03-27 19:00:00+02:00'
price: 0.41024
- time: '2023-03-27 20:00:00+02:00'
price: 0.48797
- time: '2023-03-27 21:00:00+02:00'
price: 0.42311
- time: '2023-03-27 22:00:00+02:00'
price: 0.37755
- time: '2023-03-27 23:00:00+02:00'
price: 0.35005
- time: '2023-03-28 00:00:00+02:00'
price: 0.35752
- time: '2023-03-28 01:00:00+02:00'
price: 0.36425
- time: '2023-03-28 02:00:00+02:00'
price: 0.35781
- time: '2023-03-28 03:00:00+02:00'
price: 0.35195
- time: '2023-03-28 04:00:00+02:00'
price: 0.35093
- time: '2023-03-28 05:00:00+02:00'
price: 0.35879
- time: '2023-03-28 06:00:00+02:00'
price: 0.40165
- time: '2023-03-28 07:00:00+02:00'
price: 0.44561
- time: '2023-03-28 08:00:00+02:00'
price: 0.44517
- time: '2023-03-28 09:00:00+02:00'
price: 0.39457
- time: '2023-03-28 10:00:00+02:00'
price: 0.36393
- time: '2023-03-28 11:00:00+02:00'
price: 0.35018
- time: '2023-03-28 12:00:00+02:00'
price: 0.34493
- time: '2023-03-28 13:00:00+02:00'
price: 0.33844
- time: '2023-03-28 14:00:00+02:00'
price: 0.34302
- time: '2023-03-28 15:00:00+02:00'
price: 0.34935
- time: '2023-03-28 16:00:00+02:00'
price: 0.35193
- time: '2023-03-28 17:00:00+02:00'
price: 0.37024
- time: '2023-03-28 18:00:00+02:00'
price: 0.41165
- time: '2023-03-28 19:00:00+02:00'
price: 0.44695
- time: '2023-03-28 20:00:00+02:00'
price: 0.41028
- time: '2023-03-28 21:00:00+02:00'
price: 0.40452
- time: '2023-03-28 22:00:00+02:00'
price: 0.39428
- time: '2023-03-28 23:00:00+02:00'
price: 0.37288
unit_of_measurement: €/kWh
attribution: Data provided by ENTSO-e Transparency Platform
device_class: monetary
icon: mdi:currency-eur
friendly_name: Average electricity price today (NextEnergy)
I added the cache, and will check.
Ok, Well i’ve never had iOS, and never even a Latest version of Android
Kertz1954
(Kertz1954)
March 27, 2023, 3:18pm
2698
iPad Air 2
iOS 15.7.3
What is the generation of your iPad Air 2 ?
If it’s below the 4th generation, then it’s no longer supported by the HA iOS Companion App.
End of story if this is the case.
well, maybe for the app, but one could always try a browser window?
otoh, it will become more and more obsolete… pretty quickly
Kertz1954
(Kertz1954)
March 27, 2023, 3:36pm
2700
What a terrifying thought.
That would generate more questions in this community thread, my graph is not working with IE.
Must drop the subject now, only 2 days to go and I have to bring my beta system inline with my live version.
mhoogenbosch
(Martijn Hoogenbosch)
March 27, 2023, 6:47pm
2701
I’ll just settle with this ;-). I managed to fix it by working around it. A different sensor from a different dynamic energy price provider does work.
Thanks all for your effort!
markpurcell
(Mark Purcell)
March 27, 2023, 10:43pm
2702
My Apex Charts change over time, as I’m tracking solar consumption as well as household loads.
I would like to be able to make a 24 hour screen capture video of the changes in the card over a day, maybe taking a snapshot every hour. I have searched but haven’t been able to identify a simple way, short of leaving my desktop running with a screen grabber.
Does anyone have an elegant solution to this problem?
t