1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-25 04:46:25 +00:00

Using rolling token on observer (#3286)

This commit is contained in:
Pascal Vizeli
2021-11-04 10:18:44 +01:00
committed by GitHub
parent a0c8b77737
commit efa5205800

View File

@@ -121,9 +121,8 @@ class PluginObserver(PluginBase):
async def start(self) -> None:
"""Run observer."""
# Create new API token
if not self.supervisor_token:
self._data[ATTR_ACCESS_TOKEN] = secrets.token_hex(56)
self.save_data()
self._data[ATTR_ACCESS_TOKEN] = secrets.token_hex(56)
self.save_data()
# Start Instance
_LOGGER.info("Starting observer plugin")