mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
add service type in name (#19980)
This commit is contained in:
parent
d812f23f6b
commit
71eaef8da4
@ -67,7 +67,7 @@ async def async_setup_platform(
|
|||||||
if types is not None and info['fuel'] not in types:
|
if types is not None and info['fuel'] not in types:
|
||||||
continue
|
continue
|
||||||
dev.append(PrezziBenzinaSensor(
|
dev.append(PrezziBenzinaSensor(
|
||||||
index, client, station, name, info['fuel']))
|
index, client, station, name, info['fuel'], info['service']))
|
||||||
|
|
||||||
async_add_entities(dev, True)
|
async_add_entities(dev, True)
|
||||||
|
|
||||||
@ -75,13 +75,13 @@ async def async_setup_platform(
|
|||||||
class PrezziBenzinaSensor(Entity):
|
class PrezziBenzinaSensor(Entity):
|
||||||
"""Implementation of a PrezziBenzina sensor."""
|
"""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."""
|
"""Initialize the PrezziBenzina sensor."""
|
||||||
self._client = client
|
self._client = client
|
||||||
self._index = index
|
self._index = index
|
||||||
self._data = None
|
self._data = None
|
||||||
self._station = station
|
self._station = station
|
||||||
self._name = "{} {}".format(name, ft)
|
self._name = "{} {} {}".format(name, ft, srv)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user