Skip to content

Last "End" in "prices"-attributes erroneous #253

@F-HALD

Description

@F-HALD

Describe the issue

Great integration - I love it.

I have a few experiences/bugs to share.

I experience that for "binary_sensor.stromligning_tomorrow_spotprice_vat"-attribute, the final "end" is wrong.
Here is an example:

  • price: 0.989764
    start: "2026-02-24T21:00:00+01:00"
    end: "2026-02-24T22:00:00+01:00"
  • price: 0.905462
    start: "2026-02-24T22:00:00+01:00"
    end: "2026-02-24T23:00:00+01:00"
  • price: 0.798557
    start: "2026-02-24T23:00:00+01:00"
    end: "2026-02-24T00:00:00+01:00"

The same problem occurs for the "sensor.stromligning_forecasts_vat". The final "end" is wrong.
Here is an example:

  • price: 1.476881
    start: "2026-03-02T21:00:00+01:00"
    end: "2026-03-02T22:00:00+01:00"
  • price: 1.353816
    start: "2026-03-02T22:00:00+01:00"
    end: "2026-03-02T23:00:00+01:00"
  • price: 1.228218
    start: "2026-03-02T23:00:00+01:00"
    end: "2026-02-24T00:00:00+01:00"

I also experience that at midnight where the "prices"-attribute of "binary_sensor.stromligning_tomorrow_spotprice_vat" is moved to the "prices"-attribute of "sensor.stromligning_current_price_vat" and in this case the "prices"-attribute of "binary_sensor.stromligning_tomorrow_spotprice_vat" is not completely cleared. The last "end" still remains and that has confused my usage of the integration.

Is anyone else experiencing the same?

What version of Home Assistant Core has the issue?

core-2026.2.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Anything in the logs that might be useful for us?

Logger: homeassistant.components.script.1702507285062
Source: helpers/script.py:2098
integration: Script (documentation, issues)
First occurred: February 22, 2026 at 12:02:04 AM (2 occurrences)
Last logged: 12:02:36 AM

Electricity cheapest period: Error rendering variables: UndefinedError: 'dict object' has no attribute 'start'

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions