lozzd / octopus-energy-rates-card

This lovelace card for Home Assistant displays the Octopus Energy rate prices per each 30 minute slot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read properties of undefined (reading 'attributes')

Mikescotland opened this issue · comments

After upgrading both, integration and the card, enabling events I've got this error.
Here's yaml

type: custom:octopus-energy-rates-card
cols: 2
currentEntity: event.octopus_energy_electricity_(xxxx)current_day_rates
futureEntity: event.octopus_energy_electricity
(xxx)_next_day_rates
showday: true
showpast: false
hour12: false
highlimit: 28.1
unitstr: p
roundUnits: 1
title: 🔌 Rates (normal = 28.3p)

Github slightly formatted the underline in the entity names, in original it's correct.

same

type: custom:octopus-energy-rates-card
currentEntity: sensor.octopus_energy_electricity_xxxxxx_xxxxx_current_rate
cols: 2
showday: true
showpast: false

same

type: custom:octopus-energy-rates-card
currentEntity: sensor.octopus_energy_electricity_xxxxxx_xxxxx_current_rate
cols: 2
showday: true
showpast: false

Switch entity to event.xxx as per readme (activate them if not active)

do not have such entities,

Screenshot 2023-11-25 at 13 13 06

Did you upgrade the octopus integration (not card) to version 0.9.x? Please read the readme, there is clear instruction.

My case is different as I have these events and card is configured. Still throws an error

Did you upgrade the octopus integration (not card) to version 0.9.x? Please read the readme, there is clear instruction.

My case is different as I have these events and card is configured. Still throws an error

yes been running 9.0.x for a while now.

Have you enabled those event entities? That message is usually shown when they're not enabled.

On Sat, 25 Nov 2023 at 13:15, Andrew Blackburn @.> wrote: Did you upgrade the octopus integration (not card) to version 0.9.x? Please read the readme, there is clear instruction. My case is different as I have these events and card is configured. Still throws an error yes been running 9.0.x for a while now. — Reply to this email directly, view it on GitHub <#36 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ3KT4IJ3IJQEBRUORUABLDYGHVOTAVCNFSM6AAAAAA72CFPTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGMYDKMRXGU . You are receiving this because you are subscribed to this thread.Message ID: @.>
Screenshot_20231125_133629

I suspect the issue is the current version of the card expects past/future entities to be provided even though it doesn't require them. I've just submitted a fix #37 to ensure they are optional. To fix in the mean time you can just provide them in the config.

I suspect the issue is the current version of the card expects past/future entities to be provided even though it doesn't require them. I've just submitted a fix #37 to ensure they are optional. To fix in the mean time you can just provide them in the config.

You're a life saver. Didn't cross my mind I have to provide all three events as the documentation table says optional for previous and next.
Now working. Thank you very much!

So, in order to have it working you need to specify all three, currentEntity, pastEntity and futureEntity - info for people struggling with it.

#37 merged, will cut a release