1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Allow overriding a sensor's display precision (#15363)

* Allow overriding a sensor's display precision

* Update demo + gallery

* Lint

* Fix state not updated in the UI

* Use formatNumber for options

* Feedbacks

* Add default precision and minimumFractionDigits

* Remove useless undefined

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
Erik Montnemery
2023-02-08 18:20:58 +01:00
committed by GitHub
parent 1550895d86
commit 050ed145bf
12 changed files with 163 additions and 17 deletions

View File

@@ -126,8 +126,7 @@ describe("formatNumber", () => {
getNumberFormatOptions({
state: "3.0",
attributes: { step: 0.5 },
} as unknown as HassEntity),
undefined
} as unknown as HassEntity)
);
});