formatting.py
formatting
¶
Helpers for formatting values for display.
Functions¶
format_capacity
¶
format_capacity(
capacity: int | None, metric: bool = True
) -> str
Format capacity for display.
Source code in ember_mug/formatting.py
16 17 18 19 20 21 22 23 24 |
|
format_led_colour
¶
format_led_colour(led_colour: Colour) -> str
Return colour as hex value.
Source code in ember_mug/formatting.py
27 28 29 |
|
format_liquid_level
¶
format_liquid_level(liquid_level: int) -> str
Human readable liquid level.
Source code in ember_mug/formatting.py
32 33 34 |
|
format_temp
¶
format_temp(temp: float, metric: bool = True) -> str
Format temperature with the correct unit.
Source code in ember_mug/formatting.py
10 11 12 13 |
|