Move shared constant in zabbix (#125744)
parent
a7b6652fba
commit
cee14afc03
|
@ -34,13 +34,14 @@ from homeassistant.helpers.entityfilter import (
|
|||
)
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PUBLISH_STATES_HOST = "publish_states_host"
|
||||
|
||||
DEFAULT_SSL = False
|
||||
DEFAULT_PATH = "zabbix"
|
||||
DOMAIN = "zabbix"
|
||||
|
||||
TIMEOUT = 5
|
||||
RETRY_DELAY = 20
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
"""Constants for Zabbix."""
|
||||
|
||||
DOMAIN = "zabbix"
|
|
@ -19,7 +19,7 @@ import homeassistant.helpers.config_validation as cv
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateType
|
||||
|
||||
from .. import zabbix
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -52,7 +52,7 @@ def setup_platform(
|
|||
"""Set up the Zabbix sensor platform."""
|
||||
sensors: list[ZabbixTriggerCountSensor] = []
|
||||
|
||||
if not (zapi := hass.data[zabbix.DOMAIN]):
|
||||
if not (zapi := hass.data[DOMAIN]):
|
||||
_LOGGER.error("Zabbix integration hasn't been loaded? zapi is None")
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue