markgdev / home-assistant_OctopusAgile

Octopus Agile custom component for Home Assistant
Apache License 2.0
86 stars 33 forks source link

British Summer Time and current rate #67

Closed notJustageek closed 3 years ago

notJustageek commented 3 years ago

Describe the bug I'm not sure if this is a bug with this module or something within home assistant more generally. Since the clocks changed this weekend, the current rate seems to be an hour out from what the rate should be for a given point in the day.

To Reproduce Steps to reproduce the behavior:

  1. Set the timezone to London
  2. Check the sensor.octopus_agile_current_rate sensor
  3. Look up the rate for the current time in octopusagile.rates
  4. The current rate will be for the previous hour

Expected behavior Expectation is that the rate for a given time will match that timecode in the octopusagile.rates attributes.

Desktop (please complete the following information):

B-Hartley commented 3 years ago

Mine seem ok. Is the time on your server set correctly? Does the server have it's GMT time correct? and timezone and DST settings correct?

notJustageek commented 3 years ago

Sorry, just looked again and realised the times in octopusagile.rates are UTC encoded rather than local time. Using the rates card it looks correct and the current rate matches the octopus website.