in libs/secret.py [0:0]
def get(self):
""" Gets a secret from Secrets Manager """
try:
print('Getting the Home Assistant secret {}'.format(self.SECRET_NAME))
response = self.secretsmanager_client.get_secret_value(SecretId=self.SECRET_NAME)
except Exception as e:
print('Failed to get secret\nException: {}'.format(e))
raise e
return response