Skip to content

Commit

Permalink
order
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed Aug 26, 2024
1 parent 18f3de9 commit cde5b10
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions paradox/interfaces/text/homeassistant_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ def __init__(self, alarm):
)

self.api_url = "http://supervisor/core/api/services/:domain/:service"
self.token = os.environ.get("SUPERVISOR_TOKEN")
if cfg.HOMEASSISTANT_NOTIFICATIONS_API_TOKEN:
self.token = cfg.HOMEASSISTANT_NOTIFICATIONS_API_TOKEN

if cfg.HOMEASSISTANT_NOTIFICATIONS_API_URL:
self.api_url = cfg.HOMEASSISTANT_NOTIFICATIONS_API_URL

self.token = os.environ.get("SUPERVISOR_TOKEN")
if cfg.HOMEASSISTANT_NOTIFICATIONS_API_TOKEN:
self.token = cfg.HOMEASSISTANT_NOTIFICATIONS_API_TOKEN
if not self.token:
logger.error(
f'"SUPERVISOR_TOKEN" environment variable must be set to use {__class__.__name__}'
Expand Down

0 comments on commit cde5b10

Please sign in to comment.