Describe the bug
When the time to service is less than a month the API returns days instead of months. In the Home Assistant sensor this is not taken to account and the sensor will for example show 26 months to service when it is 26 days.
To Reproduce:
Connect a Volvo to the integration with less than a month to service.
Expected behavior:
The sensor name in HA is Months to Service. When the time is less than a month expected behavior would be to show 0 months. Other option is to have the sensor name as Time to Service and show months and days as in the API.
Describe the bug When the time to service is less than a month the API returns days instead of months. In the Home Assistant sensor this is not taken to account and the sensor will for example show 26 months to service when it is 26 days.
To Reproduce: Connect a Volvo to the integration with less than a month to service.
Expected behavior: The sensor name in HA is
Months to Service
. When the time is less than a month expected behavior would be to show 0 months. Other option is to have the sensor name asTime to Service
and show months and days as in the API.Version info: Docker container v1.8.12
Logs:
"timeToService" : { "value" : 26, "unit" : "days", "timestamp" : "2023-11-16T06:36:38.426Z" }