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

This commit is contained in:
springstan 2020-04-07 21:06:05 +02:00 committed by GitHub
parent d54ee77375
commit 46bbe816f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 104 additions and 110 deletions

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]])