From 71eaef8da47d8a5dfb3b8c0d9b4cc40ea3d464c4 Mon Sep 17 00:00:00 2001 From: Eliseo Martelli Date: Fri, 11 Jan 2019 18:51:41 +0100 Subject: [PATCH] add service type in name (#19980) --- homeassistant/components/sensor/prezzibenzina.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sensor/prezzibenzina.py b/homeassistant/components/sensor/prezzibenzina.py index 972a69ee0d9..171fea53314 100644 --- a/homeassistant/components/sensor/prezzibenzina.py +++ b/homeassistant/components/sensor/prezzibenzina.py @@ -67,7 +67,7 @@ async def async_setup_platform( if types is not None and info['fuel'] not in types: continue dev.append(PrezziBenzinaSensor( - index, client, station, name, info['fuel'])) + index, client, station, name, info['fuel'], info['service'])) async_add_entities(dev, True) @@ -75,13 +75,13 @@ async def async_setup_platform( class PrezziBenzinaSensor(Entity): """Implementation of a PrezziBenzina sensor.""" - def __init__(self, index, client, station, name, ft): + def __init__(self, index, client, station, name, ft, srv): """Initialize the PrezziBenzina sensor.""" self._client = client self._index = index self._data = None self._station = station - self._name = "{} {}".format(name, ft) + self._name = "{} {} {}".format(name, ft, srv) @property def name(self):