Fix customizing sensor unit (#13710)

This commit is contained in:
Erik Montnemery 2022-09-13 10:40:48 +02:00 committed by GitHub
parent d70cb24722
commit d2078a7e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;