mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Enable SIM114 ruff rule (#111125)
This commit is contained in:
committed by
GitHub
parent
26fac184b4
commit
730d805876
@@ -221,9 +221,7 @@ class RegistryEntry:
|
||||
if not self.name and self.has_entity_name:
|
||||
display_dict["en"] = self.original_name
|
||||
if self.domain == "sensor" and (sensor_options := self.options.get("sensor")):
|
||||
if (precision := sensor_options.get("display_precision")) is not None:
|
||||
display_dict["dp"] = precision
|
||||
elif (
|
||||
if (precision := sensor_options.get("display_precision")) is not None or (
|
||||
precision := sensor_options.get("suggested_display_precision")
|
||||
) is not None:
|
||||
display_dict["dp"] = precision
|
||||
|
||||
Reference in New Issue
Block a user