From 228989b52064703659e476ea2a874ea2c2976b8e Mon Sep 17 00:00:00 2001 From: Jingsi Zhu Date: Wed, 11 Dec 2024 00:25:49 -0500 Subject: [PATCH] Fix rotationPercent settings from entity config --- src/modules/plugin/entityConfigFactoryNg.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/plugin/entityConfigFactoryNg.js b/src/modules/plugin/entityConfigFactoryNg.js index 0c6dcdd..ba438d8 100644 --- a/src/modules/plugin/entityConfigFactoryNg.js +++ b/src/modules/plugin/entityConfigFactoryNg.js @@ -74,10 +74,12 @@ export class EntityConfigFactory { const iconString = this.resolve('icon', resolvers) const colorString = this.resolve('color', resolvers) const labelTemplates = this.resolve('labelTemplates', resolvers) + const rotationPercentString = this.resolve('rotationPercent', resolvers) const feedbackLayout= this.render(feedbackLayoutString, stateObject) const renderedFeedback = this.render(feedbackValueString, stateObject) const feedback = feedbackValueString ? JSON.parse(renderedFeedback) : {} + const rotationPercent = rotationPercentString ? +this.render(rotationPercentString, stateObject) : undefined const icon = this.render(iconString, stateObject) const color = this.render(colorString, stateObject) @@ -87,7 +89,8 @@ export class EntityConfigFactory { feedback: feedback, icon: icon, color: color, - labelTemplates: labelTemplates + labelTemplates: labelTemplates, + rotationPercent } }