Skip to content

Commit

Permalink
Fix variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
PhracturedBlue committed Sep 17, 2018
1 parent 58f5531 commit fc359dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions homeassistant/components/mailbox/asterisk_cdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@

from homeassistant.core import callback
from homeassistant.components.asterisk_mbox import SIGNAL_CDR_UPDATE
from homeassistant.components.asterisk_mbox import DOMAIN as MBOX_DOMAIN
from homeassistant.components.asterisk_mbox import DOMAIN
from homeassistant.components.mailbox import Mailbox
from homeassistant.helpers.dispatcher import async_dispatcher_connect

DEPENDENCIES = ['asterisk_mbox']
_LOGGER = logging.getLogger(__name__)
DOMAIN = "asterisk_cdr"
MAILBOX_NAME = "asterisk_cdr"


async def async_get_handler(hass, config, discovery_info=None):
"""Set up the Asterix CDR platform."""
return AsteriskCDR(hass, DOMAIN)
return AsteriskCDR(hass, MAILBOX_NAME)


class AsteriskCDR(Mailbox):
Expand All @@ -43,7 +43,7 @@ def _update_callback(self, msg):
def _build_message(self):
"""Build message structure."""
cdr = []
for entry in self.hass.data[MBOX_DOMAIN].cdr:
for entry in self.hass.data[DOMAIN].cdr:
timestamp = datetime.datetime.strptime(
entry['time'], "%Y-%m-%d %H:%M:%S").timestamp()
info = {
Expand Down

0 comments on commit fc359dd

Please sign in to comment.