Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maximum value of 1 for current_fuel_percent #142

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

richfab
Copy link
Contributor

@richfab richfab commented Oct 10, 2024

Fixes #140

Context

The definition of vehicles[].current_fuel_percent in the spec is:

This value represents the current percentage, expressed from 0 to 1, of fuel or battery power remaining in the vehicle.

Problem

The JSON Schema defines the minium value of 0 but not the maximum value. In consequence, feed providers don't receive appropriate feedback when the value is set to more than 1.

Solution

This PR adds the maximum value of 1 for vehicles[].current_fuel_percent in vehicle_status.json.

Copy link
Contributor

@isabelle-dr isabelle-dr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@richfab richfab merged commit 9c6e202 into master Oct 10, 2024
1 check passed
@richfab richfab deleted the maximum-value-for-current_fuel_percent branch October 10, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing maximum value (1) for current_fuel_percent
2 participants