G-Two / homeassistant-subaru

Subaru STARLINK custom component for Home Assistant.
Apache License 2.0
54 stars 6 forks source link

Pass Remote Start Failure to UI notification and in logs #4

Closed stboch closed 3 years ago

stboch commented 3 years ago

Example of remote start failure reason:

2020-12-08 13:00:27 INFO (MainThread) [subarulink.controller] Subaru API reports remote service request is in progress: 4S4_1607450418631_22_@NGTP
2020-12-08 13:00:29 DEBUG (MainThread) [subarulink.connection] GET: https://mobileapi.prod.subarucs.com/g2v17/service/g2/remoteService/status.json
2020-12-08 13:00:29 DEBUG (MainThread) [subarulink.controller] {'data': {'cancelled': False,
          'errorCode': 'NegativeAcknowledge:doorNotClosed',
          'remoteServiceState': 'finished',
          'remoteServiceType': 'engineStart',
          'result': None,
          'serviceRequestId': '4S4_1607450418631_22_@NGTP',
          'subState': None,
          'success': False,
          'updateTime': 1607450428000,
          'vin': '4S4'},
 'dataName': 'remoteServiceStatus',
 'errorCode': None,
 'success': True}
2020-12-08 13:00:29 ERROR (MainThread) [subarulink.controller] Remote service request completed but failed: 4S4_1607450418631_22_@NGTP Error: NegativeAcknowledge:doorNotClosed
G-Two commented 3 years ago

6 adds errorCode to HA UI notification.

G-Two commented 3 years ago

UI and HA logs now show errors that occur during services.