From e26702960b053e4ac951014dcb5f1c53a868f3e6 Mon Sep 17 00:00:00 2001 From: Hudson Brendon Date: Sun, 10 Sep 2023 05:54:50 +0000 Subject: [PATCH] fix: transtation docstrings --- .vscode/settings.json | 6 ++++++ custom_components/drivvo/manifest.json | 2 +- custom_components/drivvo/sensor.py | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d99f2f3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "python.formatting.provider": "none" +} \ No newline at end of file diff --git a/custom_components/drivvo/manifest.json b/custom_components/drivvo/manifest.json index b6f0555..29dfb61 100644 --- a/custom_components/drivvo/manifest.json +++ b/custom_components/drivvo/manifest.json @@ -10,5 +10,5 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/hudsonbrendon/sensor.drivvo/issues", "requirements": [], - "version": "1.0.7" + "version": "1.0.9" } \ No newline at end of file diff --git a/custom_components/drivvo/sensor.py b/custom_components/drivvo/sensor.py index d1224e2..75c433c 100755 --- a/custom_components/drivvo/sensor.py +++ b/custom_components/drivvo/sensor.py @@ -129,7 +129,7 @@ def __init__(self, hass, email, password, data, interval): name=data.identification, manufacturer="Drivvo", model=self._model, - sw_version="1.0.8", + sw_version="1.0.9", ) self.data = data @@ -140,12 +140,12 @@ def icon(self): @property def state(self): - """Retorna o número de abastecimentos até então.""" + """Returns the number of supplies so far.""" return self.data.refuelling_total @property def extra_state_attributes(self): - """Atributos.""" + """Attributes.""" return { "veiculo": self._model, @@ -169,7 +169,7 @@ def extra_state_attributes(self): } async def async_update(self): - """Atualiza os dados fazendo requisição na API.""" + """Updates the data by making a request to the API.""" self.data = await get_data_vehicle( hass=self.hass, user=self._email,