Coder Social home page Coder Social logo

lozzd / octopus-energy-rates-card Goto Github PK

View Code? Open in Web Editor NEW
56.0 56.0 21.0 528 KB

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

License: MIT License

JavaScript 100.00%
electricity energy hacs home-assistant homeassistant lovelace octopus octopus-energy octopus-energy-agile octopusenergy rates

octopus-energy-rates-card's People

Contributors

alfwro13 avatar alinbalutoiu avatar corvus2606 avatar igloo32 avatar jamesog avatar lozzd avatar netmindz avatar reedy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

octopus-energy-rates-card's Issues

Midnight as 0 instead of 24

Hey

Thanks for developing and maintaining the card, I've just installed it as I'm getting on the Octopus Agile tariff but there is one thing that bothers me about it.

I was wondering if you could implement a toggle to display midnight as hour 0 instead of 24?
I don't know if it's just me, but 24 is an odd hour and just doesn't sound right, standard timestamps are always 0 hour based and so is the source of this sensor as shown below so it would make sense to have it display the time in the same way.

- from: '2023-03-11T00:00:00+00:00'
  to: '2023-03-11T00:30:00+00:00'
  rate: 34.27914

Thanks

Possibility to support variables?

Would it be possible to support variables? ie

entity: sensor.octopus_energy_electricity_num_num_current_rate
type: custom:octopus-energy-rates-card
cols: 2
showday: true
showpast: false
mediumlimit: {{states('sensor.agile_avg_rate')}}

Would be a great addition.

thank you

You need to define an entity??

Hi there,
Since the update, my Card doesn't show the rate anymore, I've tried the event entity but still failed....not sure what I'm doing wrong, please help. thanks

image

Not showing next day pricing

Using octopus-energy-rates-card v0.41 and the latest version of the Octopus Energy Integration I'm unable to see the next days prices (today's half hourly prices are been shown).

event.octopus_energy_electricity_19e50XXXXXX_14193084XXXXX_next_day_rates is enabled and populated.

my yaml for the card is as follows:

type: custom:octopus-energy-rates-card
currentEntity: event.octopus_energy_electricity_19e50XXXXX_14193084XXXXX_current_day_rates
futureEntity: event.octopus_energy_electricity_19e50XXXXX_14193084XXXXX_next_day_rates
targetTimesEntity: binary_sensor.octopus_energy_target_washing_machine_target
cols: 6
hour12: false
showday: true
showpast: false
title: Electric Price
unitstr: p
lowlimit: 7
mediumlimit: 20
highlimit: 27
roundUnits: 2
cheapest: true
multiplier: 100

Any ideas?
Many thanks

targetTimesEntities works with Chrome but not Edge

Microsoft Edge Version 121.0.2277.128 (Official build) (64-bit) Windows 11 23H2 Feb 24 CU shows the cheapest 30 minute sections with navy blue when using targetTimesEntity but if I use targetTimesEntities there is no highlighting. The same code:
targetTimesEntities:
binary_sensor.octopus_energy_target_powerwall:
backgroundColour: navy
prefix: 🔋
shows correctly in Google Chrome
image

but Edge shows
image

Also shows correctly via HA Companion App on iOS

Use sensor value for limits

Hi, I am looking for a way to dynamically change the low, medium and high limited.

I would like the medium to be set to each day's average cost, with high being set to the current price cap.

I have both values available as sensors but I'm not sure how to implement these, if indeed it's possible at all?

I have tried the following with no success

type: custom:octopus-energy-rates-card
currentEntity: event.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_current_day_rates
cols: 2
hour12: false
showday: true
showpast: false
title: Octopus Import
unitstr: p
lowlimit: 10
mediumlimit: {{states('sensor.today_agile_average_electric_rate')}}
highlimit: 28
roundUnits: 2
cheapest: true
multiplier: 100

and

type: custom:octopus-energy-rates-card
currentEntity: event.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_current_day_rates
cols: 2
hour12: false
showday: true
showpast: false
title: Octopus Import
unitstr: p
lowlimit: 10
mediumlimit: sensor.today_agile_average_electric_rate
highlimit: 28
roundUnits: 2
cheapest: true
multiplier: 100

The current value of {{states('input_number.current_electric_cap')}} is 28.62 and I have also tried {{states('input_number.current_electric_cap') | int}}

Is there anyway of achieving what I'm trying to do?

Feature request: Allow the threshold for Blue to be configurable

Hi,

I'm loving this card ane being able to display the rates and define my own thresholds for colours.
Would it be possible please, to allow the Blue rate to be configurable as well?
It's currently set to 0 but I'd like to increase it so, that when Electricity is cheaper than Gas, it turns blue.
Many thanks.

Stopped working with bottlecapdaves v9.1 and v0.4.1

image

I get a 'need to define entity' error. I've:

  • rebooted,
  • re-edited the entity line, removed it and re-added it
  • double checked the entity still exists and has a value. It does

I'm at a loss. Any hints anyone?

Advanced Configuration Options help

I Need some guidance on how to complete a 'Advanced Configuration' options in the yaml file .

  1. The option to specify backgroundColour. Is there a set of values we must select from for this ? If so what are they.
  2. The emoji prefixs. Where have these come from, how do we enter them into the yaml?

Sorry if these are noddy questions,

More than one targetTimesEntity

Hi, Is it possible to add more than one targetTimesEntity to turn blue? Or is there a way to combine 2 (or more) targetTimesEntity into one entity for the card?

Support for different time periods

The card is great, however for those on Octopus Tracker tariff the current rate changes only once a day (at least for those without Home mini) - it would be great to be able to change half hourly updates to hourly / daily through variable

Support for Octopus target sensors

Any chance of this card being adapted to use the time/rate information in the attributes of one or more target sensors? If it could merge several target sensors together that would be even better.

It would be a great way to visualise what the target sensors are actually doing.

Also related question: Allow target sensors as an optional argument and use them to colour the time slots.

showunits: false not being honoured

The below YAML does not results in a display without units.

entity: sensor.octopus_energy_electricity_XXX_current_rate
type: custom:octopus-energy-rates-card
cols: 2
showday: false
showpast: false
showunits: false
title: Upcoming Rates
highlimit: 33
mediumlimit: 22

No Rates Assigned

HI, I've installed your card tonight after running BottleCapDaves Octopus integration for a few days. Ive set up a custom dashboard with your card and an entity list of the Octopus sensors. But the energy rates card just shows no rates assigned, even though I copied the sensor id directly from the card below it which is showing data. Maybe im missing something. Screenshot attached.

I'm new to HA, so haven't had a chance to find all the logs, but nothing appears to be appearing in the main log.
I've attached an image so you can see.
Energy-2-–-Home-Assistant

Feature request - multiple target sets

Would it be possible to allow multiple target sets to be highlighted by this card? I current have three which I use. One from 00:00 to 06:00, one from 12:00 to 16:00 and one from 16:00 to 16:00.

Cannot read properties of undefined (reading 'attributes')

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.

Missing 11pm-00am slot on DST

During Daylight Saving Time, the card only shows rates until 11PM. That's because, being the Octopus Integration rates published in UTC, you need to fetch one hour from tomorrow's rates in order to fill today's 11PM-00AM slot.
image

Graph of the rates

Is there a chance we can have the rates as a graph option. Say a config option, list or graph. WOuld be awesome

Stopped working following update

Unsure whether it is my config but this has stopped working after the latest update of HA Core and the latest version of this card. ‘There are no rates assigned to that entity’

Not showing any rates

Since enabling my octopus mini this card is not showing any agile rates. No sure whether the mini is just coincidence.

I'm not getting it, is it me! - It was me

Been using HA for years and added the BottleTopDave HACE integration and moved onto Octopus Agile a few days ago.
I've installed the rate card and used the sample yaml as per below.
But still I get the red error frame, what am I missing?

HA Current version; HACS Current version, Octopus Energy Current version

Screenshot:
image
yaml:
type: custom:octopus-energy-rates-card
currentEntity: event.octopus_energy_electricity_21l37XXXX_1100050XXXX_current_rate
cols: 2
hour12: false
showday: true
showpast: false
title: Octopus Import
unitstr: p
lowlimit: 15
mediumlimit: 20
highlimit: 30
roundUnits: 2
cheapest: true
multiplier: 100

States screenshot:
image

Installed and Working

I have installed via HACs as described and all is working. Thankyou! (not an issue but no where else to provide feedback)

Feature Request - Make Rate Limits Runtime Changeable

The rate limits can currently only be set, hardcoded, whilst editing the dashboard.

Would be great if they could be also have the ability to be set by an entity value. For example, I trigger charging my batteries based on an input number which specifies the rate at which to start or stop charging. If I could use that value as a rate limit (likely lowlimit or midlimit), I would be able to see the rate card coloured based in whether my batteries would charge or not within each time period. As I change the input rate, the rate card would dynamically change, giving me quick visual feedback of how many 30 mins slots I would be charging in.

Getting "state is undefined" updating the custom entity to match what is here

I keep getting state is undefined - what should I assign to state? If I add line like state: 0 then error goes away but still does not display the card information

I have used, where X&Y is the value shown under entities for current_rate

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

Feature Request: Make more lightweight as causing wall panel tablet to lag

Love this card. However on my Lenovo Tab K10 wall panel tablet using Fully Kiosk, this card (only this card) causes the tablet to really lag when in use. As soon as I remove this card from the UI, the tablet goes back to normal operation.

This might be a silly request, but as I've narrowed it down to this card being he culprit - would be great to see to see if this card could use less resources?

Title is not visible

Thanks for this card. One small issue is that the title doesn't appear to be working for me.

type: custom:octopus-energy-rates-card
title: Agile Export Rates
entity: sensor.octopus_energy_electricity_21l4374621_2200043442484_export_current_rate
cols: 2
showday: true
showpast: true
exportrates: true

Screenshot from 2023-04-04 13-32-49

Doesn't seem like anything I can do can make it appear. Maybe there's something wrong with my setup elsewhere, but I'm not using any themes or anything.

Version: 0.1.3
HA Version: 2023.3.6

Possible feature?

Would be great if you could keep the CURRENT rate shown with a highlighted border perhaps?
Maybe allow a ROWS config as well as COLS to show next 1/2/5/10 rates etc?

You need to define an entity

I get this error then adding the card with the following YAML:

type: custom:octopus-energy-rates-card
entity: event.octopus_energy_electricity_20e002xxxx_164000006xxxx_current_day_rates
cols: 2
showday: true
showpast: false

Can anyone assist ?

Export Rates Colours

Thank you for converting this card, its working well for Import Prices on Agile.

Would it be possible to have an inverted colour scheme for Export Agile rates?
I.e. Red When low, Orange when Average and Green when High (Blue when greater than import cost or above a limit of say 50p)

I have added the card to my export MPAN and it does work as expected but the colours are the only thing that could be tweaked if its reasonably trivial.

Thanks again!

Export

No rates on Octopus import Sensor after update to - Octopus API and Octopus Energy Integration

Hi, just to say first of all, I love the rates card. Its great to have on in HA. So many thanks.

I think it might have stopped working after an update to Bottle cap Dave's integration, that I think was forced by the Octopus API update?

Lovelace custom card - v0.1.4

Home Assistant Octopus Energy - v8.0.0

It all looks good I think?

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

image

image

Many thanks in advance for any info.

Octopus energy update

image
It seems that on the latest octopus update they have changed the sensor for rates to an event. For me I can no longer get the card to load.

Deprecation of attributes - no longer works with 9.0.0+

Hello. I just wanted to inform you that I've made the attributes that this card uses deprecated, which will be removed in the next major version (post november 6th).

I suggest this card is adapted to take a collection of entities, which the card then merges the rate data for?

Feature request - only show targetTimeEntity slots.

I have created a couple of intermittent target time entities, one for a 3 hour period and one for a 4 hour period. Rather than show all slots with the cheapest shown in blue, would it be possible to only show the range of chosen slots.

So this:
Screenshot_20231204_092735_Home Assistant

rather than this:

Screenshot_20231204_092735_Home Assistant

Hope that makes sense thanks.

Flux

Hello! I'm on Flux rather than Agile, but it'd still be cool for the card to show the more simple rates... is that easy? :)
I'm not sure on how to go about doing that. So far I have this:

entity: sensor.octopus_energy_electricity_**_current_rate
type: custom:octopus-energy-rates-card
cols: 1
showday: false
showpast: false
title: Octopus Flux
hour12: false

Which gets me the data etc... but as Flux time periods aren't every 30 mins I don't need all the time slots showing... is that a possibility to change?

Cheap 02:00 - 05:00
Expensive 16:00 - 19:00
Normal All other times

Thanks!

Feature request: selectable slots

Hi! I have this wild idea of using your card to select the slots during which I want my inverter to charge the battery. In order to do that, your card would allow users to select slots by simply tapping on them, and then it would issue selected_slot_on and selected_slot_off events respectively at the beginning and at the end of each selected slot, which I can then use to build a trigger for an automation.

I'm new to all this, so forgive me if none of it makes sense, but if it does it would be really useful - at least until I can figure out how to select the slots automatically. And even then. some manual selection would always be welcome.

What do you think?

Thanks! :-)

not working even with current on bottlecapdaves v9.1 and v0.4.1

I'm beaten... using latest version bottlecapdaves with 0.41 and still getting "You need to define an entity"

events are activated and I can see the attributes data with dates/times and inc_vat prices etc..

Any ideas?

type: custom:octopus-energy-rates-card
currentEntity: event.octopus_energy_electricity_z18q1XXX_190002404XXXX_current_day_rates
futureEntity: event.octopus_energy_electricity_z18q1XXXX_190002404XXXX_next_day_rates
cols: 3
hour12: false
showday: false
showpast: false
title: Octopus Import - p/kWh
unitstr: ''
lowlimit: 6
mediumlimit: 15
highlimit: 27
cheapest: true
multiplier: 100

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.