Allow disabeling notifications
This commit is contained in:
parent
e18b11deae
commit
a48779f4e3
2 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ HTTP requests include the hostname to which the request has been made. To improv
|
|||
#### ENV_PREFIX (string)
|
||||
To modify the default prefix for settings passed as environment variables (`HC_`) change this setting to another value that meets your demands.
|
||||
#### NOTIFY_SERVICE (string)
|
||||
Define a notification service from your Home Assistant setup that should be used to send notifications, e.g. `notify.mytelegram`. The default is `persistent_notification.create`. Do __NOT__ change the value of the `NOTIFY_SERVICE_DEFAULT` variable! You will be notified if your `HASS_API_PASSWORD`, `SESAME` or `CREDENTIALS` password seems insecure. Additionally a notification with the accessing IP will be sent every time the `SESAME` token has been used for whitelisting.
|
||||
Define a notification service from your Home Assistant setup that should be used to send notifications, e.g. `notify.mytelegram`. The default is `persistent_notification.create`. Do __NOT__ change the value of the `NOTIFY_SERVICE_DEFAULT` variable! You will be notified if your `HASS_API_PASSWORD`, `SESAME` or `CREDENTIALS` password seems insecure. Additionally a notification with the accessing IP will be sent every time the `SESAME` token has been used for whitelisting. To disable this feature set the value to `False`.
|
||||
|
||||
__Note regarding `ALLOWED_NETWORKS`, `BANNED_IPS` and `BANLIMIT`__:
|
||||
The way this is implemented works in the following order:
|
||||
|
|
|
@ -4550,7 +4550,7 @@ class SimpleServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
|||
def notify(title="HASS Configurator",
|
||||
message="Notification by HASS Configurator",
|
||||
notification_id=None):
|
||||
if not HASS_API:
|
||||
if not HASS_API or not NOTIFY_SERVICE:
|
||||
return
|
||||
headers = {
|
||||
"Content-Type": "application/json"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue