mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Move imports in syslog (#27602)
This commit is contained in:
parent
585214f3a4
commit
1d2b59db82
@ -1,5 +1,6 @@
|
|||||||
"""Syslog notification service."""
|
"""Syslog notification service."""
|
||||||
import logging
|
import logging
|
||||||
|
import syslog
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -67,7 +68,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||||||
|
|
||||||
def get_service(hass, config, discovery_info=None):
|
def get_service(hass, config, discovery_info=None):
|
||||||
"""Get the syslog notification service."""
|
"""Get the syslog notification service."""
|
||||||
import syslog
|
|
||||||
|
|
||||||
facility = getattr(syslog, SYSLOG_FACILITY[config.get(CONF_FACILITY)])
|
facility = getattr(syslog, SYSLOG_FACILITY[config.get(CONF_FACILITY)])
|
||||||
option = getattr(syslog, SYSLOG_OPTION[config.get(CONF_OPTION)])
|
option = getattr(syslog, SYSLOG_OPTION[config.get(CONF_OPTION)])
|
||||||
@ -87,7 +87,6 @@ class SyslogNotificationService(BaseNotificationService):
|
|||||||
|
|
||||||
def send_message(self, message="", **kwargs):
|
def send_message(self, message="", **kwargs):
|
||||||
"""Send a message to a user."""
|
"""Send a message to a user."""
|
||||||
import syslog
|
|
||||||
|
|
||||||
title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)
|
title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user