pySmartHashtag 0.14.2__tar.gz → 0.14.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pysmarthashtag-0.14.2/pySmartHashtag.egg-info → pysmarthashtag-0.14.3}/PKG-INFO +1 -1
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3/pySmartHashtag.egg-info}/PKG-INFO +1 -1
- pysmarthashtag-0.14.3/pySmartHashtag.egg-info/scm_version.json +8 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_charging_states.py +25 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/battery.py +8 -0
- pysmarthashtag-0.14.2/pySmartHashtag.egg-info/scm_version.json +0 -8
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.devcontainer.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.github/copilot-instructions.md +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.github/dependabot.yml +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.github/workflows/python-package.yml +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.github/workflows/python-publish.yml +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.gitignore +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.pre-commit-config.yaml +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.vscode/launch.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/.vscode/settings.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/AUTHORS +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/CODE_OF_CONDUCT.md +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/CONTRIBUTING.md +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/ChangeLog +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/LICENSE +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/README.md +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pySmartHashtag.egg-info/SOURCES.txt +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pySmartHashtag.egg-info/dependency_links.txt +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pySmartHashtag.egg-info/requires.txt +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pySmartHashtag.egg-info/scm_file_list.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pySmartHashtag.egg-info/top_level.txt +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pyproject.toml +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/__init__.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/account.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/api/__init__.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/api/authentication.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/api/client.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/api/log_sanitizer.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/api/ssl_context.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/api/utils.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/cli.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/const.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/control/charging.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/control/climate.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/control/horn_light.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/control/journal.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/control/lock.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/control/telematics.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/control/windows.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/models.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/__init__.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/common.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/conftest.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/Human_and_vehicle_relationship_does_not_exist.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/api_access.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/auth_context.url +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/auth_intermediate.url +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/auth_result.url +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/charging_success.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/climate_success.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/dc_charge_info.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/journal_response.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/journal_toggle_success.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/login_result.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/ota_response.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/soc_80.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/soc_90.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/token_expired.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/trackpoints_response.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_info.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_info2.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_info_dc_charging.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_response.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_result.json +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_account.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_actions.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_authentication_backoff.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_charging.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_charging_limit.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_cli.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_climate_status.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_climate_zaf.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_dc_charge_info.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_dc_charging.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_endpoint_urls.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_horn_light_control.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_journal.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_journal_control.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_journal_pagination.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_lock_control.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_log_sanitizer.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_missing_fields.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_ota_info.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_send_destination.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_ssl_context.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_token_lifecycle.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_tracked_vins.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_trackpoints.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_vehicle_state.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_vin_headers.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_window_control.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/__init__.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/climate.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/journal.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/maintenance.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/position.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/running.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/safety.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/tires.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/trackpoints.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/vehicle.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/vehicle/vehicle_state.py +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/requirements-cli.txt +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/requirements-test.txt +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/requirements.txt +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/run.sh +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/setup.cfg +0 -0
- {pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/setup.py +0 -0
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_charging_states.py
RENAMED
|
@@ -117,3 +117,28 @@ class TestChargerConnectionState:
|
|
|
117
117
|
assert battery is not None
|
|
118
118
|
assert battery.charger_connection_status is None
|
|
119
119
|
assert battery.charger_connection_state is None
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class TestIsChargerConnected:
|
|
123
|
+
"""The plug state must not depend on the car currently drawing power (issue #441)."""
|
|
124
|
+
|
|
125
|
+
def test_plugged_not_charging(self):
|
|
126
|
+
"""Plugged in with chargerState NOT_CHARGING still counts as connected."""
|
|
127
|
+
battery = Battery.from_vehicle_data(create_vehicle_data("0", "2"))
|
|
128
|
+
|
|
129
|
+
assert battery is not None
|
|
130
|
+
assert battery.is_charger_connected is True
|
|
131
|
+
|
|
132
|
+
def test_not_connected(self):
|
|
133
|
+
"""Unplugged stays disconnected."""
|
|
134
|
+
battery = Battery.from_vehicle_data(create_vehicle_data("0", "0"))
|
|
135
|
+
|
|
136
|
+
assert battery is not None
|
|
137
|
+
assert battery.is_charger_connected is False
|
|
138
|
+
|
|
139
|
+
def test_unknown_connection_code_does_not_connect(self):
|
|
140
|
+
"""Codes the API adds later do not flip the plug state on their own."""
|
|
141
|
+
battery = Battery.from_vehicle_data(create_vehicle_data("0", "42"))
|
|
142
|
+
|
|
143
|
+
assert battery is not None
|
|
144
|
+
assert battery.is_charger_connected is False
|
|
@@ -304,6 +304,14 @@ class Battery(VehicleDataBase):
|
|
|
304
304
|
if charger_conn is not None:
|
|
305
305
|
retval["charger_connection_status"] = charger_conn
|
|
306
306
|
retval["charger_connection_state"] = charger_connection_state_name(charger_conn)
|
|
307
|
+
# chargerState reports NOT_CHARGING for a plugged-in car that is not drawing power,
|
|
308
|
+
# so the connection code is the only reliable plug signal. See SmartHashtag issue #441.
|
|
309
|
+
if charger_conn in (
|
|
310
|
+
ChargerConnectionState.DC_CONNECTED,
|
|
311
|
+
ChargerConnectionState.PLUGGED_NOT_CHARGING,
|
|
312
|
+
ChargerConnectionState.CHARGING,
|
|
313
|
+
):
|
|
314
|
+
retval["is_charger_connected"] = True
|
|
307
315
|
|
|
308
316
|
charging_status = retval.get("charging_status")
|
|
309
317
|
battery_percent = retval.get("remaining_battery_percent")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pySmartHashtag.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/auth_context.url
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/auth_intermediate.url
RENAMED
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/charging_success.json
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/climate_success.json
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/dc_charge_info.json
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/journal_response.json
RENAMED
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/login_result.json
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/ota_response.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/token_expired.json
RENAMED
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_info.json
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_info2.json
RENAMED
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_response.json
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/replys/vehicle_result.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_authentication_backoff.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_horn_light_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_journal_control.py
RENAMED
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_journal_pagination.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_send_destination.py
RENAMED
|
File without changes
|
|
File without changes
|
{pysmarthashtag-0.14.2 → pysmarthashtag-0.14.3}/pysmarthashtag/tests/test_token_lifecycle.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|