Skip to content

Commit

Permalink
fix: add warn output for unsupported account type
Browse files Browse the repository at this point in the history
  • Loading branch information
fwmarcel committed Jan 30, 2025
1 parent 16a5313 commit 214e645
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion custom_components/divera/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
DOMAIN,
ERROR_AUTH,
ERROR_CONNECTION,
LOGGER,
)
from .divera import DiveraAuthError, DiveraClient, DiveraConnectionError

Expand Down Expand Up @@ -217,7 +218,9 @@ async def async_step_api(self, user_input: dict[str, Any] | None = None):

# normal users only have group id 8
ucr_id = self._divera_client.get_default_ucr()
if self._divera_client.get_usergroup_id(ucr_id) != 8:
usergroup_id = self._divera_client.get_usergroup_id(ucr_id)
if usergroup_id != 8:
LOGGER.warning("Usergroup ID %s is not supported", usergroup_id)
return self.async_abort(reason="not_supported")

if self._divera_client.get_ucr_count() > 1:
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
VERSION=$1

cd custom_components/divera
sed -i "s/0.0.0/${VERSION}/g" manifest.json
sed -i "s/\"version\": \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\": \"${VERSION}\"/g" yourfile.json
zip divera.zip -r ./

0 comments on commit 214e645

Please sign in to comment.