mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-28 11:36:32 +00:00
Using rolling token on observer (#3286)
This commit is contained in:
parent
a0c8b77737
commit
efa5205800
@ -121,9 +121,8 @@ class PluginObserver(PluginBase):
|
|||||||
async def start(self) -> None:
|
async def start(self) -> None:
|
||||||
"""Run observer."""
|
"""Run observer."""
|
||||||
# Create new API token
|
# Create new API token
|
||||||
if not self.supervisor_token:
|
self._data[ATTR_ACCESS_TOKEN] = secrets.token_hex(56)
|
||||||
self._data[ATTR_ACCESS_TOKEN] = secrets.token_hex(56)
|
self.save_data()
|
||||||
self.save_data()
|
|
||||||
|
|
||||||
# Start Instance
|
# Start Instance
|
||||||
_LOGGER.info("Starting observer plugin")
|
_LOGGER.info("Starting observer plugin")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user