Remove the unnecessary prefix from the sensor names in the Shelly integration (#40097)

pull/40179/head
Maciej Bieniek 2020-09-15 16:30:33 +02:00 committed by Paulus Schoutsen
parent b856b0e15d
commit 4518335a56
1 changed files with 2 additions and 2 deletions

View File

@ -42,11 +42,11 @@ async def async_setup_entry_attribute_entities(
if not blocks:
return
counts = Counter([item[0].type for item in blocks])
counts = Counter([item[1] for item in blocks])
async_add_entities(
[
sensor_class(wrapper, block, sensor_id, description, counts[block.type])
sensor_class(wrapper, block, sensor_id, description, counts[sensor_id])
for block, sensor_id, description in blocks
]
)