Use set & dict literals (#33636)

Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
This commit is contained in:
Franck NijhofandDaniel Høyer Iversen authored and GitHub committed 2020-04-04 20:05:15 +02:00
1 parent d85222ad80
commit 7d3c974747
28 files changed
+89 -80

No files matched your search

@@ -303,11 +303,11 @@ class BayesianBinarySensor(BinarySensorDevice):
return {
ATTR_OBSERVATIONS: list(self.current_observations.values()),
ATTR_OCCURRED_OBSERVATION_ENTITIES: list(
set(
{
obs.get("entity_id")
for obs in self.current_observations.values()
if obs is not None
)
}
),
ATTR_PROBABILITY: round(self.probability, 2),
ATTR_PROBABILITY_THRESHOLD: self._probability_threshold,