mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Correct name using format instead of concatenation
This commit is contained in:
parent
a4481efe07
commit
058dba50cc
@ -91,8 +91,8 @@ class NetAtmoSensor(Entity):
|
|||||||
""" Implements a NetAtmo sensor. """
|
""" Implements a NetAtmo sensor. """
|
||||||
|
|
||||||
def __init__(self, netatmo_data, module_name, sensor_type):
|
def __init__(self, netatmo_data, module_name, sensor_type):
|
||||||
self.client_name = 'NetAtmo'
|
self._name = "NetAtmo {} {}".format(module_name,
|
||||||
self._name = module_name + '_' + SENSOR_TYPES[sensor_type][0]
|
SENSOR_TYPES[sensor_type][0])
|
||||||
self.netatmo_data = netatmo_data
|
self.netatmo_data = netatmo_data
|
||||||
self.module_name = module_name
|
self.module_name = module_name
|
||||||
self.type = sensor_type
|
self.type = sensor_type
|
||||||
@ -102,7 +102,7 @@ class NetAtmoSensor(Entity):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
return '{} {}'.format(self.client_name, self._name)
|
return self._name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user