Fix customizing sensor unit (#13710)

This commit is contained in:
Erik Montnemery 2022-09-13 10:40:48 +02:00 committed by Bram Kragten
parent 3cf14bb2e1
commit 5d6f446c30
No known key found for this signature in database
GPG Key ID: FBE2DFDB363EF55B

View File

@ -900,7 +900,7 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
params.hidden_by = this._hiddenBy;
}
if (
(domain === "number" || domain === "number") &&
(domain === "number" || domain === "sensor") &&
stateObj?.attributes?.unit_of_measurement !== this._unit_of_measurement
) {
params.options_domain = domain;