Clarify when message come from FCM (#39455)
This commit is contained in:
parent
863c7414bc
commit
56057a638f
1 changed files with 8 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue