Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sensor value for limits #74

Closed
aled2305 opened this issue Mar 8, 2024 · 1 comment · Fixed by #77
Closed

Use sensor value for limits #74

aled2305 opened this issue Mar 8, 2024 · 1 comment · Fixed by #77

Comments

@aled2305
Copy link

aled2305 commented Mar 8, 2024

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?

@aled2305 aled2305 changed the title Use sensor value for limited Use sensor value for limits Mar 8, 2024
@lozzd lozzd closed this as completed in #77 Apr 5, 2024
@alinbalutoiu
Copy link
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants