Don't slugify unique id (#19770)

pull/19780/head
Sebastian Muszynski 2019-01-04 22:02:42 +01:00 committed by Paulus Schoutsen
parent bf40bea965
commit 65c7bdc1ad
1 changed files with 3 additions and 4 deletions

View File

@ -20,7 +20,6 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.event import async_track_point_in_utc_time
from homeassistant.util.dt import utcnow
from homeassistant.util import slugify
REQUIREMENTS = ['PyXiaomiGateway==0.11.1']
@ -222,11 +221,11 @@ class XiaomiDevice(Entity):
if hasattr(self, '_data_key') \
and self._data_key: # pylint: disable=no-member
self._unique_id = slugify("{}-{}".format(
self._unique_id = "{}{}".format(
self._data_key, # pylint: disable=no-member
self._sid))
self._sid)
else:
self._unique_id = slugify("{}-{}".format(self._type, self._sid))
self._unique_id = "{}{}".format(self._type, self._sid)
def _add_push_data_job(self, *args):
self.hass.add_job(self.push_data, *args)