Remove None from dict.get(key, None) (#33794)

This commit is contained in:
springstan authored and GitHub committed 2020-04-07 21:06:05 +02:00
1 parent d54ee77375
commit 46bbe816f6
45 files changed
+104 -110

No files matched your search

+1 -2
View File
@@ -102,8 +102,7 @@ class TorqueReceiveDataView(HomeAssistantView):
for pid in names:
if pid not in self.sensors:
self.sensors[pid] = TorqueSensor(
ENTITY_NAME_FORMAT.format(self.vehicle, names[pid]),
units.get(pid, None),
ENTITY_NAME_FORMAT.format(self.vehicle, names[pid]), units.get(pid)
)
hass.async_add_job(self.add_entities, [self.sensors[pid]])