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

Target state sensor with -02:00:00 offset only fired 2 minutes early #829

Open
2 tasks done
billmichell opened this issue Apr 8, 2024 · 2 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working stale The issue has not had any activity for a while

Comments

@billmichell
Copy link

Describe the bug

My “charge the battery for 2 hours before the peak rates” sensor only fired at 15:58:00, only 2 minutes before the peak rate.

I thought I saw there is a BST bug since fixed, but this only caused a 1 hour error.

Left me without enough battery to cover the 3 hour peak period.

Reproduction steps

name: expensive_import_upcoming
hours: 3
type: Continuous
mpan: 200000XXXXXXX
rolling_target: false
last_rates: false
target_invert_target_rates: true
start_time: 23:00
end_time: 23:00
offset: -2:00:00
kind: target_rate
account_id: A-XXXXXXXX
is_target_export: false
rates_incomplete: false
target_times:

target_times_last_evaluated: 2024-04-08T18:30:15.466869+00:00
overall_average_cost: 0.31762
overall_min_cost: 0.278145
overall_max_cost: 0.34125
current_duration_in_hours: 0
current_average_cost: null
current_min_cost: null
current_max_cost: null
next_time: null
next_duration_in_hours: 0
next_average_cost: null
next_min_cost: null
next_max_cost: null
last_evaluated: 2024-04-08T18:53:15.466489+00:00
device_class: power
icon: mdi:camera-timer
friendly_name: Expensive import hours coming soon

Expected behaviour

On at 14:00:00, 2 hours prior to peak rate

Tariff Code

E-1R-AGILE-23-12-06-H

Integration Version

10.2.0

Home Assistant Version

core_2024.4.1

Fresh Install?

After upgrading

Home Assistant Logs

Not sure what would be helpful

Confirmation

  • I confirm that I cannot find my solution within the documentation
  • I confirm that I cannot find my solution within the FAQ
@billmichell billmichell added the bug Something isn't working label Apr 8, 2024
@BottlecapDave
Copy link
Owner

Hello, sorry that you're encountered this issue.

The integration should be re-evaluating every minute based on callbacks from HA. If HA fails to update the underlying data or call the entity, then the state won't be evaluated and therefore won't change.

Had you done any restarts around the time it should have gone off? Do you know what the target rates were before, during and after firing?

If you're in debug mode, logs between 14:00 and 16:00 of the offending day might help give a clue.

Copy link
Contributor

This issue has become stale because it has been open for 30 days with no activity. If you still think it's an issue, please respond soon.

@github-actions github-actions bot added the stale The issue has not had any activity for a while label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale The issue has not had any activity for a while
Projects
None yet
Development

No branches or pull requests

2 participants