diff --git a/openhab/client.py b/openhab/client.py index 4285e42..932d81f 100644 --- a/openhab/client.py +++ b/openhab/client.py @@ -312,7 +312,7 @@ def _oauth2_token_updater(self, token: typing.Dict[str, typing.Any]) -> None: self.oauth2_config.token = Oauth2Token(**token) with self.oauth2_config.token_cache.open('w', encoding='utf-8') as fhdl: - fhdl.write(self.oauth2_config.model_dump_json()) + fhdl.write(self.oauth2_config.token.model_dump_json()) def create_or_update_item(self, name: str,