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

Fix for warnings #36

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
include =
custom_components/*
tests/*
[report]
include =
custom_components/*
tests/*
1 change: 1 addition & 0 deletions custom_components/bouncie/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(
"""Initialize car location entity."""
self._vehicle_info = vehicle_info
self._attr_has_entity_name = True
self._attr_name = None
self._attr_unique_id = slugify(f'{self._vehicle_info["nickName"]} tracker')
self._attr_device_info = DeviceInfo(
identifiers={(const.DOMAIN, self._vehicle_info["vin"])},
Expand Down
1 change: 1 addition & 0 deletions custom_components/bouncie/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def update_car_info_attributes(vehicle_info):
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.SPEED,
suggested_unit_of_measurement="mph",
native_unit_of_measurement="mph",
value_fn=lambda vehicle_info: int(vehicle_info["stats"]["speed"]),
extra_attrs_fn=update_car_stats_attributes,
),
Expand Down
2 changes: 1 addition & 1 deletion run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo "Linting ..." &&
# echo "Type checking ..." &&
# mypy custom_components/ &&
echo "Testing ..." &&
pytest --cov --cov-report html --cov-report xml --alluredir=./allure-results
pytest --cov --cov-report html --cov-report xml --alluredir=./allure-results --cov-config=Coveragerc --cov-fail-under=100
echo "Reporting ..." &&
allure generate --clean
echo "Done."