robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
303 stars 61 forks source link

[BUG] Departure timers have wrong times #585

Closed oskari closed 4 months ago

oskari commented 4 months ago

Before you post a new issue - you must first check the following (and check the boxes with an "X" below)

Environment

Describe the bug

Recently re-added feature of departure timers show wrong start times in HA compared to what is set in app or car. Doesn't seem like a timezone issue either.

Screenshots

image

image

Debug information - all JSON responses from logfile

I tried to enable the debugging but I was unable to get any logs, let me know if they're absolutely needed and I'll take an another shot on getting them enabled.

stickpin commented 4 months ago

Hi @oskari,

I've checked with multiple vehicles on my side and I am not able to reproduce the issue. Please enable debug logging in your HA configuration.yaml and share a full log:

logger:
  default: info
  logs:
    volkswagencarnet: debug
    custom_components.volkswagencarnet: debug

Another option you share your credentials with me via email (stickpins at gmail com) and I will check it myself.

oskari commented 4 months ago

Is this enough for debugging or do you need more or other parts of the logs? To be clear, all the departure timers start times in HA are wrong, first one is 07.09, second is 7.59 and the third one is 7.39 while the real times are 5.30 (7.30), 6.20 (8.20) and 6.00 (8.00)

 'departureProfiles': {
    'departureProfilesStatus': {
      'value': {
        'carCapturedTimestamp': datetime.datetime(2024, 2, 13, 6, 12, 23, tzinfo = datetime.timezone.utc),
        'minSOC_pct': 90,
        'timers': [{
          'id': 1,
          'enabled': False,
          'recurringTimer': {
            'startTime': '05:30',
            'recurringOn': {
              'mondays': True,
              'tuesdays': True,
              'wednesdays': True,
              'thursdays': True,
              'fridays': True,
              'saturdays': False,
              'sundays': False
            }
          },
          'profileIDs': [1]
        }, {
          'id': 2,
          'enabled': True,
          'recurringTimer': {
            'startTime': '06:20',
            'recurringOn': {
              'mondays': True,
              'tuesdays': True,
              'wednesdays': True,
              'thursdays': True,
              'fridays': True,
              'saturdays': False,
              'sundays': False
            }
          },
          'profileIDs': [1]
        }, {
          'id': 3,
          'enabled': False,
          'recurringTimer': {
            'startTime': '06:00',
            'recurringOn': {
              'mondays': True,
              'tuesdays': True,
              'wednesdays': True,
              'thursdays': True,
              'fridays': True,
              'saturdays': False,
              'sundays': False
            }
          },
          'profileIDs': [3]
        }],
        'profiles': [{
          'id': 1,
          'name': 'Koti',
          'charging': True,
          'climatisation': True,
          'targetSOC_pct': 80,
          'maxChargeCurrentAC': 32,
          'preferredChargingTimes': [{
            'id': 1,
            'enabled': False,
            'startTime': '00:00',
            'endTime': '00:00'
          }]
        }, {
          'id': 2,
          'name': 'Koti',
          'charging': True,
          'climatisation': False,
          'targetSOC_pct': 40,
          'maxChargeCurrentAC': 5,
          'preferredChargingTimes': [{
            'id': 1,
            'enabled': True,
            'startTime': '00:00',
            'endTime': '04:00'
          }]
        }, {
          'id': 3,
          'name': 'Työ',
          'charging': False,
          'climatisation': True,
          'targetSOC_pct': 100,
          'maxChargeCurrentAC': 16,
          'preferredChargingTimes': [{
            'id': 1,
            'enabled': False,
            'startTime': '00:00',
            'endTime': '00:00'
          }]
        }]
      }
    }
  },

edit. I live in Finland, so the timezone is GMT+2 on my previous screenshot from the app

stickpin commented 4 months ago

There is nothing wrong with your timers data. I have no explanation for this behavior. Try to reinstall the integration, and see if it solves the issue. If not, then the only thing I can do is to check it myself if you send me your credentials.