def __init__(self, token): """Initialize view.""" HomeAssistantView.__init__(self) self._token = token
def json_message_response(message: str, message_code: int) -> Response: """Produce common json output.""" return HomeAssistantView.json({ "message": message, "code": message_code }, 200)