Beispiel #1
0
 def state(self) -> Optional[int]:
     """Return the state of this entity."""
     if self.data.fuelQuantity is None:
         return None
     if not self.hass.config.units.is_metric:
         return round(
             IMPERIAL_SYSTEM.volume(self.data.fuelQuantity,
                                    METRIC_SYSTEM.volume_unit))
     return round(self.data.fuelQuantity)