Skip to content

Commit

Permalink
fix naming bug (home-assistant#17976)
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real authored and balloob committed Nov 2, 2018
1 parent afc70fd commit 5910161
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/weather/smhi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
CONF_NAME, TEMP_CELSIUS)
from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client
from homeassistant.util import dt, Throttle
from homeassistant.util import dt, slugify, Throttle

from homeassistant.components.weather import (
WeatherEntity, ATTR_FORECAST_CONDITION, ATTR_FORECAST_TEMP,
Expand Down Expand Up @@ -73,11 +73,11 @@ async def async_setup_entry(hass: HomeAssistant,
config_entries) -> bool:
"""Add a weather entity from map location."""
location = config_entry.data
name = location[CONF_NAME]
name = slugify(location[CONF_NAME])

session = aiohttp_client.async_get_clientsession(hass)

entity = SmhiWeather(name, location[CONF_LATITUDE],
entity = SmhiWeather(location[CONF_NAME], location[CONF_LATITUDE],
location[CONF_LONGITUDE],
session=session)
entity.entity_id = ENTITY_ID_SENSOR_FORMAT.format(name)
Expand Down

0 comments on commit 5910161

Please sign in to comment.