Clarify when message come from FCM (#39455)

This commit is contained in:
Tom Brien 2020-08-30 20:04:36 +01:00 committed by GitHub
parent 863c7414bc
commit 56057a638f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,6 +144,14 @@ class MobileAppNotificationService(BaseNotificationService):
f"Internal server error, please try again later: {fallback_error}"
)
message = result.get("message", fallback_message)
if "message" in result:
if message[-1] not in [".", "?", "!"]:
message += "."
message += (
" This message is generated externally to Home Assistant."
)
if response.status == 429:
_LOGGER.warning(message)
log_rate_limits(