File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
custom_components/auto_areas Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 22
33target-version = " py310"
44
5+ [lint ]
56select = [
67 " B007" , # Loop control variable {name} not used within loop body
78 " B014" , # Exception handler with duplicate exception
@@ -25,7 +26,6 @@ select = [
2526 " UP" , # pyupgrade
2627 " W" , # pycodestyle
2728]
28-
2929ignore = [
3030 " D202" , # No blank lines allowed after function docstring
3131 " D203" , # 1 blank line required before class docstring
@@ -39,9 +39,5 @@ ignore = [
3939 " UP006" ,
4040 " UP007" ,
4141]
42-
43- [flake8-pytest-style ]
44- fixture-parentheses = false
45-
46- [mccabe ]
47- max-complexity = 25
42+ mccabe.max-complexity = 25
43+ flake8-pytest-style.fixture-parentheses = false
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ def device_info(self) -> DeviceInfo:
9191 "suggested_area" : self .auto_area .area_name ,
9292 }
9393
94+ @cached_property
95+ def suggested_display_precision (self ) -> int | None :
96+ """Set the suggested precision (0.12)."""
97+ return 2
98+
9499 async def async_added_to_hass (self ):
95100 """Start tracking sensors."""
96101 LOGGER .debug (
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ def native_unit_of_measurement(self) -> str | None:
3636 """Return unit of measurement."""
3737 return LIGHT_LUX
3838
39+ @override
40+ @cached_property
41+ def suggested_display_precision (self ) -> int | None :
42+ """Set the suggested precision (0)."""
43+ return 0
44+
3945 @property
4046 def state (self ) -> Any : # type: ignore
4147 """Return the state of the entity."""
You can’t perform that action at this time.
0 commit comments