lozzd/octopus-energy-rates-card

Use sensor value for limits

Closed this issue · 1 comments

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?

Hey @aled2305, just to update here, you can now use:

mediumlimit: sensor.today_agile_average_electric_rate

To achieve what you're looking for (with the latest version).