Closed jimmyburnworld closed 1 year ago
Same problem here, since the clocks went forward on March 26th, the Octopus smart charging slots have been an hour earlier than reported in the Octopus app. HA has the correct timezone and other apps showing time correctly.
This displays the correct local time: {{ as_timestamp(utcnow()) | timestamp_custom("%I:%M:%S %p %b/%d/%Y") }}
Looks like the timings are still running on GMT while UK is on BST.
I am not seeing this issue. I have confirmed my time zones (the above template {{ as_timestamp(utcnow()) | timestamp_custom("%I:%M:%S %p %b/%d/%Y") }}
outputs correct local time)
@martindell Your one could be explained by wrong timezone handling of the attributes in your custom lovelace view. Please show the raw sensor attributes you're using.
You know, I think I made a mistake - I’m looking at the entity in Europe, while the HA server is in the UK. The times were adjusted for European time in HA. Looking at it in the UK, the timings are correct.
My bad. Sorry.
Thanks for looking @megakid I'm not too sure what you mean about 'raw sensor attributes'. Can you point me in the right direction please? I can't double-check the standard integration view at the moment - car is at 100% SOC
Thanks for looking @megakid I'm not too sure what you mean about 'raw sensor attributes'. Can you point me in the right direction please? I can't double-check the standard integration view at the moment - car is at 100% SOC
I can only screenshot my phone at the moment but if you goto the Octopus Intelligent Slot
and expand the attributes. You'll see the raw data. I suspect that whatever you copied or setup to display these slots in a nice way (as per your screenshot above) is misinterpreting the time zone and it has only come to light when your local time diverged from UTC.
d'oh - of course, sorry - here's my lovelace
{% if (state_attr('binary_sensor.octopus_intelligent_slot', 'plannedDispatches') | length > 0) %} {% for dispatch in state_attr('binary_sensor.octopus_intelligent_slot', 'plannedDispatches') %} ⏰{{': '}} {{ as_datetime(dispatch.startDtUtc).strftime('%H:%M') }} to {{ as_datetime(dispatch.endDtUtc).strftime('%H:%M') }} {% endfor %} {% else %} ⏰ None {% endif %}
I grabbed it from this thread: https://community.home-assistant.io/t/octopus-energy-intelligent-tariff/418680/97 and duncansmart has now amended the time to include 'as_local' to fix this issue
{% if (state_attr('binary_sensor.octopus_intelligent_slot', 'plannedDispatches') | length > 0) %} {% for dispatch in state_attr('binary_sensor.octopus_intelligent_slot', 'plannedDispatches') -%} ⏰ {{ (dispatch.startDtUtc | as_datetime | as_local).strftime('%H:%M') }} to {{ (dispatch.endDtUtc | as_datetime | as_local).strftime('%H:%M') }} {%- endfor %} {%- else -%} ⏰ None {%- endif %}
Sorry for creating noise!
Hello,
I’ve been monitoring the Intelligent sots and comparing them with my bill and they don’t seem to be reliable enough to use for triggering battery charges. Is this something with my setup? An example would be the 26th Feb, see attached photos.
My bill shows an off peak slot 06:30-07:30 however homeassistant has it at 07:20-08:00