Skip to content

Commit

Permalink
Merge pull request #26 from m0wlheld/dev
Browse files Browse the repository at this point in the history
Add Home Assistant Meta-Data and Github Action
  • Loading branch information
leeyuentuen authored Dec 22, 2023
2 parents 5211125 + 9f17f1f commit 0ed9354
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 24 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/hassfest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Validate with hassfest

on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: home-assistant/actions/hassfest@master

4 changes: 3 additions & 1 deletion custom_components/polestar_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady

from homeassistant.helpers import config_validation as cv

from .const import (
DOMAIN,
Expand All @@ -30,6 +30,8 @@
Platform.SENSOR,
]

CONFIG_SCHEMA = cv.removed(DOMAIN, raise_if_present=False)

_LOGGER = logging.getLogger(__name__)


Expand Down
9 changes: 5 additions & 4 deletions custom_components/polestar_api/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"domain": "polestar_api",
"name": "polestar_api",
"version": "0.0.1",
"name": "Polestar API",
"codeowners": ["@leeyuentuen"],
"config_flow": true,
"documentation": "https://github.com/leeyuentuen/polestar_api",
"dependencies": [],
"codeowners": ["leeyuentuen"]
"documentation": "https://github.com/leeyuentuen/polestar_api",
"iot_class": "cloud_polling",
"version": "1.0.5"
}
2 changes: 1 addition & 1 deletion custom_components/polestar_api/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"no_token": "Kein Token in der Antwort gefunden. Bitte überprüfe Deine Anmeldeinformationen."
}
}
}
}
43 changes: 25 additions & 18 deletions custom_components/polestar_api/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
{
"config": {
"step": {
"user": {
"title": "Configure Polestar EV",
"description": "Enter Authentication of Polestar EV",
"data": {
"name": "Friendly name",
"username": "Username",
"password": "Password",
"vin": "VIN"
"config": {
"step": {
"user": {
"title": "Configure Polestar EV",
"description": "Enter Authentication of Polestar EV",
"data": {
"name": "Friendly name",
"username": "Username",
"password": "Password",
"vin": "VIN"
}
}
},
"abort": {
"api_timeout": "Timeout connecting to the api.",
"api_failed": "Unexpected error creating api.",
"already_configured": "Polestar API is already configured",
"no_token": "No token found in response. Please check your credentials."
}
}
},
"abort": {
"api_timeout": "Timeout connecting to the api.",
"api_failed": "Unexpected error creating api.",
"already_configured": "Polestar API is already configured",
"no_token": "No token found in response. Please check your credentials."
"entity": {
"sensor": {
"polestar_api_estimate_distance_to_empty_km": {
"name": "Distance km Remaining"
}
}
}
}
}
}

0 comments on commit 0ed9354

Please sign in to comment.