Fixing small naming bug (#12911)

This commit is contained in:
Eduardo Fonseca 2018-03-04 18:37:54 -08:00 committed by Paulus Schoutsen
parent f00d5cb8ca
commit cf3f1c3081

View file

@ -48,7 +48,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
dev = []
for pmname in coll.supported_values():
if config.get(CONF_NAME) is None:
if config.get(CONF_NAME) is not None:
name = '{} PM{}'.format(config.get(CONF_NAME), pmname)
else:
name = 'PM{}'.format(pmname)